forked from mojohaus/properties-maven-plugin
-
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.
* Migrate changes to plugin from upstream. Fixes mojohaus#1 This is the change set for the new fork. * Add run-its to release process * Add mojorelease to release process
- Loading branch information
1 parent
d8a48cd
commit bb444e0
Showing
29 changed files
with
6,218 additions
and
58 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 |
---|---|---|
|
@@ -5,3 +5,4 @@ target | |
*.iml | ||
/.idea/ | ||
/.factorypath | ||
.checkstyle |
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
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 @@ | ||
invoker.debug = true | ||
invoker.goals = generate-resources | ||
invoker.buildResult = success |
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,42 @@ | ||
<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> | ||
<parent> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>it-test-parent</artifactId> | ||
<version>@project.version@</version> | ||
<relativePath>../it-test-parent/pom.xml</relativePath> | ||
</parent> | ||
<!-- Build description --> | ||
<artifactId>WriteActiveProfilePropertiesToOutputFile</artifactId> | ||
<packaging>pom</packaging> | ||
<name>${project.artifactId}</name> | ||
|
||
<!-- Build plugins and extensions --> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>properties-maven-plugin</artifactId> | ||
<version>@project.version@</version> | ||
<executions> | ||
<execution> | ||
<phase>validate</phase> | ||
<goals> | ||
<goal>inject-servers</goal> | ||
</goals> | ||
<configuration> | ||
<keyPrefix>server.%s.</keyPrefix> | ||
<!-- | ||
<servers> | ||
<server>sharedservices</server> | ||
</servers> | ||
--> | ||
</configuration> | ||
</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,2 @@ | ||
import junit.framework.Assert; | ||
|
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 @@ | ||
import java.io.*; | ||
import org.codehaus.plexus.util.*; | ||
|
||
if ( !basedir.exists() ) | ||
{ | ||
System.err.println( basedir.getAbsolutePath() + " is missing." ); | ||
return false; | ||
} | ||
|
||
File buildLog = new File( basedir, "build.log" ); | ||
if ( !buildLog.exists() ) | ||
{ | ||
System.err.println( buildLog.getAbsolutePath() + " is missing." ); | ||
return false; | ||
} | ||
|
||
String content = IOUtil.toString( new FileInputStream( buildLog ) ); | ||
String ior = "Using all servers"; | ||
if ( content.contains( ior ) ) | ||
{ | ||
System.err.println( "build.log contains '" + importError + "'" ); | ||
return true; | ||
} | ||
|
||
System.err.println("_------------------------------------ FAIL!"); | ||
return false; |
3 changes: 3 additions & 0 deletions
3
src/it/WriteActiveProfilePropertiesToOutputFile/invoke.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,3 @@ | ||
invoker.debug = true | ||
invoker.goals = generate-resources | ||
invoker.buildResult = success |
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,49 @@ | ||
<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> | ||
<parent> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>it-test-parent</artifactId> | ||
<version>@project.version@</version> | ||
<relativePath>../it-test-parent/pom.xml</relativePath> | ||
</parent> | ||
<!-- Build description --> | ||
<artifactId>WriteActiveProfilePropertiesToOutputFile</artifactId> | ||
<packaging>pom</packaging> | ||
<name>${project.artifactId}</name> | ||
|
||
<!-- Build plugins and extensions --> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>properties-maven-plugin</artifactId> | ||
<version>@project.version@</version> | ||
<executions> | ||
<execution> | ||
<phase>generate-resources</phase> | ||
<goals> | ||
<goal>write-active-profile-properties</goal> | ||
</goals> | ||
<configuration> | ||
<outputFile> | ||
${project.build.directory}/itresults/WriteActiveProfilePropertiesToOutputFile</outputFile> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<profiles> | ||
<profile> | ||
<id>activeprofile</id> | ||
<activation> | ||
<activeByDefault>true</activeByDefault> | ||
</activation> | ||
<properties> | ||
<bob>dog</bob> | ||
</properties> | ||
</profile> | ||
</profiles> | ||
</project> |
14 changes: 14 additions & 0 deletions
14
src/it/WriteActiveProfilePropertiesToOutputFile/prepare.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,14 @@ | ||
import junit.framework.Assert; | ||
|
||
File target = new File(basedir, "target/itresults"); | ||
if (!target.exists()) { | ||
target.mkdirs(); | ||
Assert.assertTrue("Folder " + target.absolutePath + " must exist", target.exists()); | ||
} | ||
|
||
File f = new File(target, "WriteActiveProfilePropertiesToOutputFile"); | ||
if (f.exists()) { | ||
f.deleteDir(); | ||
} | ||
|
||
Assert.assertFalse("File " + f.absolutePath + " must exist", f.exists()); |
10 changes: 10 additions & 0 deletions
10
src/it/WriteActiveProfilePropertiesToOutputFile/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,10 @@ | ||
import junit.framework.Assert; | ||
|
||
File target = new File(basedir, "target/itresults"); | ||
|
||
File f = new File(target, "WriteActiveProfilePropertiesToOutputFile"); | ||
def out = f.text | ||
Assert.assertTrue("File " + f.absolutePath + " exists", f.exists()); | ||
Assert.assertNotSame("File is empty", 0, f.length()); | ||
Assert.assertTrue("Bob is a dog", out.contains("bob=dog")) | ||
Assert.assertFalse("Bob is not a cat", out.contains("bob=cat")) |
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.skip = 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<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>@project.groupId@</groupId> | ||
<artifactId>it-test-parent</artifactId> | ||
<version>@project.version@</version> | ||
<packaging>pom</packaging> | ||
<name>${project.artifactId}</name> | ||
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>@project.artifactId@</artifactId> | ||
<version>@project.version@</version> | ||
<configuration> | ||
<url>http://www.lolcats.com/images/u/08/23/lolcatsdotcomcm90ebvhwphtzqvf.jpg</url> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
</build> | ||
</project> |
Oops, something went wrong.