コマンドラインで渡されたプロファイルに基づいて、プロジェクトをパッケージ化して特定のディレクトリに出力するには、Maven が必要です。私はそれを行う方法を見つけることができないようです。
編集: または、1 つが選択されている場合は、1 つのディレクトリに出力します。使用されていない場合は、デフォルトに出力します。
ありがとう!
必要に応じて、プロファイルの Maven プロジェクト プロパティをオーバーライドできます
<!-- in your profile -->
.
.
.
<build>
<project.build.directory>foo</project.build.directory>
</build>
.
.
.
<profiles>
<profile>
<id>diffoutputdir</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<outputDirectory>${myoutputdir}</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>