maven 2 - Running resource filters when using jetty:run -


I am using resource filtering on JavaScript based on profile. I am also developing locally by using mvn jetty: run , but have not run the filtering phase.

How do I filter using the JT plugin?


Configuration snippet :

  & lt; Plugin & gt; & Lt; Group & gt; Org.apache.maven.plugins & lt; / Group & gt; & Lt; ArtifactId & gt; Maven War Plugin & lt; / ArtifactId> & Lt; Version & gt; 2.0.2 & lt; / Edition & gt; & Lt; Configuration & gt; & Lt; WebResources & gt; & Lt; Resources & gt; & Lt; Directory & gt; Src / home / webapp & lt; / Directory & gt; & Lt; Included & gt; & Lt; Included & gt; Error.jsp & lt; / Include & gt; & Lt; / Include & gt; & Lt; Filtering & gt; True & lt; / Filtering & gt; & Lt; TargetPath & gt; / & Lt; / TargetPath & gt; & Lt; / Resources & gt; & Lt; / WebResources & gt; & Lt; / Configuration & gt; & Lt; / Plugin & gt; & Lt; Profile & gt; & Lt; ID & gt; JCI & lt; / Id & gt; & Lt; Activation & gt; & Lt; ActiveByDefault & gt; True & lt; / ActiveByDefault & gt; & Lt; Property & gt; & Lt; Name & gt; JCI & lt; / Name & gt; & Lt; / Property & gt; & Lt; / Activation & gt; & Lt; Properties & gt; & Lt; Error.title & gt; Here are some values ​​& lt; /error.title> & Lt; / Properties & gt; & Lt; / Profile & gt;  

You may wish to use JT: Run-Explosive Target instead of JT: Run . From:

This goal first collects your webpad in a war file and then deploys it on the JT.

This can ensure that the appropriate warfare life cycle is executed before the start of the server.

Are you sure the jci profile is being activated? If another profile is specified for the build, then the & lt; ActiveByDefault & gt; Property profile will not be enabled, see for details.

From John Casey's response:

The above example is working as a design. & Lt; ActiveByDefault / & gt; Element means that this profile will be activated if no other profile is active in the build. Therefore, the specific activation of any profile will cause the reason for deactivating this one.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -