मैंने निष्पादन-मैवेन-प्लगइन के साथ दो निष्पादन के साथ समान मुकदमा हल किया है, एक निर्देशिका को ज़िप करता है और अन्य को मेरे मामले में तीसरे पक्ष में भंडार में बिन क्लासिफायर के साथ तैनात किया जाता है। तो मैंने ज़िप फ़ाइल में सभी यूनिक्स अनुमतियों को सहेजा।
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>1</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>zip</executable>
<workingDirectory>${basedir}</workingDirectory>
<arguments>
<argument>-r</argument>
<argument>target/com.example.test.ext.zip</argument>
<argument>Out</argument>
<argument>-x</argument>
<argument>*.svn*</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>2</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>mvn</executable>
<workingDirectory>${basedir}/target</workingDirectory>
<arguments>
<argument>deploy:deploy-file</argument>
<argument>-Dfile=com.example.test.ext.zip</argument>
<argument>-Dclassifier=bin</argument>
<argument>-DgroupId=com.example</argument>
<argument>-DartifactId=test</argument>
<argument>-Dversion=1.0</argument>
<argument>-Dpackaging=zip</argument>
<argument>-DrepositoryId=releases</argument>
<argument>-Durl=http://nexus..../nexus/content/repositories/thirdparty
</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
आप एक depenency के रूप में परिणाम का उपयोग करते हैं न "बिन" वर्गीकारक भूल:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>unpack1</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.example</groupId>
<artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
<classifier>bin</classifier>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>output</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
यह भी अधिक गन्दा हो जाता है क्योंकि आपको खिड़कियों पर विचार करने, प्रोफ़ाइल जोड़ने आदि की आवश्यकता होती है। –