这个
exec-maven-plugin
是正确的答案(尽管您想要java目标)。您需要将其绑定到生命周期阶段。看看这个
usage page
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>jsbuilder</id>
<goals>
<goal>java</goal>
</goals>
<phase>compile</phase>
<configuration>
<mainClass><!-- fill in from jar's META-INF/MANIFEST.MF --></mainClass>
<argument>--projectFile</argument>
<argument>web/lib/dev/frontend.jsb2</argument>
<argument>--homedir</argument>
<argument>web/lib</argument>
</configuration>
</execution>
</executions>
<configuration>
<includeProjectDependencies>false</includeProjectDependencies>
<includePluginDependencies>true</includePluginDependencies>
</configuration>
<dependencies>
<!-- a bit nasty, would be better if jsbuilder2 available in a maven repo. -->
<dependency>
<groupId>com.extjs</groupId>
<artifactId>jsbuilder2</artifactId>
<version>2.0.0</version>
<scope>system</scope>
<systemPath>web/lib/dev/JSBuilder2.jar</systemPath>
</dependency>
</dependencies>
</plugin>
如果您是JSBuilder2的大用户,那么有必要询问Cencha他们是否可以将其发布到maven central repo。把他们指向
OSS Repository Hosting
.