我现在正在修改一个码头的图像。docker镜像创建了一个允许运行某些实验的服务器。为了使其功能符合我的目的,我必须更改一个包含在依赖jar文件中的类。在pom.xml文件中,这样的jar依赖项与其依赖项一起从结点存储库中下载。我假设一种可能的解决方案是在结点存储库(localhost)中创建一个存储库,然后上载jar文件及其依赖项,对吗?不管怎么说,我都不知道我该怎么做。下面是关于它的代码。
有人能帮我起来吗?
<repositories>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.liveontologies</groupId>
<artifactId>pinpointing-experiments</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
发布于 2020-01-23 11:31:57
是的,你在正确的轨道上。您所询问的内容在maven中称为“部署”。因此,要部署您的jar,通常需要:
maven-deploy-plugin
添加到您的pom让您的代码创建您的jar
两个很好的资源,有很多关于步骤的细节和添加到你的pom中的确切内容。
https://www.baeldung.com/maven-deploy-nexus
https://maven.apache.org/guides/mini/guide-3rd-party-jars-remote.html
https://stackoverflow.com/questions/59877360
复制