Skip to content

Commit

Permalink
Added a mojohaus#134 test for UseNextReleasesMojo and UseNextSnapshot…
Browse files Browse the repository at this point in the history
…sMojo
  • Loading branch information
andrzejj0 committed Nov 11, 2022
1 parent 6394839 commit 444e46a
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:use-next-releases
invoker.mavenOpts = -DprocessDependencyManagement=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<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>localhost</groupId>
<artifactId>it-use-releases-issue-134-001</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<name>Check if boms are upated from snapshots</name>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>localhost</groupId>
<artifactId>dummy-bom2</artifactId>
<version>1.0.0</version>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
def project = new XmlSlurper()
.parse( new File( basedir, 'pom.xml' ) )

assert project.dependencyManagement.dependencies.'*'.size() == 1
assert project.dependencyManagement.dependencies.dependency.version == '1.1.0'
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:use-next-snapshots
invoker.mavenOpts = -DprocessDependencyManagement=true -DallowMajorUpdates=true -DallowMinorUpdates=true -DallowIncrementalUpdates=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<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>localhost</groupId>
<artifactId>it-use-releases-issue-134-001</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<name>Check if boms are upated from snapshots</name>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>localhost</groupId>
<artifactId>dummy-bom2</artifactId>
<version>0.9.0</version>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
def project = new XmlSlurper()
.parse( new File( basedir, 'pom.xml' ) )

assert project.dependencyManagement.dependencies.'*'.size() == 1
assert project.dependencyManagement.dependencies.dependency.version == '1.0.0-SNAPSHOT'

0 comments on commit 444e46a

Please sign in to comment.