maven - Preventing a plugin from executing a lifecycle phase -
i invoke maven using next command sequence
c:>\mvn install tomcat7:redeploy
this produces next (heavily) edited output
[info] --- maven-resources-plugin:2.6:resources (default-resources) @ geomaster --- [info] copying 0 resource [info] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ geomaster --- [info] no sources compile [info] --- maven-resources-plugin:2.6:testresources (default-testresources) @ geomaster --- [info] copying 0 resource [info] --- maven-compiler-plugin:2.5.1:testcompile (default-testcompile) @ geomaster --- [info] no sources compile [info] --- maven-surefire-plugin:2.12.4:test (default-test) @ geomaster --- [info] --- maven-war-plugin:2.2:war (default-war) @ geomaster --- [info] --- maven-install-plugin:2.4:install (default-install) @ geomaster --- [info] [info] >>> tomcat7-maven-plugin:2.2:redeploy (default-cli) @ geomaster >>> [info] [info] --- maven-resources-plugin:2.6:resources (default-resources) @ geomaster --- [info] copying 0 resource [info] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ geomaster --- [info] no sources compile [info] --- maven-resources-plugin:2.6:testresources (default-testresources) @ geomaster --- [info] copying 0 resource [info] --- maven-compiler-plugin:2.5.1:testcompile (default-testcompile) @ geomaster --- [info] no sources compile [info] --- maven-surefire-plugin:2.12.4:test (default-test) @ geomaster --- [info] skipping execution of surefire because has been run configuration [info] --- maven-war-plugin:2.2:war (default-war) @ geomaster --- [info] [info] <<< tomcat7-maven-plugin:2.2:redeploy (default-cli) @ geomaster <<< [info] [info] --- tomcat7-maven-plugin:2.2:redeploy (default-cli) @ geomaster ---
please ignore fact have no resources or source code in project. not crux of question.
the install
target used place generated war maven repository. tomcat7:redeploy
target used place generated war tomcat server.
i have tried various invocations , different configurations cannot prevent tomcat plugin performing it's own build despite install
target having done it.
the surefire plugin seems have 'smarts' has detected has been run before. why can't maven have 'smarts' also?
there additional infomation tomcat plugin can found here: tomcat7-maven-plugin
while sec build executed tomcat plugin not substantial, in more substantial project, how can prevent beingness executed @ exclusively redundant?
is bug in either maven or tomcat plugin? basis request enhancement? or expected behaviour has lived with?
from tomcat page link regarding deploy
goal, states it:
invokes execution of lifecycle phase bundle prior executing itself.
so why doing own build. deliberate feature, , far can tell can not turned off.
however deploy-only
goal exists which:
deploy war tomcat without forking bundle lifecycle
so if alter command be:
mvn install tomcat7:deploy-only
then should want.
maven maven-plugin
No comments:
Post a Comment