modules/enterprise/server/itests-2/pom.xml
| 52 ++++++----
modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java
| 5
2 files changed, 38 insertions(+), 19 deletions(-)
New commits:
commit a06a6ff899355823a42c3e79ac70a82510fddbe2
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Wed Dec 19 10:45:43 2012 -0500
Try forcing ojdbc driver resolution usinbg the local repo since it
can't always be found in profile-defined repositories.
diff --git
a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java
b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java
index dd46a29..e038fe0 100644
---
a/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java
+++
b/modules/enterprise/server/itests-2/src/test/java/org/rhq/enterprise/server/test/AbstractEJB3Test.java
@@ -341,6 +341,11 @@ public abstract class AbstractEJB3Test extends Arquillian {
// If we're running oracle we need to include the OJDBC driver because dbunit
needs it. Note that we need
// add it explicitly even though it is a provided module used by the datasource.
if (!Boolean.valueOf(System.getProperty("rhq.skip.oracle"))) {
+ // in proxy situations (like Jenkins) shrinkwrap won't be able to find
repositories defined in
+ // settings.xml profiles. We know at this point the driver is in the local
repo, try going offline
+ // at this point to force local repo resolution since the oracle driver is
not in public repos.
+ // see
http://stackoverflow.com/questions/6291146/arquillian-shrinkwrap-mavendep...
+ resolver.goOffline();
dependencies.addAll(resolver.artifact("com.oracle:ojdbc6:jar:" +
System.getProperty("rhq.ojdbc.version"))
.resolveAs(JavaArchive.class));
}
commit becf9e4f40c63b8c3a6b1d6aea7122fa9eab67ab
Author: Jay Shaughnessy <jshaughn(a)redhat.com>
Date: Tue Dec 18 14:28:03 2012 -0500
Avoid the unzipping if it is already unzipped. It takes time for unzip to
actually do all of the file compares just to know it doesn't need to add
anything.
diff --git a/modules/enterprise/server/itests-2/pom.xml
b/modules/enterprise/server/itests-2/pom.xml
index 5811fef..db60c86 100644
--- a/modules/enterprise/server/itests-2/pom.xml
+++ b/modules/enterprise/server/itests-2/pom.xml
@@ -26,8 +26,8 @@
<jboss.vm.args>-Xmx700m -XX:MaxPermSize=200m -Djava.security.manager
-Djava.security.policy==${jboss.unzip.location}/security.policy</jboss.vm.args>
<jboss.vm.args.debug></jboss.vm.args.debug> <!-- -Ditest.debug can
override this, see below -->
- <!-- These properties guide which datasources are used for integration tests. Only
one should be true.
- The default is Postgres, specify -Pitest.oracle to use Oracle -->
+ <!-- These properties guide which datasources are used for integration tests. Only
one should be true. The default is
+ Postgres, specify -Pitest.oracle to use Oracle -->
<skip.postgres>false</skip.postgres>
<skip.oracle>true</skip.oracle>
</properties>
@@ -96,12 +96,12 @@
</dependency>
<dependency>
- <groupId>org.rhq</groupId>
- <artifactId>rhq-arquillian-suite-extension</artifactId>
- <version>${project.version}</version>
- <scope>test</scope>
+ <groupId>org.rhq</groupId>
+ <artifactId>rhq-arquillian-suite-extension</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
</dependency>
-
+
<dependency>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-domain</artifactId>
@@ -231,15 +231,30 @@
<id>prepare Standalone XML</id>
<phase>process-test-resources</phase>
<configuration>
- <target>
- <echo>Unzipping JBossAS ${jboss.version} found at
${jboss.zip}</echo>
- <unzip src="${jboss.zip}"
dest="${jboss.unzip.location}/.." />
- <echo>JBossAS ${jboss.version} should now be at:
${jboss.unzip.location}</echo>
-
- <echo>Copying security policy to JBossAS</echo>
- <copy
file="${project.build.directory}/test-classes/security.policy"
tofile="${jboss.unzip.location}/security.policy" />
-
+ <tasks>
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties"
/>
<property name="jboss.conf"
location="${jboss.unzip.location}/standalone/configuration/standalone.xml"
/>
+ <property name="jboss.conf.safe"
location="${jboss.conf}.safe" />
+ <if>
+ <available file="${jboss.unzip.location}" />
+ <then>
+ <echo>Skipping unzipping JBossAS ${jboss.version}, it is
already unzipped</echo>
+ <echo>Restoring safe copy of standalone.xml for pending test
additions</echo>
+ <copy file="${jboss.conf.safe}"
tofile="${jboss.conf}" overwrite="true" />
+ </then>
+ <else>
+ <echo>Unzipping JBossAS ${jboss.version} found at
${jboss.zip}</echo>
+ <unzip src="${jboss.zip}"
dest="${jboss.unzip.location}/.." />
+ <echo>JBossAS ${jboss.version} should now be at:
${jboss.unzip.location}</echo>
+
+ <echo>Copying security policy to JBossAS</echo>
+ <copy
file="${project.build.directory}/test-classes/security.policy"
tofile="${jboss.unzip.location}/security.policy" />
+
+ <echo>Saving copy of standalone.xml</echo>
+ <copy file="${jboss.conf}"
tofile="${jboss.conf.safe}" />
+ </else>
+ </if>
+
<echo>Will now add test configuration to JBossAS config file:
${jboss.conf}</echo>
<replace file="${jboss.conf}">
@@ -460,8 +475,7 @@
</dependencies>
</module>
]]></echo>
-
- </target>
+ </tasks>
</configuration>
<goals>
<goal>run</goal>
@@ -703,8 +717,8 @@
</properties>
<dependencies>
- <!-- The provided scope in the root pom is not sufficient, we need this fo
shrinkwrap to resolve
- dependency and add the jar to the deployment. -->
+ <!-- The provided scope in the root pom is not sufficient, we need this fo
shrinkwrap to resolve dependency and add
+ the jar to the deployment. -->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>