diff options
-rw-r--r-- | build.xml | 44 |
1 files changed, 25 insertions, 19 deletions
@@ -33,7 +33,11 @@ the common tasks and can be called on to run the main aspects of all the sub-scr <available file="${rt-openjdk6}" property="rt-openjdk6.available" /> <available file="${rt-openjdk8}" property="rt-openjdk8.available" /> <property environment="env"/> - + + <condition property="isWindows"> + <os family="windows" /> + </condition> + <path id="build.path"> <fileset dir="lib/build"> <include name="*.jar" /> @@ -368,31 +372,33 @@ lombok.launch.AnnotationProcessorHider$ClaimingProcessor,isolating</echo> <property name="lombok.dist.built" value="true" /> </target> - <target name="install-maven" depends="version,dist" description="Install THE lombok.jar into the local maven repository using Apache Maven"> + <target name="-mvn-ext" if="isWindows"> + <property name="mvn-ext" value=".cmd" /> + </target> + + <target name="install-maven" depends="version,dist,-mvn-ext" description="Install THE lombok.jar into the local maven repository using Apache Maven"> <fail unless="env.MAVEN_HOME" message="MAVEN_HOME environment variable must be set. "/> <echo message="MAVEN_HOME: ${env.MAVEN_HOME}" /> <echo message="Lombok version: ${lombok.version}-SNAPSHOT" /> - + <echo file="pom.xml"><![CDATA[<project> - <modelVersion>4.0.0</modelVersion> - <groupId>org.projectlombok</groupId> - <artifactId>lombok</artifactId> - <version>]]>${lombok.version}-SNAPSHOT<![CDATA[</version> + <modelVersion>4.0.0</modelVersion> + <groupId>org.projectlombok</groupId> + <artifactId>lombok</artifactId> + <version>]]>${lombok.version}-SNAPSHOT<![CDATA[</version> </project>]]></echo> - <exec executable="${env.MAVEN_HOME}/bin/mvn"> - <arg value="install:install-file"/> - <arg value="-Dfile=dist/lombok-${lombok.version}.jar"/> - <arg value="-DgroupId=org.projectlombok"/> - <arg value="-DartifactId=lombok"/> - <arg value="-Dversion=${lombok.version}-SNAPSHOT"/> - <arg value="-Dpackaging=jar"/> - </exec> - - <delete file="pom.xml" quiet="true" /> - + <exec executable="${env.MAVEN_HOME}/bin/mvn${mvn-ext}"> + <arg value="install:install-file"/> + <arg value="-Dfile=dist/lombok-${lombok.version}.jar"/> + <arg value="-DgroupId=org.projectlombok"/> + <arg value="-DartifactId=lombok"/> + <arg value="-Dversion=${lombok.version}-SNAPSHOT"/> + <arg value="-Dpackaging=jar"/> + </exec> + <delete file="pom.xml" quiet="true" /> </target> - + <target name="dist-utils" description="Builds lombok-utils.jar, which is a library used by i.e. lombok.ast project." depends="version, compile"> <mkdir dir="dist" /> <jar destfile="dist/lombok-utils-${lombok.version}.jar"> |