Browse files

Hopefully final round of build/dist/maven changes for 1.6.

  • Loading branch information...
1 parent 452243c commit 85430a3a0bee0e87fe30406cad4f3ba5f7eb8d8b @headius committed Mar 10, 2011
Showing with 198 additions and 44 deletions.
  1. +52 −0 build.xml
  2. +52 −0 maven/jruby-dist/pom.xml
  3. +31 −0 maven/jruby-stdlib/pom.xml
  4. +4 −41 maven/pom.xml
  5. +59 −3 pom.xml
View
52 build.xml
@@ -510,6 +510,55 @@
overwrite="true" />
</target>
+ <target name="jar-jruby-stdlib" depends="compile" unless="jar-jruby-stdlib.hasrun"
+ description="Create the 'sdtlib' JRuby jar. Pass 'filename' to adjust.">
+ <property name="mainclass" value="org.jruby.Main"/>
+ <property name="filename" value="jruby-stdlib.jar"/>
+ <property name="bilename" value="jruby-stdlib.bar"/>
+ <property name="jar-stdlib-home" value="${build.dir}/jar-stdlib/META-INF/jruby.home"/>
+ <mkdir dir="${jar-stdlib-home}"/>
+ <copy todir="${jar-stdlib-home}">
+ <fileset dir="${basedir}">
+ <patternset refid="dist.bindir.files"/>
+ <patternset refid="dist.lib.files"/>
+ </fileset>
+ </copy>
+
+ <java classname="${mainclass}" fork="true" maxmemory="${jruby.launch.memory}" failonerror="true">
+ <classpath>
+ <path refid="jruby.execute.classpath"/>
+ <pathelement location="${build.dir}/jar-stdlib"/>
+ </classpath>
+ <sysproperty key="jruby.home" value="${jar-stdlib-home}"/>
+ <env key="RUBYOPT" value=""/>
+ <env key="GEM_HOME" value="${jar-stdlib-home}/lib/ruby/gems/1.8"/>
+ <jvmarg line="${java.opts}"/>
+ <arg line="-S gem install ${complete.jar.gems}"/>
+ <arg line="--no-ri --no-rdoc --ignore-dependencies --env-shebang"/>
+ </java>
+ <delete dir="${jar-stdlib-home}/lib/ruby/gems/1.8/cache"/>
+
+ <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="${build.lib.dir}/jarjar-1.0.jar"/>
+ <jarjar destfile="${dest.lib.dir}/${filename}">
+ <fileset dir="${build.dir}/jar-stdlib">
+ <exclude name="META-INF/jruby.home/lib/ruby/site_ruby/shared/builtin/**"/>
+ </fileset>
+ <metainf dir="${base.dir}/spi">
+ <include name="services/**"/>
+ </metainf>
+ <manifest>
+ <attribute name="Built-By" value="${user.name}"/>
+ </manifest>
+ </jarjar>
+ <antcall target="_osgify-jar_">
+ <param name="bndfile" value="jruby-stdlib.bnd" />
+ <param name="jar.wrap" value="${dest.lib.dir}/${filename}" />
+ <param name="bar.wrap" value="${dest.lib.dir}/${bilename}" />
+ </antcall>
+
+ <property name="jar-jruby-stdlib.hasrun" value="true" />
+ </target>
+
<target name="jar-jruby-complete" depends="compile" unless="jar-jruby-complete.hasrun"
description="Create the 'complete' JRuby jar. Pass 'mainclass' and 'filename' to adjust.">
<property name="mainclass" value="org.jruby.Main"/>
@@ -636,6 +685,9 @@
<target name="jar-dist" depends="init" description="Create the jruby.jar file for distribution. This version uses JarJar to rewrite some packages.">
<antcall target="jar-jruby-dist" inheritall="true"/>
</target>
+ <target name="jar-stdlib" depends="init" description="Create the jruby-stdlib.jar file.">
+ <antcall target="jar-jruby-stdlib" inheritall="true"/>
+ </target>
<target name="jar-complete" depends="init" description="Create the jruby-complete.jar file. This version uses JarJar to rewrite some packages.">
<antcall target="jar-jruby-complete" inheritall="true"/>
</target>
View
52 maven/jruby-dist/pom.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jruby</groupId>
+ <artifactId>shared</artifactId>
+ <version>1.6.0.RC3</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jruby</groupId>
+ <artifactId>jruby-dist</artifactId>
+ <packaging>pom</packaging>
+ <name>JRuby Distribution</name>
+
+ <properties>
+ <ant.target>dist</ant.target>
+ <dist.dir>${basedir}/../../dist</dist.dir>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.5</version>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${dist.dir}/${project.artifactId}-bin-${project.version}.zip</file>
+ <type>zip</type>
+ <classifier>bin</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
View
31 maven/jruby-stdlib/pom.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.jruby</groupId>
+ <artifactId>shared</artifactId>
+ <version>1.6.0.RC3</version>
+ <relativePath>../../pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>jruby-stdlib</artifactId>
+ <packaging>jar</packaging>
+ <name>JRuby Stdlib</name>
+
+ <properties>
+ <ant.target>jar-stdlib</ant.target>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+</project>
View
45 maven/pom.xml
@@ -5,7 +5,7 @@
<groupId>org.jruby</groupId>
<artifactId>shared</artifactId>
<version>1.6.0.RC3</version>
- <relativePath>../../pom.xml</relativePath>
+ <relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>jruby-common</artifactId>
@@ -134,46 +134,9 @@
<module>jruby</module>
<module>jruby-core</module>
<module>jruby-complete</module>
+ <module>jruby-stdlib</module>
+ <module>jruby-dist</module>
+ <module>jruby-rake-plugin</module>
</modules>
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>exec-maven-plugin</artifactId>
- <version>1.1</version>
- <executions>
- <execution>
- <phase>process-classes</phase>
- <goals><goal>exec</goal></goals>
- </execution>
- </executions>
- <configuration>
- <executable>ant</executable>
- <workingDirectory>${project.basedir}/../..</workingDirectory>
- <arguments><argument>${ant.target}</argument></arguments>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.3</version>
- <executions>
- <execution>
- <id>copy-jar</id>
- <phase>package</phase>
- <goals><goal>run</goal></goals>
- <configuration>
- <tasks>
- <echo>copy ${project.basedir}/../../lib/${project.artifactId}.jar to ${project.build.directory}/${project.build.finalName}.jar</echo>
- <copy overwrite="true" file="${project.basedir}/../../lib/${project.artifactId}.jar" tofile="${project.build.directory}/${project.build.finalName}.jar"/>
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
</project>
View
62 pom.xml
@@ -107,7 +107,6 @@
<modules>
<module>maven</module>
- <module>maven/jruby-rake-plugin</module>
<module>docs</module>
</modules>
@@ -122,10 +121,63 @@
<artifactId>wagon-webdav</artifactId>
</extension>
</extensions>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.1</version>
+ <executions>
+ <execution>
+ <phase>process-classes</phase>
+ <goals><goal>exec</goal></goals>
+ </execution>
+ </executions>
+ <configuration>
+ <executable>ant</executable>
+ <workingDirectory>${project.basedir}/../..</workingDirectory>
+ <arguments><argument>${ant.target}</argument></arguments>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+ <execution>
+ <id>copy-jar</id>
+ <phase>package</phase>
+ <goals><goal>run</goal></goals>
+ <configuration>
+ <tasks>
+ <echo>copy ${project.basedir}/../../lib/${project.artifactId}.jar to ${project.build.directory}/${project.build.finalName}.jar</echo>
+ <copy overwrite="true" file="${project.basedir}/../../lib/${project.artifactId}.jar" tofile="${project.build.directory}/${project.build.finalName}.jar"/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>2.4.1</version>
+ <configuration>
+ <filesets>
+ <fileset>
+ <directory>build</directory>
+ </fileset>
+ <fileset>
+ <directory>src_gen</directory>
+ </fileset>
+ </filesets>
+ </configuration>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
+ <version>2.1.2</version>
<executions>
<execution>
<id>attach-sources</id>
@@ -135,9 +187,12 @@
</execution>
</executions>
</plugin>
-<!-- <plugin>
+<!--
+ TODO remove javadocs errors
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.7</version>
<executions>
<execution>
<id>attach-javadocs</id>
@@ -146,7 +201,8 @@
</goals>
</execution>
</executions>
- </plugin> -->
+ </plugin>
+-->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.2</version>

0 comments on commit 85430a3

Please sign in to comment.