I'm trying to configure Apache Archiva, Maven and Spring Tool Suite. I have installed Apache Archiva in a Debian Server. At this moment it's running and I can access it using the webapp.
I have installed Maven3, and Spring Tool Suite but I can't compile the project. It's my first time setting up a repository and configuring maven for that.
Basically I want a way to make versions and "store" my snapshots and releases.
On my settings.xml I have the following:
<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>
Than I created a Maven Project with the following .pom file:
<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>
Unfortunately STS says the following:
"Error resolving version for plugin 'org.apache.maven.plugins:maven-compiler-plugin' from the repositories [local (C:\Users\XXXX.m2\repository), archiva.central (http://MY_IP_ADDRESS:MY_PORT/archiva/repository/internal)]: Plugin not found in any plugin repository"