我有一个具有以下结构的Maven项目:
- main:
- appengine-project
- lib-a
- lib-b
该项目的目标是gwt:compile
,并且依赖于两个库。
由于gwt:compile
花费的时间很长,因此我想尽可能避免在其上运行mvn install
,但是当在库中查找代码时,我想找到一种很好的方式来编译库和运行appengine:run
。
由于某种原因,当我在构建中添加-am
标志时,它会中断并且无法找到插件的任何原因吗?
我正在尝试从子模块中运行Appengine目标:
mvn -pl sub-module appengine:run -DskipTests
有效。
mvn -pl sub-module appengine:run -DskipTests -am
失败。
[ERROR] No plugin found for prefix 'appengine' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/thepoosh/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
主要-pom.xml
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.thepoosh</groupId>
<artifactId>main</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>../lib-a</module>
<module>../lib-b</module>
<module>../appengine-project</module>
</modules>
</project>
appengine-project-pom.xml
<project>
<parent>
<groupId>com.tradeos</groupId>
<artifactId>freightos-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../freightos-parent/pom.xml</relativePath>
</parent>
<artifactId>tradeos</artifactId>
<packaging>war</packaging>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwtVersion}</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<modules>
<module>com.thepoosh.project${gwtModuleSuffix}</module>
</modules>
<warSourceDirectory>war</warSourceDirectory>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.thepoosh</groupId>
<artifactId>lib-a</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.tradeos</groupId>
<artifactId>lib-b</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>