shuber 2004/08/12 17:43:41 CEST
Modified files:
core maven.xml project.properties
Log:
Updated preGoal for war:war that is much more configurable.
Revision Changes Path
1.20 +34 -14 jahia/core/maven.xml
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/maven.xml.diff?r1=1.19&r2=1.20&f=h
1.11 +8 -0 jahia/core/project.properties
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/project.properties.diff?r1=1.10&r2=1.11&f=h
Index: maven.xml
===================================================================
RCS file: /cvs/jahia/core/maven.xml,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- maven.xml 11 Aug 2004 14:18:16 -0000 1.19
+++ maven.xml 12 Aug 2004 15:43:41 -0000 1.20
@@ -168,20 +168,40 @@
</goal>
<preGoal name="war:war">
- <jar
destfile="${maven.build.dir}/${pom.artifactId}/WEB-INF/lib/${pom.artifactId}-${pom.currentVersion}.jar"
- basedir="${maven.build.dir}/${pom.artifactId}/WEB-INF/classes"
- includes="**/*.class"
- />
- <!-- we do all this mess because the delete includeEmptyDirs doesn't seem to
work in Ant :( -->
- <copy includeEmptyDirs="false"
toDir="${maven.build.dir}/${pom.artifactId}/WEB-INF/classes_justresources">
- <fileset dir="${maven.build.dir}/${pom.artifactId}/WEB-INF/classes">
- <exclude name="**/*.class"/>
- </fileset>
- </copy>
- <delete dir="${maven.build.dir}/${pom.artifactId}/WEB-INF/classes" />
- <move todir="${maven.build.dir}/${pom.artifactId}/WEB-INF/classes">
- <fileset
dir="${maven.build.dir}/${pom.artifactId}/WEB-INF/classes_justresources"/>
- </move>
+ <j:set var="mavenWarJarClasses" value="${maven.war.jarclasses}"/>
+ <j:set var="mavenWarJarClassesJustClasses"
value="${maven.war.jarclasses.justclasses}"/>
+ <j:set var="mavenWarJarClassesName" value="${maven.war.jarclasses.name}"/>
+ <j:if test="${mavenWarJarClasses == 'true'}" trim="true">
+ <j:choose>
+
+ <j:when test="${mavenWarJarClassesJustClasses == 'true'}" trim="true">
+ <jar
destfile="${maven.build.dir}/${pom.artifactId}/WEB-INF/lib/${mavenWarJarClassesName}"
+ basedir="${maven.build.dir}/${pom.artifactId}/WEB-INF/classes"
+ includes="**/*.class"
+ />
+ <!-- we do all this mess because the delete includeEmptyDirs doesn't seem
to work in Ant :( -->
+ <copy includeEmptyDirs="false"
toDir="${maven.build.dir}/${pom.artifactId}/WEB-INF/classes_justresources">
+ <fileset dir="${maven.build.dir}/${pom.artifactId}/WEB-INF/classes">
+ <exclude name="**/*.class"/>
+ </fileset>
+ </copy>
+ <delete dir="${maven.build.dir}/${pom.artifactId}/WEB-INF/classes" />
+ <move todir="${maven.build.dir}/${pom.artifactId}/WEB-INF/classes">
+ <fileset
dir="${maven.build.dir}/${pom.artifactId}/WEB-INF/classes_justresources"/>
+ </move>
+ </j:when>
+
+ <j:otherwise>
+ <jar
destfile="${maven.build.dir}/${pom.artifactId}/WEB-INF/lib/${mavenWarJarClassesName}"
+ basedir="${maven.build.dir}/${pom.artifactId}/WEB-INF/classes"
+ includes="**/*"
+ />
+ <delete dir="${maven.build.dir}/${pom.artifactId}/WEB-INF/classes" />
+ <mkdir dir="${maven.build.dir}/${pom.artifactId}/WEB-INF/classes" />
+ </j:otherwise>
+
+ </j:choose>
+ </j:if>
</preGoal>
</project>
Index: project.properties
===================================================================
RCS file: /cvs/jahia/core/project.properties,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- project.properties 28 Jul 2004 17:33:55 -0000 1.10
+++ project.properties 12 Aug 2004 15:43:41 -0000 1.11
@@ -9,6 +9,14 @@
# Web.xml file location
#maven.war.webxml=${maven.src.dir}/conf/metadata/war/web.xml
+# Settings for preGoal for packaging of WEB-INF/classes into a JAR in WEB-INF/lib
+# set to true if you want the contents of WEB-INF/classes to be packaged into a JAR
in WEB-INF/lib
+maven.war.jarclasses=true
+# the name of the JAR in WEB-INF/lib
+maven.war.jarclasses.name=${pom.artifactId}-${pom.currentVersion}.jar
+# set to true if you only want the *.class files in the JAR, false will include the
whole contents of WEB-INF/classes
+maven.war.jarclasses.justclasses=true
+
maven.repo.remote = http://maven.jahia.org, http://www.bluesunrise.com/maven/,
http://www.ibiblio.org/maven/
#####################################################