You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by sk...@apache.org on 2016/09/25 21:41:11 UTC
cayenne git commit: Add new Maven profile mysql-docker
Repository: cayenne
Updated Branches:
refs/heads/master 23eb17ed5 -> 43978ffcc
Add new Maven profile mysql-docker
Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/43978ffc
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/43978ffc
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/43978ffc
Branch: refs/heads/master
Commit: 43978ffcc4eecfcf58bb5dc017efd630d14475dc
Parents: 23eb17e
Author: Savva Kolbachev <s....@gmail.com>
Authored: Mon Sep 26 00:39:51 2016 +0300
Committer: Savva Kolbachev <s....@gmail.com>
Committed: Mon Sep 26 00:39:51 2016 +0300
----------------------------------------------------------------------
cayenne-client/pom.xml | 33 +++++++++++++++++++++++
cayenne-server/pom.xml | 33 +++++++++++++++++++++++
pom.xml | 65 +++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 131 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cayenne/blob/43978ffc/cayenne-client/pom.xml
----------------------------------------------------------------------
diff --git a/cayenne-client/pom.xml b/cayenne-client/pom.xml
index 4ecc832..1f1a12d 100644
--- a/cayenne-client/pom.xml
+++ b/cayenne-client/pom.xml
@@ -142,6 +142,39 @@
</build>
</profile>
<profile>
+ <id>mysql-docker</id>
+ <activation>
+ <property>
+ <name>cayenneTestConnection</name>
+ <value>mysql-docker</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>start-mysql</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>stop-mysql</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
<id>code-quality</id>
<activation>
http://git-wip-us.apache.org/repos/asf/cayenne/blob/43978ffc/cayenne-server/pom.xml
----------------------------------------------------------------------
diff --git a/cayenne-server/pom.xml b/cayenne-server/pom.xml
index a1b4691..30ff160 100644
--- a/cayenne-server/pom.xml
+++ b/cayenne-server/pom.xml
@@ -292,6 +292,39 @@
</build>
</profile>
<profile>
+ <id>mysql-docker</id>
+ <activation>
+ <property>
+ <name>cayenneTestConnection</name>
+ <value>mysql-docker</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>start-mysql</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>stop-mysql</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
<id>code-quality</id>
<activation>
http://git-wip-us.apache.org/repos/asf/cayenne/blob/43978ffc/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 7390058..ba88917 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1318,6 +1318,71 @@
</dependencies>
</profile>
<profile>
+ <id>mysql-docker</id>
+ <activation>
+ <property>
+ <name>cayenneTestConnection</name>
+ <value>mysql-docker</value>
+ </property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>5.1.28</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <configuration>
+ <systemPropertyVariables>
+ <!-- See https://hub.docker.com/_/mysql/ for details-->
+ <!-- ${db.host} and ${db.port} are dynamically set by docker-maven-plugin below -->
+ <cayenneAdapter>org.apache.cayenne.dba.mysql.MySQLAdapter</cayenneAdapter>
+ <cayenneJdbcUsername>root</cayenneJdbcUsername>
+ <cayenneJdbcPassword></cayenneJdbcPassword>
+ <cayenneJdbcUrl>jdbc:mysql://${db.host}:${db.port}/cayenne</cayenneJdbcUrl>
+ <cayenneJdbcDriver>com.mysql.jdbc.Driver</cayenneJdbcDriver>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <configuration>
+ <images>
+ <image>
+ <alias>db</alias>
+ <name>mysql:5.7</name>
+ <run>
+ <ports>
+ <port>${db.host}:${db.port}:3306</port>
+ </ports>
+ <wait>
+ <tcp>
+ <ports>
+ <port>3306</port>
+ </ports>
+ </tcp>
+ <time>30000</time>
+ </wait>
+ <env>
+ <MYSQL_ALLOW_EMPTY_PASSWORD>yes</MYSQL_ALLOW_EMPTY_PASSWORD>
+ <MYSQL_DATABASE>cayenne</MYSQL_DATABASE>
+ </env>
+ </run>
+ </image>
+ </images>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
<id>oracle</id>
<activation>
<property>