Я могу развернуть jar
, используя следующее в моем pom.xml
и запуске mvn deploy
:
<distributionManagement>
<repository>
<id>releases</id>
<url>http://${host}:8081/nexus/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>Internal Snapshots</name>
<url>http://${host}:8081/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
И я могу создать исполняемый файл jar-with-dependencies
, используя следующее:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>create-executable-jar</id>
<phase>deploy</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>my.company.app.Main</mainClass>
</manifest>
</archive>
</configuration>
</execution>
</executions>
</plugin>
Проблема в том, что я не знаю, как сшить их вместе, чтобы развернуть исполняемый файл jar
в моем репозитории Maven. Я действительно не знаю, достигнут ли это новым плагином или добавлением цели или другого шага к существующему плагину сборки.