1
1
你不能。
把它绑在
下面是一个示例,演示了使用配置如下的MavenAntrun插件的这种行为:
以及
$ mvn package [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Q3934833 Maven Webapp 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ ... [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ Q3934833 --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.5:test (default-test) @ Q3934833 --- [INFO] No tests to run. [INFO] [INFO] --- maven-war-plugin:2.1:war (default-war) @ Q3934833 --- [INFO] Packaging webapp [INFO] Assembling webapp [Q3934833] in [/home/pascal/Projects/stackoverflow/Q3934833/target/Q3934833] [INFO] Processing war project [INFO] Copying webapp resources [/home/pascal/Projects/stackoverflow/Q3934833/src/main/webapp] [INFO] Webapp assembled in [317 msecs] [INFO] Building war: /home/pascal/Projects/stackoverflow/Q3934833/target/Q3934833.war [INFO] WEB-INF/web.xml already added, skipping [INFO] [INFO] --- maven-antrun-plugin:1.6:run (default) @ Q3934833 --- [INFO] Executing tasks main: [echo] Hi!!!!! [INFO] Executed tasks [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ ...
Antrun插件在
|
2
0
您可以尝试在@mojo注释中使用“准备包”阶段:
|