मैं इसे बाहर काम किया है, और यहाँ हैं विवरण:
सबसे पहले, कोई रास्ता नहीं फ़ाइल निर्दिष्ट करने के लिए भी शामिल है या शामिल नहीं है कि अगर आप में निर्मित विधानसभा वर्णनकर्ता जार-साथ-निर्भरता का उपयोग करें।
असेंबली प्लग-इन दस्तावेज़ नमूना jar-with-dependencies descriptor here देता है।
मैंने अपनी प्रोजेक्ट निर्देशिका में exec-jar.xml नामक फ़ाइल में उस वर्णनकर्ता की प्रतिलिपि बनाई और चिपकाया। फिर पोम में, मैंने डिस्क्रिप्टर को संदर्भित करने के लिए असेंबली प्लग-इन बदल दिया। यहाँ अंश है:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-3</version>
<configuration>
<descriptors>
<descriptor>exec-jar.xml</descriptor>
</descriptors>
<archive>
<manifest>
<mainClass>com.package.MyMainClass</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
वर्णनकर्ता का वह थोड़ा जीवन चक्र के पैकेज चरण के लिए विधानसभा बांधता है, और संदर्भ कार्यकारी-jar.xml वर्णनकर्ता। उस पैकेज को करने से पुष्टि हुई कि जार को पूर्वनिर्धारित वर्णनकर्ता के साथ बनाया गया था।
तो फिर यह वसंत फ़ाइलों के साथ संघर्ष करने वाली सीएक्सएफ फाइलों को बाहर करने के लिए exec-jar.xml को संशोधित करने का मामला बन जाता है। यहां मेरा असेंबली डिस्क्रिप्टर है जो पूरा करता है:
<assembly>
<id>jar-with-dependencies</id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
<dependencySet>
<unpack>true</unpack>
<unpackOptions>
<excludes>
<exclude>cxf*/META-INF/spring.handlers</exclude>
<exclude>cxf*/META-INF/spring.schemas</exclude>
</excludes>
</unpackOptions>
<scope>runtime</scope>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>${project.build.outputDirectory}</directory>
</fileSet>
</fileSets>
</assembly>
अब यहां रगड़ है। यदि आप वर्तमान में जारी किए गए असेंबली प्लग-इन, संस्करण 2.1 के साथ ऐसा करते हैं, तो यह टैग पर "अप्रत्याशित" के रूप में विफल हो जाएगा। टैग प्लग-इन के रिलीज़ संस्करण 2.2 में समर्थित है। उपरोक्त मेरे पोम फ़ाइल अंश में नोट, मैं मैवेन-असेंबली-प्लगइन संस्करण 2.2-बीटा -3 निर्दिष्ट करता हूं जो लेखन के समय नवीनतम था।
इसने सफलतापूर्वक निष्पादन योग्य जार बनाया, और वसंत में मेरे ऐप को शुरू करने के लिए आवश्यक सभी हैंडलर और स्कीमा थे।
एक ही बात "spring.tooling" फाइलों के साथ होता है, लेकिन उनके नाम से मेरा अनुमान है कि वे क्रम में इस्तेमाल किया नहीं कर रहे हैं। –