我正在尝试使用Spring Data和Neo4j.我开始尝试按照主站点链接的本指南.特别是我将我的pom.xml基于"Hello,World!".示例文件.这是我的pom.xml中针对导致问题的插件的剪辑...
<plugin>
<!-- Required to resolve aspectj-enhanced class features -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<outxml>true</outxml>
<aspectLibraries>
<aspectLibrary>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
</aspectLibrary>
<aspectLibrary>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-neo4j</artifactId>
</aspectLibrary>
</aspectLibraries>
<source>1.6</source>
<target>1.6</target>
</configuration>
<executions>
<!-- ERROR HERE IN ECLIPSE SEE BELOW FOR FULL MESSAGE -->
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>${aspectj.version}</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjtools</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
Run Code Online (Sandbox Code Playgroud)
我看到的错误是:
Multiple annotations found at this line:
- Plugin execution not covered by …Run Code Online (Sandbox Code Playgroud) 我在pluginManagement标签中的父pom.xml中有jaxws-maven-plugin,我指的是这个插件在pom中.
mvn clean install运行正常.但是,eclipse抱怨"生命周期配置未涵盖插件执行:org.codehaus.mojo:jaxws-maven-plugin:1.12:wsimport(执行:FirstWsdl,阶段:生成源)".
你能建议如何在eclipse中避免这个错误吗?
父母pom
<pluginManagement>
<plugins>
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.12</version>
<executions>
<execution>
<id>FirstWsdl</id>
<goals>
<goal>wsimport</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<wsdlLocation>location/file.wsdl</wsdlLocation>
<wsdlFiles>
<wsdlFile>file.wsdl</wsdlFile>
</wsdlFiles>
<packageName>com.xxx.package</packageName>
</configuration>
</execution>
</executions>
<configuration>
<sourceDestDir>${basedir}/generated</sourceDestDir>
<verbose>true</verbose>
<extension>true</extension>
<keep>true</keep>
<vmArgs>
<vmArg .../>
</vmArgs>
</configuration>
</plugin>
...
</plugins>
</pluginManagement>
Run Code Online (Sandbox Code Playgroud)
孩子pom
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
</plugin>
</plugins>
Run Code Online (Sandbox Code Playgroud)
我查看了这个问题,并回答如何解决Spring Data Maven Builds的"生命周期配置未涵盖的插件执行",但是,我应该在父和子pom中使用pluginManagement来避免此错误吗?