pom.xml - In maven-dependency-plugin how to unpack only if I pass him parameter? -


does knows how can unpack artifact terms?

meaning giving him boolean parameter determine whether or not unpack artifact.

i tried use skip flag didn't work.

<build>         <plugins>             <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-dependency-plugin</artifactid>                 <version>2.9</version>                 <executions>                   <execution>                     <id>get-rpm</id>                     <phase>compile</phase>                     <goals>                       <goal>copy</goal>                     </goals>                     <configuration>                       <artifactitems>                         <artifactitem>                           <groupid>com.xx.xxx</groupid>                           <artifactid>xxx-onprem</artifactid>                           <version>${build_number}</version>                           <type>rpm</type>                           <classifier>rpm</classifier>                           <overwrite>true</overwrite>                           <outputdirectory>${project.build.directory}</outputdirectory>                           <destfilename>${package_name}</destfilename>                         </artifactitem>                       </artifactitems>                       <!-- other configurations here -->                     </configuration>                   </execution>                   <execution>                     <id>get-third-parties</id>                     <phase>compile</phase>                     <goals>                       <goal>unpack</goal>                     </goals>                     <configuration>                       <artifactitems>                         <artifactitem>                           <groupid>com.xx.xxx</groupid>                           <artifactid>thirdparties-sources</artifactid>                           <version>${third-parties.version}</version>                           <type>zip</type>                           <skip>true</skip>                           <overwrite>true</overwrite>                           <outputdirectory>${project.build.directory}/3rd-parties</outputdirectory>                         </artifactitem>                       </artifactitems>                       <!-- other configurations here -->                     </configuration>                   </execution> 

so figured out, have put skip flag in right place, i've put right after configuration.

<build>         <plugins>             <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-dependency-plugin</artifactid>                 <version>2.9</version>                 <executions>                   <execution>                     <id>get-rpm</id>                     <phase>compile</phase>                     <goals>                       <goal>copy</goal>                     </goals>                     <configuration>                       <artifactitems>                         <artifactitem>                           <groupid>com.xx.xxx</groupid>                           <artifactid>agm-onprem</artifactid>                           <version>${build_number}</version>                           <type>rpm</type>                           <classifier>rpm</classifier>                           <overwrite>true</overwrite>                           <outputdirectory>${project.build.directory}</outputdirectory>                           <destfilename>${package_name}</destfilename>                         </artifactitem>                       </artifactitems>                       <!-- other configurations here -->                     </configuration>                   </execution>                   <execution>                     <id>get-third-parties</id>                     <phase>compile</phase>                     <goals>                       <goal>unpack</goal>                     </goals>                     <configuration>                       <skip>${skip_3rd}</skip>                       <artifactitems>                         <artifactitem>                           <groupid>com.xx.xxx</groupid>                           <artifactid>thirdparties-sources</artifactid>                           <version>${third-parties.version}</version>                           <type>zip</type>                           <overwrite>true</overwrite>                           <outputdirectory>${project.build.directory}/3rd-parties</outputdirectory>                         </artifactitem>                       </artifactitems>                       <!-- other configurations here -->                     </configuration>                   </execution> 

Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - How to Hide Date Menu from Datepicker in yii2 -