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

JAX-WS with Spring integration with Jetty server
POM for 'log4j:log4j:pom:1.2.15:compile' is invalid
Adding a set of dependencies in maven
Is it possible to get Maven dependencies in a property at run-time?
Maven Repository
Correct way to maintain a company-wide POM
How to do websphere 7 deployment automation using maven?
Deploy war in multiple module project on maven
Bad version number in .class file
Getting ReportNG to generate its output in Maven's “site”?
Dbdeploy maven plugin not finding changelog table
java.lang.NullPointerException executing accelo with maven
Best way to organize and copy resources in this Maven PHP project
How to set directoryMode Permissions for folder in assembly descriptor?
dbunit maven plugin ordered set to true seemingly ignores tables
Maven war-inplace: clean classes and lib folder

Categories

HOME
openlayers
reflection
mockito
relay
cakephp-2.5
fsm
opengl-es-2.0
azure-media-services
add
basic
slick-slider
communication
php-7.1
jsprit
clojurescript
graphlab
tostring
google-static-maps
viewport
textfield
emulator
plunker
ml
functional-testing
claims-based-identity
android-widget
fopen
web-api-testing
fluentvalidation
publish
atlassian-crucible
primitive
microsoft-chart-controls
sql-server-2012-express
directx-10
ecto
key-value-observing
data-manipulation
jspresso
gtrendsr
commit
ghost4j
host
serve
serverside-rendering
hue
streamreader
leading-zero
bootstrapper
azure-ml
ruby-on-rails-3.1
midl
logfiles
parentheses
apache-fop
upstart
prolog-setof
sage-one
domain-model
setter
tactic
r-forge
spring-cache
jquery-filter
ableton-live
heidisql
android-textview
bonobo
asp.net-4.5
skobbler-maps
etsy
jwplayer7
blackberry-10
dlna
sdhc
mutation-observers
wordml
content-length
php-ci
ios9.1
c++03
sorl-thumbnail
offloading
mysql-error-1062
farseer
google-cloud-save
buster.js
padarn
orchardcms-1.7
sharp-repository
simba
hamiltonian-cycle
funscript
labwindows
windows-phone-7.1.1
netbeans-6.9
php-parser
qt-jambi
propagation
jmock
createwindow
sortable-tables
xsdobjectgen
backcolor
port-number
zune
msdev
grid-system

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