forked from mojohaus/versions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves mojohaus#899: Corrected the invocation of Resolver to retrie…
…ve the timestamped snapshot version; added unit tests for LockSnapshotsMojo for the case when no timestamped versions are found
- Loading branch information
Showing
9 changed files
with
312 additions
and
54 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
versions-maven-plugin/src/it-repo/test/lock/dummy-api2-1.0.0-20230106172106-1.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,26 @@ | ||
<!-- | ||
~ Copyright MojoHaus and Contributors | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<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>test.lock</groupId> | ||
<artifactId>dummy-api2</artifactId> | ||
<version>1.0.0-20230106172106-1</version> | ||
<packaging>pom</packaging> | ||
|
||
</project> |
26 changes: 26 additions & 0 deletions
26
versions-maven-plugin/src/it-repo/test/lock/dummy-api2-1.0.0-SNAPSHOT.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,26 @@ | ||
<!-- | ||
~ Copyright MojoHaus and Contributors | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
|
||
<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>test.lock</groupId> | ||
<artifactId>dummy-api2</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<packaging>pom</packaging> | ||
|
||
</project> |
19 changes: 19 additions & 0 deletions
19
versions-maven-plugin/src/it-repo/test/lock/dummy-api2/1.0.0-SNAPSHOT/maven-metadata.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 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<metadata> | ||
<groupId>test.lock</groupId> | ||
<artifactId>dummy-api2</artifactId> | ||
<versioning> | ||
<lastUpdated>20230106172106</lastUpdated> | ||
<snapshot> | ||
<buildNumber>1</buildNumber> | ||
</snapshot> | ||
<snapshotVersions> | ||
<snapshotVersion> | ||
<extension>pom</extension> | ||
<value>1.0.0-SNAPSHOT</value> | ||
<updated>20230106172106</updated> | ||
</snapshotVersion> | ||
</snapshotVersions> | ||
</versioning> | ||
<version>1.0.0-SNAPSHOT</version> | ||
</metadata> |
19 changes: 19 additions & 0 deletions
19
versions-maven-plugin/src/it-repo/test/lock/maven-metadata.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 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<metadata> | ||
<groupId>test.lock</groupId> | ||
<artifactId>dummy-api2</artifactId> | ||
<versioning> | ||
<lastUpdated>20230106172106</lastUpdated> | ||
<snapshot> | ||
<buildNumber>1</buildNumber> | ||
</snapshot> | ||
<snapshotVersions> | ||
<snapshotVersion> | ||
<extension>pom</extension> | ||
<value>1.0.0-SNAPSHOT</value> | ||
<updated>20230106172106</updated> | ||
</snapshotVersion> | ||
</snapshotVersions> | ||
</versioning> | ||
<version>1.0.0-SNAPSHOT</version> | ||
</metadata> |
1 change: 1 addition & 0 deletions
1
versions-maven-plugin/src/it/it-lock-snapshots-junit5/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 = ${project.groupId}:${project.artifactId}:${project.version}:lock-snapshots |
20 changes: 20 additions & 0 deletions
20
versions-maven-plugin/src/it/it-lock-snapshots-junit5/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,20 @@ | ||
<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-lock-snapshots-001</artifactId> | ||
<version>1.0</version> | ||
<packaging>pom</packaging> | ||
|
||
<dependencies> | ||
<dependency> | ||
<!-- Can't get mrm-maven-plugin to provide maven-metadata --> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>5.0-SNAPSHOT</version> | ||
<type>pom</type> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
3 changes: 3 additions & 0 deletions
3
versions-maven-plugin/src/it/it-lock-snapshots-junit5/verify.groovy
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,3 @@ | ||
def project = new XmlSlurper().parse( new File( basedir, 'pom.xml' ) ) | ||
|
||
assert !( project.dependencies.dependency.version =~ /-SNAPSHOT/ ) |
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
Oops, something went wrong.