Maven WAR plugin not reading configuration when running in <execution> tag -


I'm trying to hang Maven with a war plug-in for many. It works fine until it is defined in the following manner:

  & lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven War Plugin & lt; / ArtifactId> & Lt; Version & gt; 1.0 & lt; / Version & gt; & Lt; Configuration & gt; (...) & lt; / Configuration & gt;  

but not in the following

  & lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven War Plugin & lt; / ArtifactId> & Lt; Version & gt; 1.0 & lt; / Version & gt; & Lt; Hanging & gt; & Lt; Execution & gt; & Lt; Step & gt; Package & lt; / Step & gt; & Lt; Configuration & gt; (...) & lt; / Configuration & gt; & Lt; / Execution & gt; & Lt; / Hanging & gt; & Lt; / Plugin & gt;  

Where Maven can not find any resources I & lt; Configure & gt; Tags Have I missed anything important, and / or is there a better way to create multiple war files in the same build?

I did not know how to stop the war which is generated by default, but You can also go to & lt; Executions & gt; can use a configuration inside and outside of the element:

   & Lt; Version & gt; 2.1 Beta 1 & lt; / Version & gt; & Lt; Configuration & gt; & Lt; Classifier & gt; Along with junk & lt; / Classifier & gt; & Lt ;! - Temp directory that webapp is collected (each should be different) - & gt; & Lt; WebappDirectory & gt; $ {Project.build.directory} / construction-cum-junk & lt; / WebappDirectory & gt; & Lt; WebResources & gt; & Lt; Resources & gt; & Lt; Directory & gt; Junk & lt; / Directory & gt; & Lt; Included & gt; & Lt; Included & gt; ** / * & lt; / Include & gt; & Lt; / Include & gt; & Lt; / Resources & gt; & Lt; / WebResources & gt; & Lt; / Configuration & gt; & Lt; Hanging & gt; & Lt; Execution & gt; & Lt; ID & gt; Ad-Other-Junk & lt; / Id & gt; & Lt; Step & gt; Package & lt; / Step & gt; & Lt; Goals & gt; & Lt; Goal & gt; War & lt; / Target & gt; & Lt; / Targets & gt; & Lt ;! - Excluding prior configuration - & gt; & Lt; Inherited & gt; False & lt; / Inherited & gt; & Lt; Configuration & gt; & Lt; Classifier & gt; Along with other-junk & lt; / Classifier & gt; & Lt; WebappDirectory & gt; $ {Project.build.directory} / creation-another-junk & lt; / WebappDirectory & gt; & Lt; WebResources & gt; & Lt; Resources & gt; & Lt; Directory & gt; Other-junk & lt; / Directory & gt; & Lt; Included & gt; & Lt; Included & gt; ** / * & lt; / Include & gt; & Lt; / Include & gt; & Lt; / Resources & gt; & Lt; / WebResources & gt; & Lt; / Configuration & gt; & Lt; / Execution & gt; & Lt; / Hanging & gt; & Lt; / Plugin & gt;  

For me, it creates artifact-0.1-with-junk.war and artifact-0.1-with-other-junk.war and both include the correct files.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -