-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get rid of ArtifactRepository - ${localRepository}
- Loading branch information
1 parent
0bdc352
commit 3361a6f
Showing
9 changed files
with
162 additions
and
40 deletions.
There are no files selected for viewing
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,2 @@ | ||
invoker.goals = validate | ||
invoker.settingsFile = src/it/released-version-existing-snapshot/settings-maven-oss-snapshot.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,32 @@ | ||
<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/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<!-- We use artifact which contains released and snapshot versions. --> | ||
|
||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>versions-maven-plugin</artifactId> | ||
<version>1.0.0-SNAPHOST</version> | ||
<name>build-helper-maven-plugin-released-version-it</name> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>@project.artifactId@</artifactId> | ||
<version>@project.version@</version> | ||
<executions> | ||
<execution> | ||
<id>released-version</id> | ||
<goals> | ||
<goal>released-version</goal> | ||
</goals> | ||
<configuration> | ||
<propertyPrefix>myReleasedVersion</propertyPrefix> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
29 changes: 29 additions & 0 deletions
29
src/it/released-version-existing-snapshot/settings-maven-oss-snapshot.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,29 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> | ||
|
||
<profiles> | ||
<profile> | ||
<id>default</id> | ||
<!-- use oss repo which provide release and snapshot artifacts --> | ||
<repositories> | ||
<repository> | ||
<id>oss-snap</id> | ||
<url>https://oss.sonatype.org/content/groups/public/</url> | ||
<releases> | ||
<enabled>false</enabled> | ||
<checksumPolicy>fail</checksumPolicy> | ||
</releases> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
<checksumPolicy>fail</checksumPolicy> | ||
</snapshots> | ||
</repository> | ||
</repositories> | ||
</profile> | ||
</profiles> | ||
<activeProfiles> | ||
<activeProfile>default</activeProfile> | ||
</activeProfiles> | ||
</settings> |
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,11 @@ | ||
File file = new File( basedir, "build.log" ); | ||
assert file.exists(); | ||
|
||
String text = file.getText("utf-8"); | ||
|
||
// we have SNAPSHOT on list | ||
assert text.matches('(?ms)^.*Resolved versions: .*-SNAPSHOT.*$') | ||
|
||
// but released version is not a SNAPSHOT | ||
assert text.matches( '(?ms)^.*Released version: .*$') | ||
assert !text.matches( '(?ms)^.*Released 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# first install something | ||
invoker.goals.1 = install | ||
|
||
# next try to delete | ||
invoker.goals.2 = package |
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 @@ | ||
<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/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>remove-project-artifact-it</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>@project.artifactId@</artifactId> | ||
<version>@project.version@</version> | ||
<executions> | ||
<execution> | ||
<id>released-version</id> | ||
<goals> | ||
<goal>remove-project-artifact</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
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,8 @@ | ||
File file = new File(basedir, "build.log"); | ||
assert file.exists(); | ||
|
||
String text = file.getText("utf-8"); | ||
|
||
def FS = File.separator | ||
|
||
assert 2 == text.count("org${FS}codehaus${FS}mojo${FS}remove-project-artifact-it removed.") : 'removed log should be present twice' |
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
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