maven


Jenkins and Archiva not using SNAPSHOTS for Spring Boot


I have a Jenkins job that simply pulls trunk from a small project.
99.9% of the time, we have no issues at all. However, this one project uses spring-boot-starter-parent as its parent and the version is 2.0.0.BUILD-SNAPSHOT.
Normally we don't use snapshot releases for external dependencies. However, it was deemed necessary for various reasons I won't go into.
Also, we use Archiva to host our own local repos, cached repos, etc.
Now, I can build the project just fine locally (using IntelliJ). But, when I attempt to build in Jenkins, I get the following error:
Failed to transfer Could not find metadata org.springframework.boot:spring-boot-starter-parent:2.0.0.BUILD-SNAPSHOT/maven-metadata.xml in vaadin-addons (http://maven.vaadin.com/vaadin-addons)
Failed to transfer Could not find metadata org.springframework.boot:spring-boot-starter-parent:2.0.0.BUILD-SNAPSHOT/maven-metadata.xml in archiva.default (http://devbox-01:9090/repository/internal)
Failed to transfer Could not find artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.0.BUILD-SNAPSHOT in archiva.default (http://devbox-01:9090/repository/internal)
Failed to transfer Could not find artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.0.BUILD-SNAPSHOT in vaadin-addons (http://maven.vaadin.com/vaadin-addons)
ERROR: Failed to parse POMs
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Could not find artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.0.BUILD-SNAPSHOT in archiva.default (http://devbox-01:9090/repository/internal) and 'parent.relativePath' points at no local POM # line 14, column 13
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:364)
at hudson.maven.MavenEmbedder.buildProjects(MavenEmbedder.java:361)
at hudson.maven.MavenEmbedder.readProjects(MavenEmbedder.java:331)
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1291)
at hudson.maven.MavenModuleSetBuild$PomParser.invoke(MavenModuleSetBuild.java:1088)
at hudson.FilePath.act(FilePath.java:990)
at hudson.FilePath.act(FilePath.java:968)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.parsePoms(MavenModuleSetBuild.java:950)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:677)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Finished: FAILURE
Looking in our Archiva repos, I can only see RELEASE dependencies up to 1.5.1.RELEASE for spring-boot-starter-parent.
Our Jenkins maven setup is as follows:
Root POM: pom.xml
Goals and Options: -X -e clean deploy -Ptest
In our project, we use profiles and the test profile is a follows:
<profile>
<id>test</id>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
<filters>
<filter>src/main/filters/test.properties</filter>
</filters>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<filters>
<filter>src/main/filters/test.properties</filter>
</filters>
<webResources>
<resource>
<directory>src/main/webapp/META-INF</directory>
<filtering>true</filtering>
<targetPath>META-INF</targetPath>
<includes>
<include>context.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/webapp</directory>
<filtering>true</filtering>
<includes>
<include>*.html</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
Finally, the relevant parts of our pom.xml are:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<distributionManagement>
<repository>
<id>company-releases</id>
<layout>default</layout>
<url>http://devbox-01:9090/repository/internal</url>
</repository>
<snapshotRepository>
<id>company-snapshots</id>
<layout>default</layout>
<url>http://devbox-01:9090/repository/snapshots</url>
</snapshotRepository>
</distributionManagement>
<repositories>
<repository>
<id>company-releases</id>
<layout>default</layout>
<url>http://devbox-01:9090/repository/internal</url>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/libs-release</url>
</repository>
<repository>
<id>org.jboss.repository.releases</id>
<name>JBoss Maven Release Repository</name>
<url>https://repository.jboss.org/nexus/content/repositories/releases</url>
</repository>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
<repository>
<id>com-vaadin-prereleases</id>
<url>https://maven.vaadin.com/vaadin-prereleases</url>
</repository>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
Thanks for any help!

Related Links

TestNG: Is it possible to break test Suites to run single parallel test Suites
CAS Server 5.0.x : Add new pages or features
How does Embed-Dependency from maven-bundle-plugin work in these cases?
Replace artifacts paths in TeamCity
Is it possible to build a apt-get cache for to be installed packages
Failed to deploy artifacts: Could not find artifact
Spring jpa BeanCreationException : Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument;
Exclude files from a submodule using maven is not working
Cannot generate surefire report for Soap UI suite when a test case fails : Maven
delete target directory in maven during mvn clean phase
Nebula, Gradle, Maven, Publishing can't find the artifact file
Selenium WebDriver. Reciving error: Failed to connect to binary FirefoxBinary(C:\Program Files (x86)\Mozilla Firefox\firefox.exe) on port 7055
eclipse servers view,why spring-web.jar can show
Maven - Wrong folder structure
Fail maven build based on script [closed]
How to set classpath for properties declared under property set in maven

Categories

HOME
oracle11g
path-finding
nullpointerexception
spagobi
frameworks
jpeg
jxls
ckeditor
windows-server
mouse
node-notifier
slick-slider
izpack
u-sql
zend-framework3
circular-dependency
gz
fortumo
saxon
jprofiler
vlsi
sparse-matrix
msys2
dbclient
gsmcomm
lightswitch-2013
tinymce-4
key-value-observing
jspresso
code-contracts
bytecode-manipulation
main
mixture-model
serverside-rendering
vapor
eclipse-scout
sql-server-agent
texmaker
botbuilder
ibpy
keydown
bootstrap-dialog
businessworks
thin
user-accounts
atomicity
jquery-validate
python-c-api
winscp-net
typed-lambda-calculus
np-complete
memory-alignment
objective-c-swift-bridge
android-fonts
httplistener
bonobo
mathematica-frontend
impresspages
prettytensor
ubuntu-10.04
bluemix-app-scan
tmuxinator
spidermonkey
jqgrid-formatter
computer-algebra-systems
kcachegrind
ibaction
arcanist
sniffer
proj4js
bridge.net
pick
comexception
rtmfp
flexmojos
uv-mapping
type-equivalence
ocunit
nsnetservice
cisco-jtapi
ticoredatasync
jquery-ui-layout
asyncfileupload
bigcouch
xtype
calling-convention
winbugs14
sql-server-profiler
asp.net-mvc-areas
sproutcore-2
revisions
getresponsestream
castle-monorail
rescale
substrings
exchange-server-2003
3gp
rtml

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App