java - What is the best way to avoid maven-jar? -
I'm using a different plugin (Anti-4 Clops) to issue my files to the Maven-jar plugin What is the best way to avoid executing?
- I received
& lt; Plugin & gt; Maven-jar-plugin & lt; / Plugin & gt; Tried to remove
- I tried
& lt; Exclusion & gt; ** / * & lt;
- I received
& lt; Skip & gt; True & lt; / Skip & gt;
Did not do any work
in Maven 3.0.x (I tried 3.0.2) You can see the maven-jar- Plugin can disable
execution by default-jar
as a new step, as Unfortunately it does not work in 2.2.1, but you can call it an optional & lt; Last name and gt;
and & lt; Classifier & gt; Setting
can prevent you from interfering with your own jar; default-jar
execution; It will still make a jar, but it will be installed as a secondary artwork for the project and a person you have created will not be overwritten. Here is an example that should work in both Maven 2 and Maven 3: & lt; Project & gt; & Lt; ModelVersion & gt; 4.0.0 & lt; / ModelVersion & gt; & Lt; Group & gt; Trial & lt; / Group & gt; & Lt; ArtifactId & gt; Trial & lt; / ArtifactId> & Lt; Version & gt; 0.1-snapshot and lt; / Edition & gt; & Lt; Construction & gt; & Lt; Plugins & gt; & Lt; Plugin & gt; & Lt; ArtifactId & gt; Maven-Jar-plugin & lt; / ArtifactId> & Lt; Hanging & gt; & Lt; Execution & gt; & Lt; ID & gt; Default-jar & lt; / Id & gt; & Lt; Step & gt; Never & lt; / Step & gt; & Lt; Configuration & gt; & Lt; FinalName & gt; Unwanted & lt; / FinalName & gt; & Lt; Classifier & gt; Unwanted & lt; / Classifier & gt; & Lt; / Configuration & gt; & Lt; / Execution & gt; & Lt; / Hanging & gt; & Lt; / Plugin & gt; & Lt; / Plugins & gt; & Lt; / Create & gt; & Lt; / Project & gt;
Once you disable maven-jar-plugin
, maven-install-plugin
can also give you trouble In Maven 3 it can be disabled as maven-jar-plugin
: bind default-install
as a redundant step. However, in Maven 2, the maven-install-plugin
requires that the target / classes
directory is present, and it will install the dummy jar when no primary artifact exists .
Comments
Post a Comment