View File | Revision Log | Show Annotations | Download File | View Changeset
/hippo/hippo-demos/hippo-go-green/trunk/dist/pom.xml
Revision: 44598
Committed: Mon Apr 14 16:19:08 2014 UTC (6 years, 11 months ago) by abanck
Content type: text/plain
File size: 12847 byte(s)
Log Message:
GOGREEN-1252 - Include the dist folder in the default profile to have the dist sub-module in the releaes cycle. Set the demo version to be the CMS release version

File Contents

# User Rev Content
1 adouma 38310 <?xml version="1.0" encoding="UTF-8"?>
2     <!--
3     ~ Copyright 2013 Hippo B.V. (http://www.onehippo.com)
4     ~
5     ~ Licensed under the Apache License, Version 2.0 (the "License");
6     ~ you may not use this file except in compliance with the License.
7     ~ You may obtain a copy of the License at
8     ~
9     ~ http://www.apache.org/licenses/LICENSE-2.0
10     ~
11     ~ Unless required by applicable law or agreed to in writing, software
12     ~ distributed under the License is distributed on an "AS IS" BASIS,
13     ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14     ~ See the License for the specific language governing permissions and
15     ~ limitations under the License.
16     -->
17     <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
18     <parent>
19     <artifactId>hippogogreen</artifactId>
20     <groupId>com.onehippo.gogreen</groupId>
21 abanck 44598 <version>3.09.01-SNAPSHOT</version>
22 adouma 38310 </parent>
23     <modelVersion>4.0.0</modelVersion>
24     <name>Hippo Go Green Distribution</name>
25     <artifactId>hippogogreen-dist</artifactId>
26     <packaging>pom</packaging>
27    
28     <profiles>
29     <profile>
30 svoortman 38407 <id>dist-full</id>
31 adouma 38310 <properties>
32     <dist.tomcat.archive>${project.build.directory}/apache-tomcat-${cargo.tomcat.full.version}${cargo.tomcat.distribution.url.postfix}</dist.tomcat.archive>
33     <!-- just to make sure we're using the .tar.gz tomcat dist -->
34     <cargo.tomcat.distribution.url.postfix>.tar.gz</cargo.tomcat.distribution.url.postfix>
35     <dist.target.dir>${project.build.directory}/dist</dist.target.dir>
36     <tomcat.target.dir>${dist.target.dir}/tomcat</tomcat.target.dir>
37     </properties>
38     <build>
39     <defaultGoal>package</defaultGoal>
40     <plugins>
41     <plugin>
42     <groupId>org.apache.maven.plugins</groupId>
43     <artifactId>maven-antrun-plugin</artifactId>
44     <inherited>false</inherited>
45     <executions>
46     <execution>
47     <id>get-unpacked-tomcat</id>
48     <phase>generate-sources</phase>
49     <configuration>
50     <target>
51 fvlankvelt 38607 <mkdir dir="${project.build.directory}" />
52     <delete dir="${dist.target.dir}" quiet="true" />
53     <get src="${cargo.tomcat.distribution.url}" dest="${dist.tomcat.archive}" usetimestamp="true" />
54 adouma 38310 <untar src="${dist.tomcat.archive}" dest="${tomcat.target.dir}" overwrite="false" compression="gzip">
55     <patternset>
56 fvlankvelt 38607 <exclude name="*/webapps/**" />
57 adouma 38310 </patternset>
58 fvlankvelt 38607 <cutdirsmapper dirs="1" />
59 adouma 38310 </untar>
60 fvlankvelt 38607 <unzip src="${project.basedir}/../cms/target/cms.war" dest="${tomcat.target.dir}/webapps/cms" />
61     <unzip src="${project.basedir}/../site/target/site.war" dest="${tomcat.target.dir}/webapps/site" />
62     <copy file="${tomcat.target.dir}/LICENSE" tofile="${dist.target.dir}/tomcat-LICENSE" />
63     <copy file="${tomcat.target.dir}/NOTICE" tofile="${dist.target.dir}/tomcat-NOTICE" />
64     <copy file="${tomcat.target.dir}/webapps/cms/META-INF/LICENSE" tofile="${dist.target.dir}/cms-LICENSE" />
65     <copy file="${tomcat.target.dir}/webapps/cms/META-INF/NOTICE" tofile="${dist.target.dir}/cms-NOTICE" />
66     <copy file="${tomcat.target.dir}/webapps/site/META-INF/LICENSE" tofile="${dist.target.dir}/site-LICENSE" />
67     <copy file="${tomcat.target.dir}/webapps/site/META-INF/NOTICE" tofile="${dist.target.dir}/site-NOTICE" />
68     <copy file="${project.basedir}/../conf/context.xml" tofile="${tomcat.target.dir}/conf/context.xml" overwrite="true" />
69     <copy file="${project.basedir}/../conf/log4j-prod.xml" tofile="${tomcat.target.dir}/conf/log4j.xml" />
70     <copy file="${project.basedir}/../conf/log4j.dtd" tofile="${tomcat.target.dir}/conf/log4j.dtd" />
71     <copy todir="${dist.target.dir}" overwrite="true"><fileset dir="${project.basedir}/src/overlay" /></copy>
72 adouma 38310 </target>
73     </configuration>
74     <goals>
75     <goal>run</goal>
76     </goals>
77     </execution>
78     <execution>
79     <id>package-dist</id>
80     <phase>package</phase>
81     <configuration>
82     <target>
83     <tar destfile="${project.build.directory}/${project.build.finalName}.tar.gz" compression="gzip" longfile="gnu">
84     <tarfileset dir="${dist.target.dir}">
85 fvlankvelt 38607 <exclude name="tomcat/bin/*.sh" />
86     <exclude name="tomcat/logs/*.log" />
87     <exclude name="tomcat/webapps/cargocpc.war" />
88     <exclude name="tomcat/webapps/cargocpc/**" />
89     <exclude name="tomcat/work/Catalina/**" />
90 adouma 38310 </tarfileset>
91     <tarfileset dir="${dist.target.dir}" filemode="755">
92 fvlankvelt 38607 <include name="tomcat/bin/*.sh" />
93 adouma 38310 </tarfileset>
94     </tar>
95     </target>
96     </configuration>
97     <goals>
98     <goal>run</goal>
99     </goals>
100     </execution>
101 mnour 38704 </executions>
102     </plugin>
103     <plugin>
104     <groupId>org.apache.maven.plugins</groupId>
105     <artifactId>maven-dependency-plugin</artifactId>
106     <executions>
107 mnour 38638 <execution>
108 mnour 38704 <id>copy-common</id>
109     <phase>generate-sources</phase>
110     <goals>
111     <goal>copy</goal>
112     </goals>
113     <configuration>
114     <outputDirectory>${tomcat.target.dir}/common/lib</outputDirectory>
115     <artifactItems>
116     <!-- common spec dependencies -->
117     <artifactItem><groupId>javax.jcr</groupId><artifactId>jcr</artifactId></artifactItem>
118     <artifactItem><groupId>javax.mail</groupId><artifactId>mail</artifactId></artifactItem>
119     <artifactItem><groupId>org.apache.geronimo.specs</groupId><artifactId>geronimo-jta_1.1_spec</artifactId></artifactItem>
120     </artifactItems>
121     </configuration>
122     </execution>
123     <execution>
124     <id>copy-shared</id>
125     <phase>generate-sources</phase>
126     <goals>
127     <goal>copy</goal>
128     </goals>
129     <configuration>
130     <outputDirectory>${tomcat.target.dir}/shared/lib</outputDirectory>
131     <artifactItems>
132     <!-- shared logging dependencies -->
133     <artifactItem><groupId>org.slf4j</groupId><artifactId>slf4j-api</artifactId></artifactItem>
134     <artifactItem><groupId>org.slf4j</groupId><artifactId>jcl-over-slf4j</artifactId></artifactItem>
135     <artifactItem><groupId>org.slf4j</groupId><artifactId>slf4j-log4j12</artifactId></artifactItem>
136     <artifactItem><groupId>log4j</groupId><artifactId>log4j</artifactId></artifactItem>
137     <!-- shared hippo dependencies -->
138     <artifactItem><groupId>org.onehippo.cms7</groupId><artifactId>hippo-cms7-commons</artifactId></artifactItem>
139     <artifactItem><groupId>org.onehippo.cms7</groupId><artifactId>hippo-services</artifactId></artifactItem>
140     <artifactItem><groupId>org.onehippo.cms7</groupId><artifactId>hippo-repository-api</artifactId></artifactItem>
141     <artifactItem><groupId>org.onehippo.cms7</groupId><artifactId>hippo-repository-builtin</artifactId></artifactItem>
142     </artifactItems>
143     </configuration>
144     </execution>
145     </executions>
146     </plugin>
147     <!-- start/stop tomcat once to get the initial repository content loaded -->
148     <plugin>
149     <groupId>org.codehaus.cargo</groupId>
150     <artifactId>cargo-maven2-plugin</artifactId>
151     <executions>
152     <execution>
153 uhommes 44152 <id>cargo-start</id>
154     <phase>generate-resources</phase>
155     <goals>
156     <goal>start</goal>
157     </goals>
158 mnour 38704 </execution>
159     <execution>
160 uhommes 44152 <id>cargo-stop</id>
161     <phase>process-resources</phase>
162     <goals>
163     <goal>stop</goal>
164     </goals>
165 mnour 38704 </execution>
166     </executions>
167     <configuration>
168     <container>
169     <home>${tomcat.target.dir}</home>
170     <output>${project.build.directory}/tomcat.log</output>
171     </container>
172     <configuration>
173     <type>existing</type>
174     <home>${tomcat.target.dir}</home>
175     </configuration>
176     </configuration>
177     </plugin>
178     </plugins>
179     </build>
180     </profile>
181     <profile>
182 uhommes 44369 <id>demo-launcher</id>
183 mnour 38704 <properties>
184 abanck 44598 <demo.release.version>${hippo.release.version}</demo.release.version>
185 mnour 38704 </properties>
186     <build>
187     <defaultGoal>package</defaultGoal>
188     <plugins>
189     <plugin>
190     <groupId>org.apache.maven.plugins</groupId>
191     <artifactId>maven-antrun-plugin</artifactId>
192     <inherited>false</inherited>
193     <executions>
194     <execution>
195 mnour 38638 <id>package-demo-launchers</id>
196     <phase>package</phase>
197     <configuration>
198     <target>
199 uhommes 44152
200 uhommes 44369 <echo message="[[[ Start Building Demo Launcher ]]]" />
201 mnour 38704
202 fvlankvelt 41240 <echo message=" Copying Demo Application..." />
203 uhommes 44369 <untar src="${project.build.directory}/${project.build.finalName}.tar.gz" dest="${project.build.directory}/HippoCMS-Launcher/" overwrite="true" compression="gzip" />
204 mnour 38638
205 uhommes 44369 <echo message=" Configuring Launcher..." />
206     <echo file="${project.build.directory}/HippoCMS-Launcher/launcher.properties" append="false">
207 mnour 38704 version=${demo.release.version}
208 mnour 38694 </echo>
209    
210 uhommes 44369 <echo message=" Packaging Launcher..." />
211     <tar destfile="${project.build.directory}/HippoCMS-GoGreen-${demo.release.version}.tar.gz" compression="gzip" longfile="gnu">
212     <tarfileset dir="${project.build.directory}/HippoCMS-Launcher" prefix="HippoCMS-GoGreen-${demo.release.version}" />
213 mnour 38638 </tar>
214    
215 uhommes 44399 <zip destfile="${project.build.directory}/HippoCMS-GoGreen-${demo.release.version}.zip">
216     <zipfileset dir="${project.build.directory}/HippoCMS-Launcher" prefix="HippoCMS-GoGreen-${demo.release.version}" />
217     </zip>
218    
219 fvlankvelt 41240 <echo message=" Cleaning..." />
220 uhommes 44152
221 uhommes 44369 <!--
222     <delete dir="${project.build.directory}/HippoCMS-Launcher" />
223     -->
224 uhommes 44152
225 uhommes 44369 <echo message="[[[ Finished Building Demo Launcher ]]]" />
226 mnour 38638 </target>
227     </configuration>
228     <goals>
229     <goal>run</goal>
230     </goals>
231     </execution>
232 adouma 38310 </executions>
233     </plugin>
234     <plugin>
235     <groupId>org.apache.maven.plugins</groupId>
236     <artifactId>maven-dependency-plugin</artifactId>
237     <executions>
238     <execution>
239 mnour 38638 <id>get-demo-launchers</id>
240     <phase>prepare-package</phase>
241     <goals>
242 uhommes 44369 <goal>copy</goal>
243 mnour 38638 </goals>
244     <configuration>
245     <artifactItems>
246     <artifactItem>
247 uhommes 44369 <groupId>com.onehippo.gogreen</groupId>
248     <artifactId>hippogogreen-launcher</artifactId>
249     <classifier>jar-with-dependencies</classifier>
250     <version>${project.version}</version>
251     <type>jar</type>
252     <outputDirectory>${project.build.directory}/HippoCMS-Launcher</outputDirectory>
253 mnour 38638 <overWrite>true</overWrite>
254 uhommes 44369 <destFileName>hippocms.jar</destFileName>
255 mnour 38638 </artifactItem>
256     </artifactItems>
257     </configuration>
258     </execution>
259 adouma 38310 </executions>
260     </plugin>
261     </plugins>
262     </build>
263     </profile>
264     </profiles>
265     </project>

Properties

Name Value
svn:eol-style native
svn:keywords Id
svn:mime-type text/plain