我正在尝试配置Apache Archiva,Maven和Spring Tool Suite。 我在Debian服务器上安装了Apache Archiva。此时它正在运行,我可以使用webapp访问它。
我已经安装了Maven3和Spring Tool Suite但我无法编译该项目。这是我第一次设置存储库并为此配置maven。
基本上我想要一种方法来制作版本和"存储"我的快照和发布。
在我的settings.xml上,我有以下内容:
<settings xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>archiva.central</id>
<url>http://MY_IP_ADDRESS:MY_PORT/archiva/repository/internal</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>
我使用以下.pom文件创建了一个Maven项目:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>pt.XX.YYY</groupId>
<artifactId>my-project-name</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<scm>
<connection>scm:git:ssh://XXXX@bitbucket.org/XXXX/my-project-name.git</connection>
<developerConnection>scm:git:ssh://XXXX@bitbucket.org/XXXX/my-project-name.git</developerConnection>
<url>https://bitbucket.org/XXXX/my-project-name</url>
</scm>
<properties>
<project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
<javaVersion>1.8</javaVersion>
</properties>
<distributionManagement>
<snapshotRepository>
<id>snapshots</id>
<name>Snapshots Repo</name>
<url>http://MY_IP_ADDRESS:MY_PORT/archiva/repository/snapshots</url>
</snapshotRepository>
<repository>
<id>internal</id>
<name>Releases</name>
<url>http://MY_IP_ADDRESS:MY_PORT/archiva/repository/internal</url>
</repository>
</distributionManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${javaVersion}</source>
<target>${javaVersion}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
<inherited>true</inherited>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
<inherited>true</inherited>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<goals>deploy</goals>
</configuration>
<inherited>true</inherited>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
不幸的是,STS说:
&#34;解决插件的版本错误&#39; org.apache.maven.plugins:maven-compiler-plugin&#39;来自存储库[local(C:\ Users \ XXXX.m2 \ repository),archiva.central(http://MY_IP_ADDRESS:MY_PORT/archiva/repository/internal)]:插件在任何插件库中找不到&#34;