Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api打包报错 #9

Open
jakkkkead opened this issue Jun 15, 2020 · 2 comments
Open

api打包报错 #9

jakkkkead opened this issue Jun 15, 2020 · 2 comments

Comments

@jakkkkead
Copy link

com.github.uhfun swagger-more-annotations 1.0.2-SNAPSHOT src/main/java org.apache.maven.plugins maven-javadoc-plugin 3.1.1 javadoc process-classes com.github.uhfun.swagger.doclet.SwaggerMoreDoclet com.github.uhfun swagger-more-javadoc 1.0.2-SNAPSHOT com.xy xyPostalWork-api 0.0.1-SNAPSHOT -classDir ${project.build.outputDirectory} ${project.build.sourceDirectory} com.xy.service false org.springframework.boot spring-boot-maven-plugin 报错信息:Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.1.1:javadoc (default) on project xyPostalWork-api: Unable to parse configuration of mojo org.apache.maven.plugins:maven-javadoc-plugin:3.1.1:javadoc for parameter additionalOptions: Cannot assign configuration entry 'additionalOptions' with value '-classDir E:\xyDiningWork\xyPostalWork-api\target\classes' of type java.lang.String to property of type java.lang.String[]
@hanger-source
Copy link
Owner

com.github.uhfun swagger-more-annotations 1.0.2-SNAPSHOT src/main/java org.apache.maven.plugins maven-javadoc-plugin 3.1.1 javadoc process-classes com.github.uhfun.swagger.doclet.SwaggerMoreDoclet com.github.uhfun swagger-more-javadoc 1.0.2-SNAPSHOT com.xy xyPostalWork-api 0.0.1-SNAPSHOT -classDir ${project.build.outputDirectory} ${project.build.sourceDirectory} com.xy.service false org.springframework.boot spring-boot-maven-plugin 报错信息:Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.1.1:javadoc (default) on project xyPostalWork-api: Unable to parse configuration of mojo org.apache.maven.plugins:maven-javadoc-plugin:3.1.1:javadoc for parameter additionalOptions: Cannot assign configuration entry 'additionalOptions' with value '-classDir E:\xyDiningWork\xyPostalWork-api\target\classes' of type java.lang.String to property of type java.lang.String[]

如果启动遇到问题你可以暂时先不适用"自动使用javadoc 生成注解"这个功能,你可以先直接在接口上添加注解

发一下你api包的pom.xml 我看一下是什么问题

@jakkkkead
Copy link
Author

jakkkkead commented Jun 15, 2020

    <dependency>
        <groupId>com.github.uhfun</groupId>
        <artifactId>swagger-more-annotations</artifactId>
        <version>1.0.2-SNAPSHOT</version>
    </dependency>
    <sourceDirectory>src/main/java</sourceDirectory>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.1.1</version>
            <executions>
                <execution>
                    <goals>
                        <goal>javadoc</goal>
                    </goals>
                    <phase>process-classes</phase>
                    <configuration>
                        <doclet>com.github.uhfun.swagger.doclet.SwaggerMoreDoclet</doclet>
                        <docletArtifacts>
                            <docletArtifact>
                                <groupId>com.github.uhfun</groupId>
                                <artifactId>swagger-more-javadoc</artifactId>
                                <version>1.0.2-SNAPSHOT</version>
                            </docletArtifact>
                            <docletArtifact>
                                <groupId>com.xy</groupId>
                                <artifactId>xyPostalWork-api</artifactId>
                                <version>0.0.1-SNAPSHOT</version>
                            </docletArtifact>
                        </docletArtifacts>
                        <additionalOptions>-classDir ${project.build.outputDirectory}</additionalOptions>
                        <sourcepath>${project.build.sourceDirectory}</sourcepath>
                        <subpackages>com.xy.service</subpackages>
                        <useStandardDocletOptions>false</useStandardDocletOptions>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    <!--<plugin>-->
            <!--<groupId>org.apache.maven.plugins</groupId>-->
            <!--<artifactId>maven-compiler-plugin</artifactId>-->
        <!--</plugin>-->
    </plugins>
</build>

报错信息指向
-classDir ${project.build.outputDirectory}
这一行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants