-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve speed of versions:resolve-ranges in case parents contain many…
… version properties - fix #1121
- Loading branch information
1 parent
5b0aa16
commit 9dc5e0d
Showing
5 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
versions-maven-plugin/src/it-repo/it-resolve-ranges-issue-1121-parent.pom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-resolve-ranges-issue-1121-parent</artifactId> | ||
<version>1.0</version> | ||
<packaging>pom</packaging> | ||
|
||
<properties> | ||
<dummy.api.version>1.1.1</dummy.api.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>localhost</groupId> | ||
<artifactId>dummy-api</artifactId> | ||
<version>${dummy.api.version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
1 change: 1 addition & 0 deletions
1
versions-maven-plugin/src/it/it-resolve-ranges-issue-1121/invoker.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
invoker.goals=-X ${project.groupId}:${project.artifactId}:${project.version}:resolve-ranges |
19 changes: 19 additions & 0 deletions
19
versions-maven-plugin/src/it/it-resolve-ranges-issue-1121/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<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> | ||
|
||
<parent> | ||
<groupId>localhost</groupId> | ||
<artifactId>it-resolve-ranges-issue-1121-parent</artifactId> | ||
<version>1.0</version> | ||
</parent> | ||
<artifactId>it-resolve-ranges-issues-1121</artifactId> | ||
<packaging>pom</packaging> | ||
<name>resolve-ranges IT issue 1121</name> | ||
|
||
<description>Test that resolve-ranges recognizes a property that overrides a property in its parent that is used as a version itself</description> | ||
|
||
<properties> | ||
<dummy.api.version>[1,3.0)</dummy.api.version> | ||
</properties> | ||
</project> |
21 changes: 21 additions & 0 deletions
21
versions-maven-plugin/src/it/it-resolve-ranges-issue-1121/verify.bsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import java.io.*; | ||
import org.codehaus.plexus.util.FileUtils; | ||
|
||
try | ||
{ | ||
File file = new File( basedir, "pom.xml" ); | ||
String buf = FileUtils.fileRead( file, "UTF-8" ); | ||
|
||
if ( buf.indexOf( "<dummy.api.version>2.1</dummy.api.version>" ) < 0 ) | ||
{ | ||
System.err.println( "Version of dummy-api not resolved" ); | ||
return false; | ||
} | ||
} | ||
catch( Throwable t ) | ||
{ | ||
t.printStackTrace(); | ||
return false; | ||
} | ||
|
||
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters