0
map reduceコードといくつかのコマンドラインツールの両方を含むjarファイルがあります。mvn depedencyプラグインとHadoop
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/classes/lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<excludeScope>provided</excludeScope>
</configuration>
</execution>
<execution>
<id>build-classpath</id>
<phase>generate-sources</phase>
<goals>
<goal>build-classpath</goal>
</goals>
<configuration>
configure the plugin here
</configuration>
</execution>
</executions>
</plugin>
私は私が様々な実行したときに、私のjarファイルは、libディレクトリを使用できるようにするには期待していた:私は、Mavenの依存関係のプラグインを使用して、私のjarファイル内のlib directoyにすべての私の依存関係をパッケージ化しています、私の依存関係を配布する
myJar.jar org.mycompany.MyClass
-cpコマンドラインJavaからのクラスしかし、これはMANIFEST.MF
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>./lib/</classpathPrefix>
<mainClass>com.mycompany.MainClass</mainClass>
</manifest>
</archive>
</configuration>
を操作するために私の最善の努力にもかかわらず動作するように見えません。
maven-assembly-pluginを使用せずにこれを行う方法はありますか?
「なぜmaven-assembly-pluginを使用しないのですか? –
私はすでにこれを行うためにアセンブリプラグインを使用する方法を知っています。私は欠けている代替品があるかどうかを知りたいだけです。 –