Seam SVN: r14987 - in branches/enterprise/JBPAPP_5_0/build: embedded and 1 other directory.
by seam-commits@lists.jboss.org
Author: manaRH
Date: 2012-07-19 09:59:53 -0400 (Thu, 19 Jul 2012)
New Revision: 14987
Modified:
branches/enterprise/JBPAPP_5_0/build/embedded/build.xml
branches/enterprise/JBPAPP_5_0/build/utilities.build.xml
Log:
added shaded sources install
Modified: branches/enterprise/JBPAPP_5_0/build/embedded/build.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/build/embedded/build.xml 2012-07-18 20:04:46 UTC (rev 14986)
+++ branches/enterprise/JBPAPP_5_0/build/embedded/build.xml 2012-07-19 13:59:53 UTC (rev 14987)
@@ -8,6 +8,7 @@
<property name="tmp.dir" value="${seam.dir}/classes" />
<property name="lib.dir" value="${seam.dir}/lib" />
<import file="../utilities.build.xml" />
+ <import file="../common.build.xml" />
<property name="maven.settings.xml" value="../settings.xml" />
@@ -25,7 +26,11 @@
<artifact:install-provider artifactId="wagon-webdav" version="1.0-beta-2"/>
</target>
- <target name="shadeEmbedded">
+ <target name="copyRequiredDependenciesWithSources" depends="initpoms">
+ <copyDependenciesWithSources id="core" scope="compile" pom="${core.pom}" todir="../../lib"/>
+ </target>
+
+ <target name="shadeEmbedded" depends="copyRequiredDependenciesWithSources">
<delete dir="${shaded.embedded.jars.dir}" failonerror="off"/>
<mkdir dir="${shaded.embedded.jars.dir}" />
<jar destfile="${shaded.embedded.jars.dir}/hibernate-all.jar" >
@@ -39,18 +44,32 @@
<zipfileset src="${embedded.jars.dir}/thirdparty-all.jar" />
<zipfileset src="${lib.dir}/lucene-core.jar"/>
</jar>
+ <jar destfile="${shaded.embedded.jars.dir}/hibernate-all-sources.jar" >
+ <zipfileset src="${embedded.jars.dir}/hibernate-all-sources.jar">
+ <exclude name="META-INF/JBOSSCOD.*" />
+ </zipfileset>
+
+ <zipfileset src="${lib.dir}/hibernate-search-sources.jar"/>
+ </jar>
+ <!-- don't have thirdparty-all-sources.jar :-(
+ <jar destfile="${shaded.embedded.jars.dir}/thirdparty-all-sources.jar" duplicate="preserve">
+ <zipfileset src="${embedded.jars.dir}/thirdparty-all-sources.jar" />
+ <zipfileset src="${lib.dir}/lucene-core-sources.jar"/>
+ </jar>
+-->
<copy file="${embedded.jars.dir}/jboss-embedded.jar" todir="${shaded.embedded.jars.dir}" />
+ <copy file="${embedded.jars.dir}/jboss-embedded-sources.jar" todir="${shaded.embedded.jars.dir}" />
<copy file="${embedded.jars.dir}/jboss-embedded-all.jar" todir="${shaded.embedded.jars.dir}" />
</target>
<target name="installEmbedded" depends="shadeEmbedded">
- <install pom="${embedded.poms.dir}/shaded/jboss-embedded.pom.xml" jar="${shaded.embedded.jars.dir}/jboss-embedded.jar" />
+ <installWithSources pom="${embedded.poms.dir}/shaded/jboss-embedded.pom.xml" jar="${shaded.embedded.jars.dir}/jboss-embedded.jar" sources="${shaded.embedded.jars.dir}/jboss-embedded-sources.jar"/>
<install pom="${embedded.poms.dir}/shaded/jboss-embedded-all.pom.xml" jar="${shaded.embedded.jars.dir}/jboss-embedded-all.jar" />
- <install pom="${embedded.poms.dir}/shaded/hibernate-all.pom.xml" jar="${shaded.embedded.jars.dir}/hibernate-all.jar" />
+ <installWithSources pom="${embedded.poms.dir}/shaded/hibernate-all.pom.xml" jar="${shaded.embedded.jars.dir}/hibernate-all.jar" sources="${shaded.embedded.jars.dir}/hibernate-all-sources.jar"/>
<install pom="${embedded.poms.dir}/shaded/thirdparty-all.pom.xml" jar="${shaded.embedded.jars.dir}/thirdparty-all.jar" />
- <install pom="${embedded.poms.dir}/jboss-embedded.pom.xml" jar="${embedded.jars.dir}/jboss-embedded.jar" />
+ <installWithSources pom="${embedded.poms.dir}/jboss-embedded.pom.xml" jar="${embedded.jars.dir}/jboss-embedded.jar" sources="${embedded.jars.dir}/jboss-embedded-sources.jar"/>
<install pom="${embedded.poms.dir}/jboss-embedded-all.pom.xml" jar="${embedded.jars.dir}/jboss-embedded-all.jar" />
- <install pom="${embedded.poms.dir}/hibernate-all.pom.xml" jar="${embedded.jars.dir}/hibernate-all.jar" />
+ <installWithSources pom="${embedded.poms.dir}/hibernate-all.pom.xml" jar="${embedded.jars.dir}/hibernate-all.jar" sources="${embedded.jars.dir}/hibernate-all-sources.jar"/>
<install pom="${embedded.poms.dir}/thirdparty-all.pom.xml" jar="${embedded.jars.dir}/thirdparty-all.jar" />
</target>
Modified: branches/enterprise/JBPAPP_5_0/build/utilities.build.xml
===================================================================
--- branches/enterprise/JBPAPP_5_0/build/utilities.build.xml 2012-07-18 20:04:46 UTC (rev 14986)
+++ branches/enterprise/JBPAPP_5_0/build/utilities.build.xml 2012-07-19 13:59:53 UTC (rev 14987)
@@ -50,6 +50,18 @@
</sequential>
</macrodef>
+ <macrodef name="inlineDependenciesWithSources">
+ <attribute name="id" />
+ <attribute name="scope" />
+ <element name="inline" implicit="true"/>
+ <sequential>
+ <artifact:dependencies pathId="@{scope}.(a){id}.path" filesetId="@{scope}.(a){id}.fileset" versionsId="@{scope}.(a){id}.versions" useScope="@{scope}" sourcesFilesetId="@{scope}.(a){id}.source.fileset" settingsFile="${maven.settings.xml}">
+ <inline />
+ </artifact:dependencies>
+ </sequential>
+ </macrodef>
+
+
<macrodef name="dependenciesWithSources">
<attribute name="id" />
<attribute name="scope" />
@@ -84,6 +96,21 @@
</sequential>
</macrodef>
+ <macrodef name="installWithSources">
+ <attribute name="pom" default="" />
+ <attribute name="jar" default="" />
+ <attribute name="sources" default="" />
+ <element name="args" implicit="true" optional="true" />
+ <sequential>
+ <artifact:install file="@{jar}" settingsFile="${maven.settings.xml}">
+ <pom file="@{pom}" settingsFile="${maven.settings.xml}" />
+ <attach file="@{sources}" type="jar" classifier="sources"/>
+ <args />
+ </artifact:install>
+ </sequential>
+ </macrodef>
+
+
<macrodef name="deploy">
<attribute name="pom" default="" />
<attribute name="jar" default="" />
@@ -173,6 +200,26 @@
</sequential>
</macrodef>
+ <!-- Copy dependencies and sources from a given pom/scope to a directory, flattening
+ the directory structure and version information -->
+ <macrodef name="copyDependenciesWithSources">
+ <attribute name="id" />
+ <attribute name="scope" />
+ <attribute name="pom" />
+ <attribute name="todir" />
+ <sequential>
+ <dependenciesWithSources id="@{id}" scope="@{scope}" pom="@{pom}" />
+ <copy todir="@{todir}">
+ <fileset refid="@{scope}.(a){id}.fileset" />
+ <fileset refid="@{scope}.(a){id}.source.fileset" />
+ <chainedmapper>
+ <mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper" from="${@{scope}.(a){id}.versions}" to="flatten" />
+ <flattenmapper />
+ </chainedmapper>
+ </copy>
+ </sequential>
+ </macrodef>
+
<!-- Copy dependencies from a given pom/scope to a directory, flattening
the directory structure and version information -->
<macrodef name="copyInlineDependencies">