killbill-aplcache
Changes
beatrix/pom.xml 19(+19 -0)
beatrix/src/test/java/com/ning/billing/beatrix/integration/osgi/TestBasicOSGIWithTestBundle.java 11(+11 -0)
osgi-bundles/test/pom.xml 19(+0 -19)
Details
beatrix/pom.xml 19(+19 -0)
diff --git a/beatrix/pom.xml b/beatrix/pom.xml
index e5c159e..fb512bd 100644
--- a/beatrix/pom.xml
+++ b/beatrix/pom.xml
@@ -187,6 +187,25 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.4</version>
+ <executions>
+ <execution>
+ <id>copy</id>
+ <phase>initialize</phase>
+ <configuration>
+ <tasks>
+ <copy file="${basedir}/../osgi-bundles/test/target/killbill-osgi-bundles-test-${project.version}-jar-with-dependencies.jar" tofile="${basedir}/src/test/resources/killbill-osgi-bundles-test-${project.version}-jar-with-dependencies.jar"/>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</build>
</project>
diff --git a/beatrix/src/test/java/com/ning/billing/beatrix/integration/osgi/TestBasicOSGIWithTestBundle.java b/beatrix/src/test/java/com/ning/billing/beatrix/integration/osgi/TestBasicOSGIWithTestBundle.java
index 65e07e1..0831773 100644
--- a/beatrix/src/test/java/com/ning/billing/beatrix/integration/osgi/TestBasicOSGIWithTestBundle.java
+++ b/beatrix/src/test/java/com/ning/billing/beatrix/integration/osgi/TestBasicOSGIWithTestBundle.java
@@ -46,9 +46,11 @@ import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import com.ning.billing.account.api.Account;
+import com.ning.billing.dbi.DBTestingHelper;
import com.ning.billing.osgi.api.OSGIServiceRegistration;
import com.ning.billing.osgi.api.config.PluginConfig.PluginType;
import com.ning.billing.osgi.api.config.PluginJavaConfig;
+import com.ning.billing.osgi.glue.OSGIDataSourceConfig;
import com.ning.billing.payment.plugin.api.PaymentInfoPlugin;
import com.ning.billing.payment.plugin.api.PaymentPluginApi;
import com.ning.billing.util.config.OSGIConfig;
@@ -77,6 +79,15 @@ public class TestBasicOSGIWithTestBundle extends TestOSGIBase {
@BeforeClass(groups = "slow")
public void setup() throws Exception {
+ final String jdbcConnection = getDBTestingHelper().getJdbcConnectionString();
+ final String userName = DBTestingHelper.USERNAME;
+ final String userPwd = DBTestingHelper.PASSWORD;
+
+ System.setProperty(OSGIDataSourceConfig.DATA_SOURCE_PROP_PREFIX + "jdbc.url", jdbcConnection);
+ System.setProperty(OSGIDataSourceConfig.DATA_SOURCE_PROP_PREFIX + "jdbc.user", userName);
+ System.setProperty(OSGIDataSourceConfig.DATA_SOURCE_PROP_PREFIX + "jdbc.password", userPwd);
+
+ // OSGIDataSourceConfig
super.setup();
// This is extracted from surefire system configuration-- needs to be added explicitely in IntelliJ for correct running
osgi-bundles/test/pom.xml 19(+0 -19)
diff --git a/osgi-bundles/test/pom.xml b/osgi-bundles/test/pom.xml
index 0f6f665..85dc4b5 100644
--- a/osgi-bundles/test/pom.xml
+++ b/osgi-bundles/test/pom.xml
@@ -104,25 +104,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.4</version>
- <executions>
- <execution>
- <id>copy</id>
- <phase>package</phase>
- <configuration>
- <tasks>
- <copy file="${basedir}/target/killbill-osgi-bundles-test-${project.version}-jar-with-dependencies.jar" tofile="${basedir}/../../beatrix/src/test/resources/killbill-osgi-bundles-test-${project.version}-jar-with-dependencies.jar"/>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
</plugins>
</build>
</project>