Permalink
Browse files

Tie that hogs legs. Maven fun or lack thereof

git-svn-id: http://svn.codehaus.org/jruby/trunk/jruby@7521 961051c9-f516-0410-bf72-c9f7e237a7b7
  • Loading branch information...
enebo committed Aug 22, 2008
1 parent 3d7e84c commit cabb5aad664a59c99e745ec2c03dbcd0dba66847
Showing with 59 additions and 165 deletions.
  1. +29 −105 maven/jruby-complete/pom.xml
  2. +29 −59 maven/jruby/pom.xml
  3. +1 −1 pom.xml
@@ -175,127 +175,51 @@
</executions>
</plugin>
<plugin>
- <artifactId>maven-surefire-plugin</artifactId>
+ <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>
- <includes>
- <!-- <include>org/jruby/test/MainTestSuite.java</include> -->
- <!-- <include>org/jruby/test/ScriptTestSuite.java</include> -->
- <!-- <include>org/jruby/test/TestUnitTestSuite.java</include> -->
- </includes>
- <excludes>
- <exclude>**/*.java</exclude>
- </excludes>
+ <executable>ant</executable>
+ <workingDirectory>${project.basedir}/../..</workingDirectory>
+ <arguments><argument>jar-complete</argument></arguments>
</configuration>
</plugin>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
- <id>unjar-deps</id>
- <phase>process-resources</phase>
- <configuration>
- <tasks>
- <mkdir dir="${project.build.outputDirectory}/META-INF/jruby.home"/>
- <copy todir="${project.build.outputDirectory}/META-INF/jruby.home">
- <fileset dir="${project.basedir}/../..">
- <include name="bin/*"/>
- <include name="lib/ruby/gems/1.8/cache/sources*.gem"/>
- <include name="lib/ruby/gems/1.8/gems/sources*/**/*"/>
- <include name="lib/ruby/gems/1.8/specifications/sources*.gemspec"/>
- <include name="lib/ruby/site_ruby/**/*"/>
- <!-- this is only temporary; will be deleted from final jar -->
- <include name="lib/ruby/1.8/**"/>
- </fileset>
- </copy>
- <copy todir="${project.build.outputDirectory}">
- <fileset dir="${project.basedir}/../../lib/ruby/1.8">
- <include name="**/*.rb"/>
- </fileset>
- </copy>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>generate-method-classes</id>
+ <id>copy-jar</id>
<phase>process-classes</phase>
<goals><goal>run</goal></goals>
<configuration>
<tasks>
- <touch file="${project.build.directory}/__empty.rb"/>
- <java classname="org.jruby.Main" fork="true">
- <classpath refid="maven.compile.classpath"/>
- <sysproperty key="jruby.dump_invocations" value="${project.build.outputDirectory}"/>
- <arg value="-rjava"/>
- <arg value="${project.build.directory}/__empty.rb"/>
- </java>
- <delete file="${project.build.directory}/__empty.rb" quiet="true"/>
+<echo message="whoo"/>
+ <copy file="${project.basedir}/../../lib/jruby-complete.jar" tofile="${project.build.directory}/${project.build.finalName}.jar"/>
</tasks>
</configuration>
</execution>
- <execution>
- <id>jarjar</id>
- <phase>package</phase>
- <configuration>
- <tasks>
- <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
- classpath="${project.basedir}/../../build_lib/jarjar-1.0rc7.jar"/>
- <java jar="${project.build.directory}/${project.build.finalName}.jar" fork="true" maxmemory="${jruby.launch.memory}" failonerror="true">
- <sysproperty key="jruby.home" value="${project.build.outputDirectory}/META-INF/jruby.home"/>
- <arg value="--command"/>
- <arg value="gem"/>
- <arg value="install"/>
- <arg value="rspec"/>
- <arg value="rake"/>
- <arg value="--no-ri"/>
- <arg value="--no-rdoc"/>
- <arg value="--env-shebang"/>
- </java>
- <delete>
- <fileset dir="${project.build.outputDirectory}">
- <include name="META-INF/jruby.home/lib/ruby/gems/1.8/source_cache"/>
- <!-- delete after gems installed, as mentioned above; -->
- <!-- main ruby libs go in root of jarfile -->
- <include name="META-INF/jruby.home/lib/ruby/1.8/**"/>
- <include name="META-INF/maven/**"/>
- </fileset>
- <fileset dir="${project.build.directory}"
- includes="${project.build.finalName}.jar"/>
- </delete>
- <jarjar destfile="${project.build.directory}/${project.build.finalName}.jar">
- <fileset dir="${project.build.outputDirectory}">
- <include name="META-INF/jruby.home/**/*"/>
- <include name="**/*"/>
- <exclude name="org/jruby/util/ant/**/*.class"/>
- </fileset>
- <rule pattern="org.objectweb.asm.**" result="jruby.objectweb.asm.@1"/>
- <manifest>
- <attribute name="Built-By" value="${user.name}"/>
- <attribute name="Main-Class" value="${jruby.main.class}"/>
- </manifest>
- </jarjar>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>tests</id>
- <phase>test</phase>
- <configuration>
- <tasks>
- <echo message="no need to test"/>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
</executions>
</plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <!-- <include>org/jruby/test/MainTestSuite.java</include> -->
+ <!-- <include>org/jruby/test/ScriptTestSuite.java</include> -->
+ <!-- <include>org/jruby/test/TestUnitTestSuite.java</include> -->
+ </includes>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
</plugins>
</build>
</project>
View
@@ -175,82 +175,52 @@
</executions>
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
+ <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>
- <includes>
- <!-- <include>org/jruby/test/MainTestSuite.java</include> -->
- <!-- <include>org/jruby/test/ScriptTestSuite.java</include> -->
- <!-- <include>org/jruby/test/TestUnitTestSuite.java</include> -->
- </includes>
- <excludes>
- <exclude>**/*.java</exclude>
- </excludes>
+ <executable>ant</executable>
+ <workingDirectory>${project.basedir}/../..</workingDirectory>
+ <arguments><argument>jar</argument></arguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
- <id>generate-method-classes</id>
+ <id>copy-jar</id>
<phase>process-classes</phase>
<goals><goal>run</goal></goals>
<configuration>
<tasks>
- <touch file="${project.build.directory}/__empty.rb"/>
- <java classname="org.jruby.Main" fork="true">
- <classpath refid="maven.compile.classpath"/>
- <sysproperty key="jruby.dump_invocations" value="${project.build.outputDirectory}"/>
- <arg value="-rjava"/>
- <arg value="${project.build.directory}/__empty.rb"/>
- </java>
- <delete file="${project.build.directory}/__empty.rb" quiet="true"/>
+<echo message="whoo"/>
+ <copy file="${project.basedir}/../../lib/jruby.jar" tofile="${project.build.directory}/${project.build.finalName}.jar"/>
</tasks>
</configuration>
</execution>
- <execution>
- <id>jarjar</id>
- <phase>package</phase>
- <configuration>
- <tasks>
- <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
- classpath="${project.basedir}/../../build_lib/jarjar-1.0rc7.jar"/>
- <delete>
- <fileset dir="${project.build.directory}"
- includes="${project.build.finalName}.jar"/>
- </delete>
- <jarjar destfile="${project.build.directory}/${project.build.finalName}.jar">
- <fileset dir="${project.build.outputDirectory}">
- <include name="**/*"/>
- <exclude name="org/jruby/util/ant/**/*.class"/>
- </fileset>
- <rule pattern="org.objectweb.asm.**" result="jruby.objectweb.asm.@1"/>
- <manifest>
- <attribute name="Built-By" value="${user.name}"/>
- <attribute name="Main-Class" value="${jruby.main.class}"/>
- </manifest>
- </jarjar>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>tests</id>
- <phase>test</phase>
- <configuration>
- <tasks>
- <echo message="No need to test"/>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <!-- <include>org/jruby/test/MainTestSuite.java</include> -->
+ <!-- <include>org/jruby/test/ScriptTestSuite.java</include> -->
+ <!-- <include>org/jruby/test/TestUnitTestSuite.java</include> -->
+ </includes>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
</plugins>
</build>
</project>
View
@@ -105,7 +105,7 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>ant</groupId>
+ <groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.7.0</version>
<scope>provided</scope>

0 comments on commit cabb5aa

Please sign in to comment.