当前位置: 首页 > 知识库问答 >
问题:

Maven生成源“在构建有效模型时遇到了一些问题”

乌杰
2023-03-14

我不明白,有时行得通,有时不行。。。。我正在尝试使用生成源目标,但收到以下消息:

[WARNING] Some problems were encountered while building the effective model for SoapClientSd:SoapClientSd:jar:0.0.2
[WARNING] Reporting configuration should be done in <reporting> section, not in maven-site-plugin <configuration> as reportPlugins parameter. @ line 139, column 20
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[INFO] ---------------------< SoapClientSd:SoapClientSd >-------------------
[INFO] Building SoapClientSd 0.0.2
[INFO] --------------------------------[ jar ]------------------------------
[INFO] BUILD SUCCESS
[INFO] Total time: 0.250 s
[INFO] Finished at: 2018-10-08T21:46:21+02:00

这里是我的pom:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <groupId>SoapClientSd</groupId>
    <artifactId>SoapClientSd</artifactId>
    <version>0.0.2</version>

    <packaging>jar</packaging>
    <name>${project.artifactId}</name>

    <properties>
        <jdk.source>1.7</jdk.source>
        <jdk.target>1.7</jdk.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <wsdl>http://localhost:8080/SoapSd/UniboServices?wsdl</wsdl>
        <ws.stub.package.name>it.unibo.test.services</ws.stub.package.name>
        <log4j.version>1.2.17</log4j.version>
        <commons-io.version>2.4</commons-io.version>
        <commons-logging.version>1.2</commons-logging.version>
        <cxf.version>2.5.2</cxf.version>
        <maven-javadoc-plugin.version>2.10.3</maven-javadoc-plugin.version>
        <maven-source-plugin.version>3.0.0</maven-source-plugin.version>
        <maven-compiler-plugin.version>3.6.1</maven-compiler-plugin.version>
    </properties> 

    <build>
        <sourceDirectory>src/main/java</sourceDirectory>
        <pluginManagement>
        <plugins>

            <plugin>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-codegen-plugin</artifactId>
                <version>${cxf.version}</version>
                <executions>

                    <execution>
                        <id>generate-sources</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>wsdl2java</goal>
                        </goals>
                        <configuration>
                            <tasks>
                            </tasks>
                            <sourceRoot>target/generated-sources</sourceRoot>
                            <wsdlOptions>
                                <wsdlOption>
                                    <wsdl>${wsdl}</wsdl>
                                    <extraargs>
                                        <extraarg>-verbose</extraarg>
                                        <extraarg>-client</extraarg>
                                        <extraarg>-frontend</extraarg>
                                        <extraarg>jaxws21</extraarg>
                                        <extraarg>-p</extraarg>
                                        <extraarg>${ws.stub.package.name}</extraarg>
                                    </extraargs>
                                </wsdlOption>
                            </wsdlOptions>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${jdk.source}</source>
                    <target>${jdk.target}</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven-source-plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <additionalparam>${javadoc.opts}</additionalparam>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <reportPlugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-javadoc-plugin</artifactId>
                            <configuration>
                                <additionalparam>${javadoc.opts}</additionalparam>
                            </configuration>
                        </plugin>
                    </reportPlugins>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-bundle</artifactId>
            <version>${cxf.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>${log4j.version}</version>
        </dependency>
    </dependencies>
</project>

我做错了什么?为什么会出现此错误?我只是在一段时间后再次运行“生成的源”,但它不起作用。我也尝试使用-X和clean,但它不起作用。

共有1个答案

端木骞尧
2023-03-14

要生成源,必须启动应用程序

检查是否可以访问http://localhost:8080/SoapSd/UniboServices?wsdl

尝试关闭所有目标/生成源文件夹

 类似资料:
  • 我创建并尝试使用构建项目,但它不工作。不是这个项目,我试着构建我的所有项目,但在我的ubuntu笔记本电脑上不工作 [信息]扫描项目...从中心下载:https://repo . maven . Apache . org/maven 2/org/spring framework/boot/spring-boot-starter-parent/2 . 6 . 11/spring-boot-start

  • 我正在尝试创建一个maven项目。但它会抛出跟随错误。 “无法解析原型 maven-archetype-webapp:1.0来自任何配置的存储库。无法解析项目org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0无法将org.apache.maven.archetypes:maven-archetype-webapp:pom:1.0从h

  • A)总结问题 在pom Maven中定义编译器版本有三种方法。我没有提到maven.compiler的版本、插件和版本(意味着maven构建成功),然后是如何选择编译器版本的,我没有提到版本 关于我试过的东西,请参阅b节 我定义了无效的Maven.Compiler.Release。然后它也起作用了 4.0.0 io.flowing.retail flow-retail-kafka-shipping

  • 我正在尝试从何处运行此源代码https://github.com/kishancs2020/TicketBookingServiceJunitTestingGithub在我的Jenkins中查看了在Jenkins文件中创建的管道源代码。 我已经更新了maven,java版本来修复它,但错误仍然是一样的。我也通过了这个链接http://cwiki.apache.org/confluence/disp

  • 我对Java相当陌生,以前从未做过编程。在尝试为每个操作符运行代码时,我遇到以下错误。我希望它将用户输入作为字符串接收,但返回一个double作为结果。我知道可能会有几个错误,但我们非常感谢您的帮助。 线程“main”java中出现异常。lang.错误:未解决的编译问题:类型不匹配:无法从字符串转换为双精度运算符-参数类型java未定义。lang.字符串,java。lang.String参数类型j