我正在尝试使用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) 所以我正在尝试一些我认为相当简单的东西,我基本上希望maven在构建战争之前为我缩小所有js和css文件.我的插件看起来像这样:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<version>1.0.0</version>
<configuration>
<manifestLocation>META-INF</manifestLocation>
<instructions>
<Export-Package>!test.impl,test*</Export-Package>
<Import-Package>*</Import-Package>
<!--
add ,plugin.xml if it's present i.e.
src/main/resources,plugin.xml
-->
<Include-Resource>src/main/resources</Include-Resource>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<goals>
<goal>compress</goal>
</goals>
</execution>
</executions>
<configuration>
<nosuffix>true</nosuffix>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
问题是YUI插件确实正确地缩小了文件,但是在构建战争之前,它看起来像是复制了我的主源目录中的所有文件,从而消除了YUI插件所做的更改.
我通过以下方式打电话给maven : mvn compile war:war. 我已经玩了一段时间不同的设置,但到目前为止我还没有找到解决方法.
我想要的是刚刚战争之后从src目录复制了所需的文件,它将运行YUI插件,但我尝试了YUI插件上的所有阶段的排列,但这似乎没有任何区别.
我已经google了一下,但到目前为止,我所阅读的几乎所有内容似乎都表明我应该像我一样放弃YUI插件,一切都应该神奇地工作.到目前为止,我似乎没有找到魔法.