我正在尝试使用此处描述的解决方案来解决恼人的"生命周期配置未涵盖的插件执行:org.codehaus.mojo:build-helper-maven-plugin:1.7:add-source(执行:默认,阶段:生成 -来源)"当我将以下插件放在我的pom.xml上时:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals><goal>add-source</goal></goals>
<configuration>
<sources>
<source>src/bootstrap/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
但是当我运行mvn clean install时,我得到了这个:
原因:在存储库中找不到POM'org.eclipse.m2e:lifecycle-mapping':无法从任何存储库下载工件
有没有人知道如何让m2e和maven开心?
我让Maven将一些依赖文件复制到GWT项目的特定位置.它maven-dependency-plugin完成了工作,到目前为止它的工作原理.唯一的问题是我从Eclipse那里得到一个错误:
Artifact has not been packaged yet. When used on reactor artifact, copy should be executed after packaging: see MDEP-187.
我试图改变<phase>但是没有用.我怎样才能摆脱这个错误,为什么它会在那里因为Maven按照预期构建.
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/war/WEB-INF/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Run Code Online (Sandbox Code Playgroud) 我有一个使用WSDL服务的Java项目.pom给出了一个错误(所以我的项目中有红色X)但是所有内容都构建并正确运行.我很难过,任何想法都是适当的.
这是麻烦制造者:
< !-- WSDL stub generation -- >
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId >cxf-codegen-plugin</artifactId>
<version>${cxf-codegen-plugin.version}</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/wsdl/Service.wsdl</wsdl>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
这是我从上面的执行元素得到的错误:
执行生成目标org.apache.cxf:cxf-codegen-plugin:2.7.2:wsdl2java失败:插件org.apache.cxf:cxf-codegen-plugin:2.7.2或其中一个依赖项无法解析:无法收集org.apache.cxf的依赖项:cxf-codegen-plugin:jar:2.7.2()(org.apache.cxf:cxf-codegen-plugin:2.7.2:wsdl2java:generate-sources:generate-源)
(对不起'<'和'>'周围的空格.我是SO的新手,还不能张贴图片.