-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds additional multi-module integration test
This test requires fix for #40 due to "deleteRelease=false".
- Loading branch information
Showing
10 changed files
with
212 additions
and
0 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,11 @@ | ||
# How this works | ||
|
||
* The `maven-invoker-plugin` uses it's own `settings.xml` which is merged with the one from `~/.m2/settings.xml`. | ||
* The credentials for deploying too Github are under the `~/.m2/settings.xml`, so as to not having to add them | ||
as sources. | ||
* The `repositoryId` and expected `serverId` in the `~/.m2/settings.xml` file are as follows | ||
``` | ||
<repositoryId>jutzig/github-release-plugin</repositoryId> | ||
<serverId>jutzig/github-release-plugin</serverId> | ||
``` |
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,56 @@ | ||
<project> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>de.jutzig</groupId> | ||
<artifactId>test-parent</artifactId> | ||
<version>@project.version@</version> | ||
</parent> | ||
<artifactId>child1</artifactId> | ||
|
||
<build> | ||
<resources> | ||
<resource> | ||
<directory>src/test/resources</directory> | ||
<filtering>true</filtering> | ||
</resource> | ||
</resources> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>@project.artifactId@</artifactId> | ||
<version>@project.version@</version> | ||
|
||
<configuration> | ||
<description>Test artifact ${project.version}.</description> | ||
<releaseName>${project.version}</releaseName> | ||
<tag>${project.version}</tag> | ||
|
||
<overwriteArtifact>true</overwriteArtifact> | ||
<serverId>jutzig/github-release-plugin</serverId> | ||
<deleteRelease>false</deleteRelease> | ||
|
||
<fileSets> | ||
<fileSet> | ||
<directory>${project.build.directory}</directory> | ||
<includes> | ||
<include>${project.artifactId}*.jar</include> | ||
</includes> | ||
</fileSet> | ||
</fileSets> | ||
</configuration> | ||
|
||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>release</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
11 changes: 11 additions & 0 deletions
11
src/it/test-multi-module/child1/src/main/java/de/jutzig/maven/test/HelloWorld.java
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 @@ | ||
package de.jutzig.maven.test; | ||
|
||
public class HelloWorld | ||
{ | ||
|
||
public static void main(String[] args) | ||
{ | ||
System.out.println("Hello, world!"); | ||
} | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
src/it/test-multi-module/child1/src/test/java/de/jutzig/maven/test/HelloWorldTest.java
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,17 @@ | ||
package de.jutzig.maven.test; | ||
|
||
import java.io.IOException; | ||
import java.util.Properties; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
public class HelloWorldTest | ||
{ | ||
|
||
@Test | ||
public void connectionTest() throws IOException | ||
{ | ||
} | ||
|
||
} |
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,56 @@ | ||
<project> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>de.jutzig</groupId> | ||
<artifactId>test-parent</artifactId> | ||
<version>@project.version@</version> | ||
</parent> | ||
<artifactId>child2</artifactId> | ||
|
||
<build> | ||
<resources> | ||
<resource> | ||
<directory>src/test/resources</directory> | ||
<filtering>true</filtering> | ||
</resource> | ||
</resources> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>@project.artifactId@</artifactId> | ||
<version>@project.version@</version> | ||
|
||
<configuration> | ||
<description>Test artifact ${project.version}.</description> | ||
<releaseName>${project.version}</releaseName> | ||
<tag>${project.version}</tag> | ||
|
||
<overwriteArtifact>false</overwriteArtifact> | ||
<serverId>jutzig/github-release-plugin</serverId> | ||
<deleteRelease>false</deleteRelease> | ||
|
||
<fileSets> | ||
<fileSet> | ||
<directory>${project.build.directory}</directory> | ||
<includes> | ||
<include>${project.artifactId}*.jar</include> | ||
</includes> | ||
</fileSet> | ||
</fileSets> | ||
</configuration> | ||
|
||
<executions> | ||
<execution> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>release</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
11 changes: 11 additions & 0 deletions
11
src/it/test-multi-module/child2/src/main/java/de/jutzig/maven/test/HelloWorld.java
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 @@ | ||
package de.jutzig.maven.test; | ||
|
||
public class HelloWorld | ||
{ | ||
|
||
public static void main(String[] args) | ||
{ | ||
System.out.println("Hello, world!"); | ||
} | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
src/it/test-multi-module/child2/src/test/java/de/jutzig/maven/test/HelloWorldTest.java
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,17 @@ | ||
package de.jutzig.maven.test; | ||
|
||
import java.io.IOException; | ||
import java.util.Properties; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Test; | ||
|
||
public class HelloWorldTest | ||
{ | ||
|
||
@Test | ||
public void connectionTest() throws IOException | ||
{ | ||
} | ||
|
||
} |
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=deploy -Dmaven.deploy.skip=true -e -X |
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,30 @@ | ||
<project> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>de.jutzig</groupId> | ||
<artifactId>test-parent</artifactId> | ||
<version>@project.version@</version> | ||
<packaging>pom</packaging> | ||
|
||
<scm> | ||
<connection>scm:git:[email protected]:jutzig/github-release-plugin.git</connection> | ||
<developerConnection>scm:git:[email protected]:jutzig/github-release-plugin.git</developerConnection> | ||
<url>https:/jutzig/github-release-plugin/tree/${project.scm.tag}</url> | ||
<tag>master</tag> | ||
</scm> | ||
|
||
<modules> | ||
<module>child1</module> | ||
<module>child2</module> | ||
</modules> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.11</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</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 @@ | ||
// TODO: Add a proper check, but, basically, if the invoker build fails, that would be enough of a failure. | ||
return true |