Repository: flex-falcon Updated Branches: refs/heads/develop 466e90046 -> 30139d0fc
Implemented maven artifact generation. Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/30139d0f Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/30139d0f Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/30139d0f Branch: refs/heads/develop Commit: 30139d0fc00d004d33e763a97f58e75293498c09 Parents: 466e900 Author: Christofer Dutz <christofer.d...@codecentric.de> Authored: Sat Aug 23 09:23:36 2014 +0200 Committer: Christofer Dutz <christofer.d...@codecentric.de> Committed: Sat Aug 23 09:23:52 2014 +0200 ---------------------------------------------------------------------- build.xml | 4 +++ compiler/.gitignore | 1 + compiler/build.xml | 61 +++++++++++++++++++++++++++++++++++++++++++++ compiler/downloads.xml | 18 ++++++++++++- 4 files changed, 83 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/30139d0f/build.xml ---------------------------------------------------------------------- diff --git a/build.xml b/build.xml index bf5c809..3851d8b 100644 --- a/build.xml +++ b/build.xml @@ -122,6 +122,10 @@ <delete dir="${basedir}/temp" failonerror="false" includeEmptyDirs="true"/> </target> + <target name="maven-artifacts" description="Installs Falcon artifacts to a local maven repository"> + <ant dir="compiler" target="maven-artifacts"/> + </target> + <target name="check-flex-home" unless="mxmlc.jar.exists" description="Check FLEX_HOME for both a directory and an exe file"> http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/30139d0f/compiler/.gitignore ---------------------------------------------------------------------- diff --git a/compiler/.gitignore b/compiler/.gitignore index b333dc1..6dde787 100644 --- a/compiler/.gitignore +++ b/compiler/.gitignore @@ -2,6 +2,7 @@ /generated /lib /in +/utils #local settings local.properties \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/30139d0f/compiler/build.xml ---------------------------------------------------------------------- diff --git a/compiler/build.xml b/compiler/build.xml index d12971a..13d1ce8 100644 --- a/compiler/build.xml +++ b/compiler/build.xml @@ -1048,6 +1048,66 @@ <!-- + CREATE MAVEN ARTIFACTS + + --> + + <target name="maven-artifacts" depends="sdk" xmlns:artifact="antlib:org.apache.maven.artifact.ant"> + + <!-- Make sure the maven-ant-tasks jar is available. --> + <ant antfile="downloads.xml" target="maven-related"/> + + <!-- Setup the maven-ant-tasks. --> + <path id="maven-ant-tasks.classpath" path="utils/maven-ant-tasks.jar" /> + <typedef resource="org/apache/maven/artifact/ant/antlib.xml" + uri="antlib:org.apache.maven.artifact.ant" + classpathref="maven-ant-tasks.classpath"/> + + <property name="falcon.version" value="${manifest.Implementation-Version}"/> + <mkdir dir="generated/maven"/> + + <!-- + Remark: + There currently seems to be a bug in the maven-ant-tasks that + prevents the install target from working correctly. Therefore + instead of directly defining the pom, we have to define it, + write it to disk and use the disk-pom to install the artifact. + --> + + <!-- Install jburg as it's not publicly available in Maven --> + <artifact:pom id="jburgPom" groupId="net.sourceforge.jburg" artifactid="jburg" version="1.10.1"/> + <artifact:writepom pomrefid="jburgPom" file="generated/maven/jburg.pom"/> + <artifact:install file="lib/jburg.jar"> + <artifact:pom file="generated/maven/jburg.pom"/> + </artifact:install> + + <!-- Install lzma-sdk as it's not publicly available in Maven --> + <artifact:pom id="lzmaSdkPom" groupId="de.7zip" artifactid="lzma-sdk" version="9.20"/> + <artifact:writepom pomrefid="lzmaSdkPom" file="generated/maven/lzma-sdk.pom"/> + <artifact:install file="lib/lzma-sdk.jar"> + <artifact:pom file="generated/maven/lzma-sdk.pom"/> + </artifact:install> + + <!-- Install falcon --> + <artifact:pom id="falconPom" groupId="org.apache.flex.compiler.falcon" artifactId="compiler" + version="${falcon.version}"> + <artifact:dependency groupId="org.antlr" artifactId="antlr" version="3.5.2"/> + <artifact:dependency groupId="commons-cli" artifactId="commons-cli" version="1.2"/> + <artifact:dependency groupId="commons-io" artifactId="commons-io" version="2.4"/> + <artifact:dependency groupId="com.google.guava" artifactId="guava" version="17.0"/> + <artifact:dependency groupId="net.sourceforge.jburg" artifactId="jburg" version="1.10.1"/> + <artifact:dependency groupId="de.jflex" artifactId="jflex" version="1.6.0"/> + <artifact:dependency groupId="de.7zip" artifactId="lzma" version="9.20"/> + <artifact:license name="apache" url="http://www.apache.org"/> + </artifact:pom> + <artifact:writepom pomrefid="falconPom" file="generated/maven/compiler.pom"/> + <artifact:install file="generated/dist/sdk/lib/compiler.jar"> + <artifact:pom file="generated/maven/compiler.pom"/> + </artifact:install> + </target> + + <!-- + CLEANUP --> @@ -1058,6 +1118,7 @@ <target name="wipe" depends="clean" description="Wipes everything that didn't come from Git."> <delete dir="${compiler}/lib"/> + <delete dir="${compiler}/utils"/> </target> </project> http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/30139d0f/compiler/downloads.xml ---------------------------------------------------------------------- diff --git a/compiler/downloads.xml b/compiler/downloads.xml index 20ff5c3..afcd8bd 100644 --- a/compiler/downloads.xml +++ b/compiler/downloads.xml @@ -206,7 +206,23 @@ <param name="dest.filename" value="${lzma.name}-sdk.jar"/> <param name="license.use.url" value="http://www.7-zip.org/sdk.html"/> </antcall> - + </target> + + <target name="maven-related" description="Downloads and copies all dependencies to the lib directory."> + <!-- maven-ant-tasks --> + <property name="mavenAntTasks.name" value="maven-ant-tasks"/> + <property name="mavenAntTasks.version" value="2.1.3"/> + <antcall target="download-dependency"> + <param name="name" value="${mavenAntTasks.name}"/> + <param name="src.server" value="${maven.search.url}"/> + <param name="src.folder" value="org/apache/maven/${mavenAntTasks.name}/${mavenAntTasks.version}"/> + <param name="src.filename" value="${mavenAntTasks.name}-${mavenAntTasks.version}.jar"/> + <param name="src.checksum" value="7ce48382d1aa4138027a58ec2f29beda"/> + <!-- We don't want the maven-ant-tasks lib as part of the sdk --> + <param name="dest.folder" value="../utils"/> + <param name="dest.filename" value="${mavenAntTasks.name}.jar"/> + <param name="license.use.apache" value="true"/> + </antcall> </target>