You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2018/07/23 23:35:43 UTC

[isis] 02/04: ISIS-1969: adds configuration to deploy helloworld and simpleapp to a Tomcat instance

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 890558d1adfca91b436c8306a148c2667095d631
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Jul 24 00:16:53 2018 +0100

    ISIS-1969: adds configuration to deploy helloworld and simpleapp to a Tomcat instance
    
    eg as running in Docker per "webdocker".  Note that this configuration is simply for deployment, nothing to do with creating skinny WARs.
---
 .../{simpleapp => helloworld}/.m2/settings.xml     |  9 +++----
 example/application/helloworld/pom.xml             | 29 ++++++++++++++++++++
 example/application/simpleapp/.m2/settings.xml     |  5 ++++
 example/application/simpleapp/webapp/pom.xml       | 31 ++++++++++++++++++++++
 4 files changed, 68 insertions(+), 6 deletions(-)

diff --git a/example/application/simpleapp/.m2/settings.xml b/example/application/helloworld/.m2/settings.xml
similarity index 58%
copy from example/application/simpleapp/.m2/settings.xml
copy to example/application/helloworld/.m2/settings.xml
index 6038b0e..755b1ad 100644
--- a/example/application/simpleapp/.m2/settings.xml
+++ b/example/application/helloworld/.m2/settings.xml
@@ -4,12 +4,9 @@
           xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
   <servers>
     <server>
-      <id>docker-registry</id>
-      <username>${env.DOCKER_REGISTRY_USERNAME}</username>
-      <password>${env.DOCKER_REGISTRY_PASSWORD}</password>
-      <configuration>
-        <email>${env.DOCKER_REGISTRY_EMAIL}</email>
-      </configuration>
+      <id>tomcat-server</id>
+      <username>admin</username>
+      <password>password</password>
     </server>
   </servers>
 </settings>
diff --git a/example/application/helloworld/pom.xml b/example/application/helloworld/pom.xml
index 8f2c701..5be9963 100644
--- a/example/application/helloworld/pom.xml
+++ b/example/application/helloworld/pom.xml
@@ -220,6 +220,35 @@
                 </plugins>
             </build>
         </profile>
+
+        <!--
+        using:
+        mvn -s .m2/settings.xml -D deploy-to-tomcat tomcat7:deploy-only
+         -->
+        <profile>
+            <id>deploy-to-tomcat</id>
+            <activation>
+                <property>
+                    <name>deploy-to-tomcat</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.tomcat.maven</groupId>
+                        <artifactId>tomcat7-maven-plugin</artifactId>
+                        <version>2.2</version>
+                        <configuration>
+                            <url>http://localhost:8080/manager/text</url>
+                            <server>tomcat-server</server>
+                            <path>/ROOT</path>
+                            <warFile>${project.build.directory}/${maven-war-plugin.warName}.war</warFile>
+                            <update>true</update>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
 
 </project>
diff --git a/example/application/simpleapp/.m2/settings.xml b/example/application/simpleapp/.m2/settings.xml
index 6038b0e..f40e9c6 100644
--- a/example/application/simpleapp/.m2/settings.xml
+++ b/example/application/simpleapp/.m2/settings.xml
@@ -11,5 +11,10 @@
         <email>${env.DOCKER_REGISTRY_EMAIL}</email>
       </configuration>
     </server>
+    <server>
+      <id>tomcat-server</id>
+      <username>admin</username>
+      <password>password</password>
+    </server>
   </servers>
 </settings>
diff --git a/example/application/simpleapp/webapp/pom.xml b/example/application/simpleapp/webapp/pom.xml
index 2ded58a..16d0e14 100644
--- a/example/application/simpleapp/webapp/pom.xml
+++ b/example/application/simpleapp/webapp/pom.xml
@@ -235,6 +235,37 @@
                </dependency>
             </dependencies>
         </profile>
+
+
+        <!--
+        using:
+        mvn -s .m2/settings.xml -D deploy-to-tomcat tomcat7:deploy-only
+         -->
+        <profile>
+            <id>deploy-to-tomcat</id>
+            <activation>
+                <property>
+                    <name>deploy-to-tomcat</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.tomcat.maven</groupId>
+                        <artifactId>tomcat7-maven-plugin</artifactId>
+                        <version>2.2</version>
+                        <configuration>
+                            <url>http://localhost:8080/manager/text</url>
+                            <server>tomcat-server</server>
+                            <path>/ROOT</path>
+                            <warFile>${project.build.directory}/${maven-war-plugin.warName}.war</warFile>
+                            <update>true</update>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
     </profiles>
 
 </project>