が、私はそれを働いて、ここで詳細は以下のとおりです。
まず、ファイルあなたは、組み込みのアセンブリ・ディスクリプタジャー-との依存関係を使用する場合は含まれまたは除外を指定する方法はありません。
アセンブリプラグインのマニュアルには、サンプルjar-with-dependencies descriptor hereが記載されています。
私のプロジェクトディレクトリのexec-jar.xmlというファイルにそのディスクリプタをコピーして貼り付けました。次に、pomで、そのディスクリプタを参照するようにアセンブリプラグインを変更しました。以下はその抜粋です:ディスクリプタの
<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>
そのビットは、exec-jar.xml記述子のライフサイクルのパッケージ段階にアセンブリを結合し、および参照。そのパッケージを実行することで、jarファイルがあらかじめ定義された記述子と同じように構築されたことが確認されました。
したがって、exec-jar.xmlを変更して、Springファイルと競合するCXFファイルを除外します。ここでそれを達成した私のアセンブリ記述子は次のとおりです。
<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のプラグインでサポートされています。上記の私のpomファイルの抜粋では、作成時に最新のmaven-assembly-pluginバージョン2.2-beta-3を指定しています。
これは、実行可能なjarを正常に構築しました。Springには、アプリケーションの初期化に必要なすべてのハンドラとスキーマが用意されていました。
同じことが「spring.tooling」ファイルで発生しますが、その名前から、私は、彼らが実行時に使用されていない推測しています。 –