Skip to content

Commit

Permalink
Fix tests in CI by using local maven repo in target/
Browse files Browse the repository at this point in the history
 * using clean repo for every build (instead of the
   shraed one in ~/.m2) fixes the failing tests in CI

 * having the local repo in target/ also greatly
   improves the isolation of the tests. They are
   less dependent on the current state of ~/.m2 on
   the particular machine
  • Loading branch information
Petr Siroky committed Oct 5, 2014
1 parent 3cb7235 commit 1bdde23
Show file tree
Hide file tree
Showing 6 changed files with 114 additions and 6 deletions.
17 changes: 16 additions & 1 deletion jbpm-runtime-manager/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,28 @@
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>false</filtering>
</testResource>
<testResource>
<directory>src/test/filtered-resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins>
<plugin>
<!-- we need to fork always as we have mixture of both arquillian tests and regular
and to avoid clashing between them as both need to setup data source and bound it to JNDI -->
and to avoid clashing between them as both need to setup data source and bound it to JNDI -->
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>always</forkMode>
<systemProperties>
<kie.maven.settings.custom>
${project.build.testOutputDirectory}/jbpm-runtime-manager-tests-custom-settings.xml
</kie.maven.settings.custom>
</systemProperties>
</configuration>
</plugin>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<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">
<localRepository>${project.build.directory}/testing-maven-repo</localRepository>
<profiles>
<profile>
<!-- Repository with SNAPSHOTs-->
<id>additional-maven-repos</id>
<repositories>
<repository>
<id>jboss-public-repo</id>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
</repository>
</repositories>
</profile>
</profiles>

<activeProfiles>
<activeProfile>additional-maven-repos</activeProfile>
</activeProfiles>
</settings>
21 changes: 18 additions & 3 deletions jbpm-services/jbpm-kie-services/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,17 @@
</dependencies>

<build>
<plugins>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>false</filtering>
</testResource>
<testResource>
<directory>src/test/filtered-resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
Expand All @@ -191,11 +201,16 @@
</configuration>
</plugin>
<plugin>
<!-- we need to fork always as we have mixture of both arquillian tests and regular
and to avoid clashing between them as both need to setup data source and bound it to JNDI -->
<!-- we need to fork always as we have mixture of both arquillian tests and regular
and to avoid clashing between them as both need to setup data source and bound it to JNDI -->
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>always</forkMode>
<systemProperties>
<kie.maven.settings.custom>
${project.build.testOutputDirectory}/jbpm-kie-services-tests-custom-settings.xml
</kie.maven.settings.custom>
</systemProperties>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<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">
<localRepository>${project.build.directory}/testing-maven-repo</localRepository>
<profiles>
<profile>
<!-- Repository with SNAPSHOTs-->
<id>additional-maven-repos</id>
<repositories>
<repository>
<id>jboss-public-repo</id>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
</repository>
</repositories>
</profile>
</profiles>

<activeProfiles>
<activeProfile>additional-maven-repos</activeProfile>
</activeProfiles>
</settings>
19 changes: 17 additions & 2 deletions jbpm-services/jbpm-services-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,28 @@
</dependencies>

<build>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>false</filtering>
</testResource>
<testResource>
<directory>src/test/filtered-resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins>
<plugin>
<!-- we need to fork always as we have mixture of both arquillian tests and regular
and to avoid clashing between them as both need to setup data source and bound it to JNDI -->
<!-- we need to fork always as we have mixture of both arquillian tests and regular
and to avoid clashing between them as both need to setup data source and bound it to JNDI -->
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>always</forkMode>
<systemProperties>
<kie.maven.settings.custom>
${project.build.testOutputDirectory}/jbpm-services-cdi-tests-custom-settings.xml
</kie.maven.settings.custom>
</systemProperties>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<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">
<localRepository>${project.build.directory}/testing-maven-repo</localRepository>
<profiles>
<profile>
<!-- Repository with SNAPSHOTs-->
<id>additional-maven-repos</id>
<repositories>
<repository>
<id>jboss-public-repo</id>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
</repository>
</repositories>
</profile>
</profiles>

<activeProfiles>
<activeProfile>additional-maven-repos</activeProfile>
</activeProfiles>
</settings>

0 comments on commit 1bdde23

Please sign in to comment.