summaryrefslogtreecommitdiff
path: root/build.xml
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-08-16 17:22:21 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-08-27 11:10:30 -0700
commit67600a72d47900a22e97d82f236cca1b0153674e (patch)
tree7148767332d1a25146d50c65eb4d6c295a974c8e /build.xml
parent9c50dd52743b7ff4de19548669dfa7e7a0304034 (diff)
downloadscala-67600a72d47900a22e97d82f236cca1b0153674e.tar.gz
scala-67600a72d47900a22e97d82f236cca1b0153674e.tar.bz2
scala-67600a72d47900a22e97d82f236cca1b0153674e.zip
Remove scala-xml and scala-parser-combinators
These modules move to their own repositories: - https://github.com/scala/scala-xml (v1.0-RC3) - https://github.com/scala/scala-parser-combinators (v1.0-RC1) The modularization depends on the new partest, as the old one's classpath handling did not support a modularized scala. The compiler pom now depends on the artifacts published separately, with versions specified in versions.properties. NOTES: - The osgi tests resolve the xml and parsers jars and osgi-fy them, as they are no longer built locally. TODO: Can we move the osgification to the module builds? - Disabled local repositories: don't want to accidentally include unpublished artifacts in releases etc.
Diffstat (limited to 'build.xml')
-rwxr-xr-xbuild.xml139
1 files changed, 68 insertions, 71 deletions
diff --git a/build.xml b/build.xml
index f428734ee0..8bcfbf47e2 100755
--- a/build.xml
+++ b/build.xml
@@ -250,11 +250,14 @@ TODO:
</artifact:dependencies>
+ <artifact:remoteRepository id="sonatype-release" url="https://oss.sonatype.org/content/repositories/releases"/>
+
<artifact:dependencies pathId="partest.classpath" filesetId="partest.fileset" versionsId="partest.versions">
- <!-- to facilitate building and publishing partest locally -->
- <localRepository path="${user.home}/.m2/repository"/>
+ <!-- uncomment the following to facilitate building and publishing modules locally
+ not on by default to avoid using unpublished jars in releases -->
+ <!-- <localRepository path="${user.home}/.m2/repository"/> -->
<!-- so we don't have to wait for artifacts to synch to maven central: -->
- <artifact:remoteRepository id="sonatype-release" url="https://oss.sonatype.org/content/repositories/releases"/>
+ <artifact:remoteRepository refid="sonatype-release"/>
<dependency groupId="org.scala-lang.modules" artifactId="scala-partest_${scala.binary.version}" version="${partest.version.number}" />
</artifact:dependencies>
<copy-deps fileset.prefix="partest" out="partest"/>
@@ -264,6 +267,45 @@ TODO:
</artifact:dependencies>
<copy-deps fileset.prefix="repl.deps" out="repl"/>
+ <artifact:dependencies pathId="scaladoc.deps.classpath" filesetId="scaladoc.deps.fileset" versionsId="scaladoc.deps.versions">
+ <!-- uncomment the following to facilitate building and publishing modules locally
+ not on by default to avoid using unpublished jars in releases -->
+ <!-- <localRepository path="${user.home}/.m2/repository"/> -->
+ <!-- so we don't have to wait for artifacts to synch to maven central: -->
+ <artifact:remoteRepository refid="sonatype-release"/>
+ <dependency groupId="org.scala-lang.modules" artifactId="scala-xml_${scala.binary.version}" version="${scala-xml.version.number}"/>
+ <dependency groupId="org.scala-lang.modules" artifactId="scala-parser-combinators_${scala.binary.version}" version="${scala-parser-combinators.version.number}"/>
+ </artifact:dependencies>
+ <copy-deps fileset.prefix="scaladoc.deps" out="scaladoc"/>
+
+ <!-- used by the test.osgi target to create osgi bundles for the xml, parser-combinator jars -->
+ <artifact:dependencies pathId="osgi.deps.classpath" filesetId="osgi.deps.fileset" versionsId="osgi.deps.versions">
+ <!-- so we don't have to wait for artifacts to synch to maven central: -->
+ <artifact:remoteRepository refid="sonatype-release"/>
+ <dependency groupId="org.scala-lang.modules" artifactId="scala-xml_${scala.binary.version}" version="${scala-xml.version.number}"/>
+ <dependency groupId="org.scala-lang.modules" artifactId="scala-parser-combinators_${scala.binary.version}" version="${scala-parser-combinators.version.number}"/>
+ </artifact:dependencies>
+
+ <!-- Set property named @{name} to the jar resolved as @{jar}_${scala.binary.version}:jar.
+ @{jar}_${scala.binary.version} must be a maven dependency. -->
+ <macrodef name="propertyCrossedJar">
+ <attribute name="name" />
+ <attribute name="jar" />
+ <sequential>
+ <readProperty name="@{name}" property="@{jar}_${scala.binary.version}:jar" />
+ </sequential>
+ </macrodef>
+
+ <!-- Set property named @{name} to the value of the property named @{property}.
+ Helper for performing nested property expansion without using the ant props lib -->
+ <macrodef name="readProperty">
+ <attribute name="name" />
+ <attribute name="property" />
+ <sequential>
+ <property name="@{name}" value="${@{property}}" />
+ </sequential>
+ </macrodef>
+
<!-- BND support -->
<typedef resource="aQute/bnd/ant/taskdef.properties" classpathref="extra.tasks.classpath" />
@@ -500,7 +542,7 @@ TODO:
There must be a variable of the shape @{stage}.@{project}.build.path
for all @{stage} in locker, quick, strap
and all @{project} in library, reflect, compiler
- when stage is quick, @{project} also includes: actors, parser-combinators, xml, repl, swing, plugins, scalacheck, interactive, scaladoc, scalap
+ when stage is quick, @{project} also includes: actors, repl, swing, plugins, interactive, scaladoc, scalap
-->
<!-- LOCKER -->
@@ -541,11 +583,6 @@ TODO:
<pathelement location="${build-quick.dir}/classes/actors"/>
</path>
- <path id="quick.parser-combinators.build.path">
- <path refid="quick.library.build.path"/>
- <pathelement location="${build-quick.dir}/classes/parser-combinators"/>
- </path>
-
<path id="quick.reflect.build.path">
<path refid="quick.library.build.path"/>
<pathelement location="${build-quick.dir}/classes/reflect"/>
@@ -563,11 +600,6 @@ TODO:
<path refid="repl.deps.classpath"/>
</path>
- <path id="quick.xml.build.path">
- <path refid="quick.library.build.path"/>
- <pathelement location="${build-quick.dir}/classes/xml"/>
- </path>
-
<path id="quick.swing.build.path">
<path refid="quick.library.build.path"/>
<pathelement location="${build-quick.dir}/classes/swing"/>
@@ -600,10 +632,9 @@ TODO:
</path>
<path id="quick.scaladoc.build.path">
- <path refid="quick.xml.build.path"/>
<path refid="quick.compiler.build.path"/>
- <path refid="quick.parser-combinators.build.path"/>
<path refid="partest.classpath"/>
+ <path refid="scaladoc.deps.classpath"/>
<pathelement location="${build-quick.dir}/classes/scaladoc"/>
</path>
@@ -614,8 +645,6 @@ TODO:
</path>
<path id="quick.bin.tool.path">
- <path refid="quick.parser-combinators.build.path"/>
- <path refid="quick.xml.build.path"/>
<path refid="quick.repl.build.path"/>
<path refid="quick.actors.build.path"/>
<pathelement location="${build-quick.dir}/classes/scalap"/>
@@ -633,10 +662,9 @@ TODO:
</path>
<path id="pack.bin.tool.path">
+ <!-- NOTE: this no longer provides xml or the parser combinators by default -->
<pathelement location="${build-pack.dir}/lib/scala-library.jar"/>
<pathelement location="${build-pack.dir}/lib/scala-actors.jar"/>
- <pathelement location="${build-pack.dir}/lib/scala-parser-combinators.jar"/>
- <pathelement location="${build-pack.dir}/lib/scala-xml.jar"/>
<pathelement location="${build-pack.dir}/lib/scala-reflect.jar"/>
<pathelement location="${build-pack.dir}/lib/scala-compiler.jar"/>
<pathelement location="${build-pack.dir}/lib/scalap.jar"/>
@@ -662,8 +690,6 @@ TODO:
<fileset dir="${asm-classes}"/>
</path>
- <path id="pack.parser-combinators.files"> <fileset dir="${build-quick.dir}/classes/parser-combinators"/> </path>
- <path id="pack.xml.files"> <fileset dir="${build-quick.dir}/classes/xml"/> </path>
<path id="pack.swing.files"> <fileset dir="${build-quick.dir}/classes/swing"/> </path>
<path id="pack.reflect.files"> <fileset dir="${build-quick.dir}/classes/reflect"/> </path>
<path id="pack.plugins.files"> <fileset dir="${build-quick.dir}/classes/continuations-plugin"/> </path>
@@ -694,11 +720,17 @@ TODO:
<!-- MISC -->
<path id="docs.compiler.path">
<pathelement location="${build-pack.dir}/lib/scala-library.jar"/>
- <pathelement location="${build-pack.dir}/lib/scala-parser-combinators.jar"/>
- <pathelement location="${build-pack.dir}/lib/scala-xml.jar"/>
+ <restrict>
+ <!-- need xml and parser combinators, but not the other jars,
+ we're using our own -->
+ <path refid="scaladoc.deps.classpath"/>
+ <rsel:or>
+ <rsel:name name="scala-parser-combinators*.jar"/>
+ <rsel:name name="scala-xml*.jar"/>
+ </rsel:or>
+ </restrict>
<pathelement location="${build-pack.dir}/lib/scala-reflect.jar"/>
<pathelement location="${build-pack.dir}/lib/scala-compiler.jar"/>
- <!-- <pathelement location="${build-pack.dir}/lib/scala-partest.jar"/> -->
<pathelement location="${build-pack.dir}/lib/scalap.jar"/>
<pathelement location="${build-pack.dir}/lib/scala-actors.jar"/>
<pathelement location="${ant.jar}"/>
@@ -728,8 +760,6 @@ TODO:
<pathelement location="${build-pack.dir}/lib/scala-reflect.jar"/>
<pathelement location="${build-pack.dir}/lib/scala-compiler.jar"/>
<pathelement location="${build-pack.dir}/lib/scala-actors.jar"/>
- <pathelement location="${build-pack.dir}/lib/scala-parser-combinators.jar"/>
- <pathelement location="${build-pack.dir}/lib/scala-xml.jar"/>
<!-- to test a quick build without packing, replace the above pathelements with: (may need a little tweaking)
<path refid="quick.bin.tool.path">
@@ -766,16 +796,6 @@ TODO:
<fileset dir="${partest.dir}/files/lib" includes="*.jar" />
</path>
- <!-- obsolete? -->
- <!-- TODO - segregate swing tests (there can't be many) -->
- <!--
- <path id="partest.build.path">
- <path refid="pack.compiler.path"/>
- <fileset dir="${partest.dir}/files/lib" includes="*.jar" />
- <pathelement location="${pack.dir}/lib/scala-swing.jar"/>
- </path>
- -->
-
<path id="test.junit.compiler.build.path">
<pathelement location="${test.junit.classes}"/>
<path refid="quick.compiler.build.path"/>
@@ -788,7 +808,6 @@ TODO:
<pathelement location="${build-osgi.dir}/org.scala-lang.scala-reflect.jar"/>
<pathelement location="${build-osgi.dir}/org.scala-lang.scala-compiler.jar"/>
<pathelement location="${build-osgi.dir}/org.scala-lang.scala-actors.jar"/>
- <pathelement location="${build-osgi.dir}/org.scala-lang.scala-parser-combinators.jar"/>
<path refid="pax.exam.classpath"/>
<path refid="forkjoin.classpath"/>
</path>
@@ -1229,9 +1248,6 @@ TODO:
<target name="quick.actors" depends="quick.lib">
<staged-build with="locker" stage="quick" project="actors"/> </target>
- <target name="quick.parser-combinators" depends="quick.lib">
- <staged-build with="locker" stage="quick" project="parser-combinators"/> </target>
-
<target name="quick.reflect" depends="quick.lib">
<staged-build with="locker" stage="quick" project="reflect"/> </target>
@@ -1244,15 +1260,12 @@ TODO:
<target name="quick.scalap" depends="quick.repl">
<staged-build with="locker" stage="quick" project="scalap"/> </target>
- <target name="quick.scaladoc" depends="quick.comp, quick.parser-combinators">
+ <target name="quick.scaladoc" depends="quick.comp">
<staged-build with="locker" stage="quick" project="scaladoc" version="scaladoc"/> </target>
<target name="quick.interactive" depends="quick.comp, quick.scaladoc">
<staged-build with="locker" stage="quick" project="interactive"/> </target>
- <target name="quick.xml" depends="quick.lib">
- <staged-build with="locker" stage="quick" project="xml"/> </target>
-
<target name="quick.swing" depends="quick.actors, quick.lib" if="has.java6">
<staged-build with="locker" stage="quick" project="swing"/> </target>
@@ -1283,7 +1296,7 @@ TODO:
</staged-uptodate>
</target>
- <target name="quick.bin" depends="quick.lib, quick.reflect, quick.comp, quick.repl, quick.scalap, quick.interactive, quick.xml, quick.parser-combinators, quick.swing, quick.plugins, quick.scaladoc">
+ <target name="quick.bin" depends="quick.lib, quick.reflect, quick.comp, quick.repl, quick.scalap, quick.interactive, quick.swing, quick.plugins, quick.scaladoc">
<staged-bin stage="quick" classpathref="quick.bin.tool.path"/>
</target>
@@ -1298,8 +1311,6 @@ TODO:
<staged-pack project="library"/></target>
<target name="pack.actors" depends="quick.lib"> <staged-pack project="actors"/> </target>
- <target name="pack.xml" depends="quick.xml"> <staged-pack project="xml"/> </target>
- <target name="pack.parser-combinators" depends="quick.parser-combinators"> <staged-pack project="parser-combinators"/> </target>
<target name="pack.swing" if="has.java6" depends="quick.swing"> <staged-pack project="swing"/> </target>
<target name="pack.reflect" depends="quick.reflect"> <staged-pack project="reflect"/> </target>
@@ -1332,7 +1343,7 @@ TODO:
<target name="pack.scalap" depends="quick.scalap"> <staged-pack project="scalap" targetjar="scalap.jar"/> </target>
- <target name="pack.bin" depends="pack.comp, pack.lib, pack.actors, pack.plugins, pack.reflect, pack.scalap, pack.xml, pack.swing, pack.parser-combinators">
+ <target name="pack.bin" depends="pack.comp, pack.lib, pack.actors, pack.plugins, pack.reflect, pack.scalap, pack.swing">
<staged-bin stage="pack"/>
</target>
@@ -1389,13 +1400,14 @@ TODO:
<macrodef name="make-bundle">
<attribute name="name" />
<attribute name="version" />
+ <attribute name="jar" default="${build-pack.dir}/lib/@{name}.jar" />
<sequential>
<copy file="${src.dir}/build/bnd/@{name}.bnd" tofile="${build-osgi.dir}/@{name}.bnd" overwrite="true">
<filterset>
<filter token="VERSION" value="@{version}" />
</filterset>
</copy>
- <bnd classpath="${build-pack.dir}/lib/@{name}.jar"
+ <bnd classpath="@{jar}"
eclipse="false"
failok="false"
exceptions="true"
@@ -1432,11 +1444,13 @@ TODO:
<stopwatch name="osgi.bundle.timer"/>
<make-bundle name="scala-library" version="${osgi.version.number}" />
<make-bundle name="scala-actors" version="${osgi.version.number}" />
- <make-bundle name="scala-parser-combinators" version="${osgi.version.number}" />
+ <propertyCrossedJar name="scala-parser-combinators" jar="org.scala-lang.modules:scala-parser-combinators"/>
+ <make-bundle name="scala-parser-combinators" version="${osgi.version.number}" jar="${scala-parser-combinators}"/>
<make-bundle name="scala-reflect" version="${osgi.version.number}" />
<make-bundle name="scala-compiler" version="${osgi.version.number}" />
<make-plugin-bundle name="continuations" version="${osgi.version.number}" />
- <make-bundle name="scala-xml" version="${osgi.version.number}"/>
+ <propertyCrossedJar name="scala-xml" jar="org.scala-lang.modules:scala-xml"/>
+ <make-bundle name="scala-xml" version="${osgi.version.number}" jar="${scala-xml}"/>
<touch file="${build-osgi.dir}/bundles.complete" verbose="no"/>
<if><isset property="has.java6"/><then>
@@ -1486,6 +1500,7 @@ TODO:
<target name="test.osgi" depends="test.osgi.comp">
<stopwatch name="test.osgi.timer"/>
<mkdir dir="${test.osgi.classes}"/>
+
<junit fork="yes" haltonfailure="yes">
<classpath refid="test.osgi.compiler.build.path"/>
<batchtest fork="yes" todir="${build-osgi.dir}">
@@ -1773,18 +1788,6 @@ TODO:
</staged-uptodate>
</target>
- <target name="docs.xml" depends="docs.start">
- <staged-docs project="xml" title="Scala XML Library" docroot="rootdoc.txt">
- <include name="**/*.scala"/>
- </staged-docs>
- </target>
-
- <target name="docs.parser-combinators" depends="docs.start">
- <staged-docs project="parser-combinators" title="Scala Parser Combinator Library" docroot="rootdoc.txt">
- <include name="**/*.scala"/>
- </staged-docs>
- </target>
-
<target name="docs.comp" depends="docs.start">
<staged-docs project="compiler" title="Scala Compiler" docroot="rootdoc.txt">
<include name="**/*.scala"/>
@@ -1840,7 +1843,7 @@ TODO:
</staged-uptodate>
</target>
- <target name="docs.done" depends="docs.comp, docs.man, docs.lib, docs.xml, docs.parser-combinators, docs.scalap, docs.continuations-plugin"/>
+ <target name="docs.done" depends="docs.comp, docs.man, docs.lib, docs.scalap, docs.continuations-plugin"/>
<!-- ===========================================================================
DISTRIBUTION
@@ -1882,10 +1885,8 @@ TODO:
<!-- TODO - Stop being inefficient and don't copy OSGi bundles overtop other jars. -->
<copy-bundle name="scala-library"/>
<copy-bundle name="scala-reflect"/>
- <copy-bundle name="scala-xml"/>
<copy-bundle name="scala-swing"/>
<copy-bundle name="scala-actors"/>
- <copy-bundle name="scala-parser-combinators"/>
<copy-bundle name="scala-compiler"/>
<copy toDir="${dist.dir}/bin">
<fileset dir="${build-pack.dir}/bin"/>
@@ -1942,10 +1943,8 @@ TODO:
<fileset dir="${src.dir}/interactive"/>
<fileset dir="${src.dir}/continuations/plugin"/>
</jar>
- <jar whenmanifestonly="fail" destfile="${dist.dir}/src/scala-xml-src.jar" basedir="${src.dir}/xml"/>
<jar whenmanifestonly="fail" destfile="${dist.dir}/src/scala-swing-src.jar" basedir="${src.dir}/swing"/>
<jar whenmanifestonly="fail" destfile="${dist.dir}/src/scala-reflect-src.jar" basedir="${src.dir}/reflect"/>
- <jar whenmanifestonly="fail" destfile="${dist.dir}/src/scala-parser-combinators-src.jar" basedir="${src.dir}/parser-combinators"/>
<jar whenmanifestonly="fail" destfile="${dist.dir}/src/scalap-src.jar" basedir="${src.dir}/scalap"/>
</target>
@@ -1993,10 +1992,8 @@ TODO:
<target name="starr.src" depends="starr.jars">
<jar whenmanifestonly="fail" destfile="${lib.dir}/scala-library-src.jar">
<fileset dir="${src.dir}/library"/>
- <fileset dir="${src.dir}/xml"/>
<fileset dir="${src.dir}/swing"/>
<fileset dir="${src.dir}/actors"/>
- <fileset dir="${src.dir}/parser-combinators"/>
<fileset dir="${src.dir}/forkjoin"/>
</jar>
<jar whenmanifestonly="fail" destfile="${lib.dir}/scala-reflect-src.jar" basedir="${src.dir}/reflect"/>