summaryrefslogtreecommitdiff
path: root/src/build
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-12-13 22:23:54 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-12-19 10:26:11 -0800
commit94ca91dd5f404015bdfa94e373ed94c284761a1d (patch)
treee28fad37679e3b26ddcfbd3d49c163e7ba002bf1 /src/build
parent846d8d119514ba631c08235d2352bfa49821f265 (diff)
downloadscala-94ca91dd5f404015bdfa94e373ed94c284761a1d.tar.gz
scala-94ca91dd5f404015bdfa94e373ed94c284761a1d.tar.bz2
scala-94ca91dd5f404015bdfa94e373ed94c284761a1d.zip
Prepare maven-based distribution building.
NOTE: `maven/latest/build.xml` is now deprecated. To publish a Scala build, simply call `ant publish` or `ant publish-local`. `maven/latest/build.xml` will soon disappear from `dists/` The idea is that a Scala distribution is a simple repackaging of artifacts already available on maven. Already available: typical jars for the artifacts (classes, sources, scaladoc). To add: the bin/, doc/, and man/ directories. Thus, move the contents that should end up in the distribution from docs/ to doc/, create the man/ directory with the manpages, and include the scripts in bin/. Next up: package these directories in a jar and publish to maven, with a dependency on scala-library-all, scala-reflect and scala-compiler, for the jars that should end up in the distribution. Refactorings: - Pull filter-pom out from deploy-one. - Rename maven-base to dist.maven. - Set all properties in the init target (dist.maven)
Diffstat (limited to 'src/build')
-rw-r--r--src/build/maven/maven-deploy.xml47
1 files changed, 36 insertions, 11 deletions
diff --git a/src/build/maven/maven-deploy.xml b/src/build/maven/maven-deploy.xml
index 412d7caab6..174993f94a 100644
--- a/src/build/maven/maven-deploy.xml
+++ b/src/build/maven/maven-deploy.xml
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+THIS FILE WILL SOON SELF DESTRUCT; DO NOT USE
+see publish.* targets in /build.xml
+-->
<project name="sabbus-maven-deploy" xmlns:artifact="urn:maven-artifact-ant">
<description>
@@ -46,17 +50,11 @@
</sequential>
</macrodef>
- <macrodef name="deploy-one">
- <attribute name="dir" default=""/>
+ <macrodef name="filter-pom">
+ <attribute name="path" />
<attribute name="name" />
- <attribute name="local" default="false"/>
- <attribute name="signed" default="false"/>
<sequential>
- <local name="path"/> <property name="path" value="@{dir}@{name}/@{name}"/>
-
- <echo>Deploying ${path}-[pom.xml|src.jar|docs.jar].</echo>
-
<copy file="${path}-pom.xml" tofile="${path}-pom-filtered.xml" overwrite="true">
<filterset>
<filter token="VERSION" value="${maven.version.number}" />
@@ -74,6 +72,21 @@
</filterset>
</copy>
<artifact:pom id="@{name}.pom" file="${path}-pom-filtered.xml" />
+ </sequential>
+ </macrodef>
+
+ <macrodef name="deploy-one">
+ <attribute name="dir" default=""/>
+ <attribute name="name" />
+ <attribute name="local" default="false"/>
+ <attribute name="signed" default="false"/>
+
+ <sequential>
+ <local name="path"/> <property name="path" value="@{dir}@{name}/@{name}"/>
+
+ <echo>Deploying ${path}-[pom.xml|src.jar|docs.jar].</echo>
+
+ <filter-pom name="@{name}" path="@{path}"/>
<if><equals arg1="@{signed}" arg2="false"/><then>
<if><isset property="docs.skip"/><then>
@@ -128,6 +141,7 @@
</sequential>
</macrodef>
+
<target name="boot.maven">
<!-- Pull in properties from build -->
<property file="build.properties" />
@@ -162,7 +176,18 @@
</echo>
</target>
- <target name="deploy" depends="init.maven" description="Deploys unsigned artifacts to the maven repo."> <deploy/> </target>
- <target name="deploy.local" depends="init.maven" description="Deploys unsigned artifacts to the local maven repo."> <deploy local="true"/> </target>
- <target name="deploy.signed" depends="init.maven" description="Deploys signed artifacts to the remote maven repo."> <deploy signed="true"/> </target>
+ <target name="deploy" depends="init.maven" description="Deploys unsigned artifacts to the maven repo.">
+ <echo message="WARNING!1! THIS TARGET HAS BEEN DEPRECATED -- CALL `ant publish` FROM /build.xml"/>
+ <deploy/>
+ </target>
+
+ <target name="deploy.local" depends="init.maven" description="Deploys unsigned artifacts to the local maven repo.">
+ <echo message="WARNING!1! THIS TARGET HAS BEEN DEPRECATED -- CALL `ant publish.local` FROM /build.xml"/>
+ <deploy local="true"/>
+ </target>
+
+ <target name="deploy.signed" depends="init.maven" description="Deploys signed artifacts to the remote maven repo.">
+ <echo message="WARNING!1! THIS TARGET HAS BEEN DEPRECATED -- CALL `ant publish.signed` FROM /build.xml"/>
+ <deploy signed="true"/>
+ </target>
</project>