Permalink
Browse files

Made it possible to use ANT to build the project

  • Loading branch information...
1 parent 2b2fc59 commit f00b7b9b4a2ca5dec05e9a82df7f9521f11bd315 @quintesse quintesse committed Jan 17, 2012
View
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="api/src/main/java"/>
+ <classpathentry kind="src" path="bootstrap/src/main/java"/>
+ <classpathentry kind="src" path="impl/src/main/java"/>
+ <classpathentry kind="src" path="spi/src/main/java"/>
+ <classpathentry kind="src" path="testsuite/src/test/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/ceylon-module-resolver"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/ceylon.language"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
+ <classpathentry kind="lib" path="lib/shrinkwrap-api-1.0.0-cr-1.jar"/>
+ <classpathentry kind="lib" path="lib/jboss-modules.jar"/>
+ <classpathentry kind="output" path="testsuite/target/test-classes"/>
+</classpath>
View
@@ -28,3 +28,4 @@ testsuite/target/
mc/target/
osgi/target/
sdk/target/
+build/
View
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>ceylon-runtime</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
View
@@ -0,0 +1,34 @@
+# ----- Version Control Flags -----
+module.ceylon.language.version=0.1
+module.com.redhat.ceylon.module-resolver.version=0.1
+
+base.path=${basedir}/lib
+
+# ----- JBoss Modules ---
+jboss-modules.version=1.1.0.CR4
+jboss-modules.jar=jboss-modules.jar
+jboss-modules.url=
+jboss-modules.dir=org/jboss/modules
+jboss-modules.lib=${base.path}/${jboss-modules.jar}
+
+# ----- JBoss Shrinkwrap libraries ---
+shrinkwrap-api.version=1.0.0-cr-1
+shrinkwrap-api.jar=shrinkwrap-api-${shrinkwrap-api.version}.jar
+shrinkwrap-api.url=
+shrinkwrap-api.lib=${base.path}/${shrinkwrap-api.jar}
+
+shrinkwrap-impl-base.version=1.0.0-cr-1
+shrinkwrap-impl-base.jar=shrinkwrap-impl-base-${shrinkwrap-impl-base.version}.jar
+shrinkwrap-impl-base.url=
+shrinkwrap-impl-base.lib=${base.path}/${shrinkwrap-impl-base.jar}
+
+shrinkwrap-spi.version=1.0.0-cr-1
+shrinkwrap-spi.jar=shrinkwrap-spi-${shrinkwrap-spi.version}.jar
+shrinkwrap-spi.url=
+shrinkwrap-spi.lib=${base.path}/${shrinkwrap-spi.jar}
+
+# ----- JUnit Unit Test Suite, version 4.9 or later ---
+junit.version=4.9b2
+junit.jar=junit-${junit.version}.jar
+junit.url=http://cloud.github.com/downloads/KentBeck/junit/junit${junit.version}.zip
+junit.lib=${base.path}/${junit.jar}
View
186 build.xml
@@ -0,0 +1,186 @@
+<project name="Ceylon runtime module" default="dist" basedir=".">
+ <property file="build.properties"/>
+
+ <!-- Local repository -->
+ <property name="ceylon.repo.dir" location="${user.home}/.ceylon/repo"/>
+ <property name="ceylon.language.dir" value="ceylon/language/${module.ceylon.language.version}"/>
+ <property name="ceylon.language.car" value="${ceylon.language.dir}/ceylon.language-${module.ceylon.language.version}.car"/>
+ <property name="ceylon.language.lib" location="${ceylon.repo.dir}/${ceylon.language.car}"/>
+ <property name="ceylon.module-resolver.dir" value="com/redhat/ceylon/module-resolver/${module.com.redhat.ceylon.module-resolver.version}"/>
+ <property name="ceylon.module-resolver.jar" value="${ceylon.module-resolver.dir}/com.redhat.ceylon.module-resolver-${module.com.redhat.ceylon.module-resolver.version}.jar"/>
+ <property name="ceylon.module-resolver.lib" location="${ceylon.repo.dir}/${ceylon.module-resolver.jar}"/>
+
+ <!-- Set build directories for all formats. -->
+ <property name="build.dir" value="${basedir}/build"/>
+ <property name="build.classes" location="${build.dir}/classes"/>
+ <property name="build.dist" location="${build.dir}/dist"/>
+ <property name="build.dist.lib" location="${build.dist}/lib"/>
+ <property name="build.dist.repo" location="${build.dist}/runtime-repo"/>
+ <property name="build.lib" location="${build.dir}/lib"/>
+ <property name="build.bootstrap" location="${build.dir}/test"/>
+ <property name="build.test" location="${build.dir}/test"/>
+ <property name="test.reports" location="${build.dir}/test-reports"/>
+
+ <property name="dist.dir" value="${basedir}/dist"/>
+
+ <!-- The Java source files for the runtime -->
+ <property name="runtime-api.src" location="${basedir}/api/src/main/java"/>
+ <property name="runtime-impl.src" location="${basedir}/impl/src/main/java"/>
+ <property name="runtime-spi.src" location="${basedir}/spi/src/main/java"/>
+
+ <!-- jar generated -->
+ <property name="bootstrap.jar" value="ceylon-runtime-bootstrap.jar"/>
+ <property name="bootstrap.lib" location="${build.lib}/${bootstrap.jar}"/>
+ <property name="runtime.lib" location="${build.lib}/runtime.jar"/>
+
+ <property name="runtime-test.src" location="${basedir}/testsuite/src/test/java"/>
+
+ <tstamp/>
+
+ <!-- ceylon.runtime -->
+ <property name="module.runtime.dir" value="ceylon/runtime"/>
+ <property name="module.runtime.name" value="ceylon.runtime"/>
+
+ <!-- module archives -->
+ <property name="ceylon.runtime.dir" value="runtime-repo/${module.runtime.dir}/main"/>
+ <property name="ceylon.runtime.jar" value="${ceylon.runtime.dir}/${module.runtime.name}.jar"/>
+ <property name="ceylon.runtime.dist" value="${build.dist}/${ceylon.runtime.dir}"/>
+
+ <path id="compiler.classpath">
+ <pathelement path="${ceylon.language.lib}"/>
+ <pathelement path="${ceylon.module-resolver.lib}"/>
+ <pathelement path="${jboss-modules.lib}"/>
+ </path>
+
+ <path id="test.build.classpath">
+ <path refid="compiler.classpath"/>
+ <pathelement path="${build.classes}"/>
+ <pathelement path="${shrinkwrap-api.lib}"/>
+ <pathelement path="${junit.lib}"/>
+ </path>
+
+ <path id="test.run.classpath">
+ <path refid="test.build.classpath"/>
+ <pathelement path="${build.test}"/>
+ <pathelement path="${shrinkwrap-impl-base.lib}"/>
+ <pathelement path="${shrinkwrap-spi.lib}"/>
+ </path>
+
+ <!-- ################################################################## -->
+ <!-- constant to declare a file binary for checksumsum -->
+ <property name="checksum.binary-prefix" value=" *" />
+ <!-- Helper target, used to create a sha1 checksum file -->
+ <!-- Requires 'file' as a parameter. -->
+ <target name="sha1sum">
+ <fail unless="file"/>
+ <fail if="filename"/>
+ <fail if="value"/>
+ <basename file="${file}" property="filename"/>
+ <checksum file="${file}" property="value" algorithm="sha1"/>
+ <echo file="${file}.sha1" message="${value}"/>
+ </target>
+
+ <!-- Rule to clean everything up -->
+ <target name="clean" description="Clean up everything">
+ <delete dir="${build.dir}"/>
+ </target>
+
+ <target name="dist"
+ depends="build"
+ description="Create Ceylon runtime distribution">
+ <!-- Setup the basic structure of the dist folder by copying the template folder -->
+ <copy todir="${build.dist}">
+ <fileset dir="${dist.dir}"/>
+ </copy>
+ <!-- Copy the libraries -->
+ <copy file="${bootstrap.lib}" tofile="${build.dist.lib}/${bootstrap.jar}"/>
+ <copy file="${jboss-modules.lib}" tofile="${build.dist.lib}/${jboss-modules.jar}"/>
+ <!-- Copy the Ceylon runtime dependencies -->
+ <copy file="${jboss-modules.lib}" tofile="${build.dist.repo}/${jboss-modules.dir}/main/${jboss-modules.jar}"/>
+ <copy file="${ceylon.language.lib}" tofile="${build.dist.repo}/${ceylon.language.car}"/>
+ <copy file="${ceylon.module-resolver.lib}" tofile="${build.dist.repo}/${ceylon.module-resolver.jar}"/>
+ <copy file="${runtime.lib}" tofile="${build.dist}/${ceylon.runtime.jar}"/>
+ </target>
+
+ <!-- Tasks related to building the runtime -->
+ <!-- Rule to build runtime classes from their Java sources -->
+ <target name="runtime.classes" >
+ <mkdir dir="${build.classes}"/>
+ <javac debug="true"
+ srcdir="${runtime-spi.src}"
+ destdir="${build.classes}"
+ classpathref="compiler.classpath"
+ includeantruntime="false"/>
+ <javac debug="true"
+ srcdir="${runtime-api.src}"
+ destdir="${build.classes}"
+ classpathref="compiler.classpath"
+ includeantruntime="false"/>
+ <javac debug="true"
+ srcdir="${runtime-impl.src}"
+ destdir="${build.classes}"
+ classpathref="compiler.classpath"
+ includeantruntime="false"/>
+ </target>
+
+ <!-- Rule to build runtime jar -->
+ <target name="runtime.jar" depends="runtime.classes">
+ <mkdir dir="${build.lib}"/>
+ <jar destfile="${runtime.lib}">
+ <fileset dir="${build.classes}">
+ </fileset>
+ </jar>
+ </target>
+
+ <!-- Tasks related to building the runtime -->
+ <!-- Rule to build runtime classes from their Java sources -->
+ <target name="bootstrap.classes" >
+ <mkdir dir="${build.bootstrap}"/>
+ <javac debug="true"
+ srcdir="${runtime-spi.src}"
+ destdir="${build.bootstrap}"
+ classpathref="compiler.classpath"
+ includeantruntime="false"/>
+ </target>
+
+ <!-- Rule to build runtime jar -->
+ <target name="bootstrap.jar" depends="bootstrap.classes">
+ <mkdir dir="${build.lib}"/>
+ <jar destfile="${bootstrap.lib}">
+ <fileset dir="${build.bootstrap}">
+ </fileset>
+ </jar>
+ </target>
+
+ <!-- Rule to compile and test -->
+ <target name="build" depends="runtime.jar,bootstrap.jar"/>
+
+ <target name="compile.tests" depends="build">
+ <mkdir dir="${build.test}"/>
+ <javac debug="true"
+ srcdir="${runtime-test.src}"
+ destdir="${build.test}"
+ classpathref="test.build.classpath"
+ includeantruntime="false"/>
+ </target>
+
+ <target name="test" depends="compile.tests" description="Runs the JUnit tests">
+ <mkdir dir="${test.reports}"/>
+ <junit printsummary="yes" haltonfailure="no">
+ <classpath refid="test.run.classpath"/>
+ <formatter type="xml"/>
+ <batchtest fork="yes" todir="${test.reports}">
+ <fileset dir="${runtime-test.src}">
+ <include name="**/*TestCase.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+
+ <junitreport todir="${test.reports}">
+ <fileset dir="${test.reports}">
+ <include name="TEST-*.xml"/>
+ </fileset>
+ <report format="frames" todir="${test.reports}"/>
+ </junitreport>
+ </target>
+</project>
@@ -24,16 +24,14 @@
<module xmlns="urn:jboss:module:1.0" name="ceylon.runtime">
<resources>
- <resource-root path="ceylon.modules.spi.jar"/>
- <resource-root path="ceylon.modules.api.jar"/>
- <resource-root path="ceylon.modules.jboss.jar"/>
+ <resource-root path="ceylon.runtime.jar"/>
</resources>
<main-class name="ceylon.modules.Main"/>
<dependencies>
<module name="ceylon.language" slot="0.1"/>
- <module name="com.redhat.ceylon.cmr"/>
+ <module name="com.redhat.ceylon.module-resolver" slot="0.1"/>
<module name="org.jboss.modules"/>
</dependencies>
</module>
@@ -22,11 +22,9 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<module xmlns="urn:jboss:module:1.0" name="com.redhat.ceylon.cmr">
+<module xmlns="urn:jboss:module:1.0" name="com.redhat.ceylon.module-resolver" slot="0.1">
<resources>
- <resource-root path="cmr-spi.jar"/>
- <resource-root path="cmr-api.jar"/>
- <resource-root path="cmr-impl.jar"/>
+ <resource-root path="com.redhat.ceylon.module-resolver-0.1.jar"/>
</resources>
<dependencies>
View
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit f00b7b9

Please sign in to comment.