Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
プロファイルとしてのみ作成されたjarファイルがあります。<dependency/>ブロック内でそれを参照するにはどうすればよいですか?groupIdがcom.mycompany、artifactIdがtest-jar、バージョンが2.0、profileがcustomBuildであるとします。
<dependency/>
ビルドしているプロジェクトから run を実行します。mvn installこれにより、jar が.m2ディレクトリにローカルにインストールされます。次に、それを通常の依存関係として参照できます
mvn install
.m2
<dependency> <groupId>com.mycompany</groupId> <artifactId>test-jar</artifactId> <version>2.0</version> </dependency>
依存プロジェクトで。