Skip to content

Commit

Permalink
Added a mojohaus#134 test for UseLatestReleases
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzejj0 committed Nov 11, 2022
1 parent b5af0f2 commit 4a1d250
Show file tree
Hide file tree
Showing 3 changed files with 29 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-latest-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 == '2.0.0'

0 comments on commit 4a1d250

Please sign in to comment.