0

I have a relatively complex multi module java project

|PARENT
|pom.xml
|-submodule1
|-pom.xml
|--api
|--pom.xml
|--impl
|--pom.xml
|--model
|--pom.xml
|-submodule2
|...

and now I want my jenkins to create a release with

release:prepare -Darguments="-Dmaven.javadoc.skip=true -Dmaven.test.skip=true" --batch-mode -Dtag=$RELEASE_VERSION  -DreleaseVersion=$RELEASE_VERSION -DdevelopmentVersion=$DEVELOPE_VERSION

and then perform with

release:perform -Darguments="-Dmaven.javadoc.skip=true -Dmaven.test.skip=true" --batch-mode -Dtag=$RELEASE_VERSION  -DreleaseVersion=$RELEASE_VERSION -DdevelopmentVersion=$DEVELOPE_VERSION

Now the problem is that i have a submodule which contains integration tests and functional tests like restassured tests. Maven release plugin is looking for

Failed to execute goal on project project-workflow: 
  Could not resolve dependencies for project 
  com.project.service:service-workflow:jar:1.0.2: 
  Could not find artifact com.project.service:service-service:service-client:jar:tests:1.0.2
  in public (http://ournexus.com:8081/nexus/content/groups/public)

The maven declaration in workflow module is

<dependency>
  <groupId>${project.groupId}</groupId>
  <artifactId>sevice-valuation-client</artifactId>
  <type>test-jar</type>
  <scope>test</scope>
</dependency>

Do I need to deploy those testsources to nexus or can i somehow skip this kind of dependency ?

Maevy
  • 261
  • 4
  • 24
  • Does this help? https://stackoverflow.com/questions/8685100/how-can-i-get-maven-release-plugin-to-skip-my-tests – vikingsteve Feb 07 '18 at 14:06

1 Answers1

0

Ok the problem was that -Dmaven.test.skip=true doesn't compile testsources therefore the jar simply didn't existed once I removed it the process worked flawlessly

Maevy
  • 261
  • 4
  • 24