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/25 16:45:22 UTC
[isis] 09/12: ISIS-1810: recreating simpleapp archetype
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch release-2.0.0-M1-RC2
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 6b11a1e16e6d60cadb0a75004b15c767fb46e250
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Jul 25 11:09:20 2018 +0100
ISIS-1810: recreating simpleapp archetype
---
.../resources/archetype-resources/.m2/settings.xml | 5 ++
.../application/translations.pot | 2 +-
.../resources/archetype-resources/webapp/pom.xml | 65 ++++++++++++++++++++++
.../webapp/src/main/resources/docker/Dockerfile | 30 ++++++++--
.../resources/projects/basic/archetype.properties | 2 +-
5 files changed, 98 insertions(+), 6 deletions(-)
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/.m2/settings.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/.m2/settings.xml
index 3a2172d..a189f31 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/.m2/settings.xml
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/.m2/settings.xml
@@ -14,5 +14,10 @@
<email>${symbol_dollar}{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/archetype/simpleapp/src/main/resources/archetype-resources/application/translations.pot b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/translations.pot
index 984c133..eec9eb3 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/application/translations.pot
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/application/translations.pot
@@ -23,7 +23,7 @@
msgid ""
msgstr ""
"Project-Id-Version: \n"
-"POT-Creation-Date: 2018-07-21 14:40:56+\n"
+"POT-Creation-Date: 2018-07-25 11:04:30+\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/pom.xml b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/pom.xml
index b60b51e..a9fcf2b 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/pom.xml
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/pom.xml
@@ -229,6 +229,71 @@
</dependency>
</dependencies>
</profile>
+
+ <profile>
+ <id>skinny-war</id>
+ <activation>
+ <property>
+ <name>skinny-war</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>${maven-war-plugin.version}</version>
+ <configuration>
+ <warName>${maven-war-plugin.warName}</warName>
+ <packagingExcludes>%regex[WEB-INF/lib/(?!simpleapp-application|simpleapp-module-simple).*.jar]</packagingExcludes>
+ <archive>
+ <manifest>
+ <addClasspath>false</addClasspath>
+ </manifest>
+ <manifestEntries>
+ <Build-Time>${maven.build.timestamp}</Build-Time>
+ <Build-Host>${agent.name}</Build-Host>
+ <Build-User>${user.name}</Build-User>
+ <Build-Maven>Maven ${maven.version}</Build-Maven>
+ <Build-Java>${java.version}</Build-Java>
+ <Build-OS>${os.name}</Build-OS>
+ <Build-Label>${project.version}</Build-Label>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <!--
+ using:
+ mvn -pl webapp -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/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/resources/docker/Dockerfile b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/resources/docker/Dockerfile
index 4c83be7..304264d 100644
--- a/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/resources/docker/Dockerfile
+++ b/example/archetype/simpleapp/src/main/resources/archetype-resources/webapp/src/main/resources/docker/Dockerfile
@@ -1,4 +1,26 @@
-FROM incodehq/tomcat
-RUN rm -rf ${DEPLOYMENT_DIR}/ROOT
-COPY ${docker-plugin.resource.include} ${DEPLOYMENT_DIR}/ROOT.war
-EXPOSE 8080
\ No newline at end of file
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+FROM tomcat:9.0.10-jre8-alpine
+
+RUN rm -rf ${CATALINA_HOME}/webapps/examples
+RUN rm -rf ${CATALINA_HOME}/webapps/docs
+RUN rm -rf ${CATALINA_HOME}/webapps/ROOT
+
+COPY ${docker-plugin.resource.include} ${CATALINA_HOME}/webapps/ROOT.war
+EXPOSE 8080
diff --git a/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties b/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties
index d44ae9f..b99990d 100644
--- a/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties
+++ b/example/archetype/simpleapp/src/test/resources/projects/basic/archetype.properties
@@ -1,4 +1,4 @@
-#Sat Jul 21 14:47:26 BST 2018
+#Wed Jul 25 11:09:14 BST 2018
package=it.pkg
version=0.1-SNAPSHOT
groupId=archetype.it