Skip to content
Browse files

Merge branch 'maven' into dev

  • Loading branch information...
2 parents 3323ee8 + a517ada commit ad23d4949db5d58f8c4a7e3f242bbcb6a5809890 @dekellum committed Jan 9, 2012
View
12 maven/.gt-config
@@ -0,0 +1,12 @@
+# -*- ruby -*-
+
+Gravitext::DevTools.configure do |c|
+
+ c.setup_header do |h|
+ h.holder = "David Kellum"
+ h.inception = 2012
+ h.license = :apache
+ h.exclusions += %w[ config/m2.conf test/setup.rb ]
+ end
+
+end
View
11 maven/Gemfile
@@ -0,0 +1,11 @@
+# -*- ruby -*-
+
+source :rubygems
+
+# Special case: If referenced this gemspec, bundler would use self as
+# the rjack-maven impl. for rjack-tarpit, which has ordering issues.
+# gemspec :name => 'rjack-maven'
+
+# Instead specify separately
+gem 'rjack-tarpit', '~> 2.0'
+gem 'minitest', '~> 2.3', :group => :development
View
20 maven/Gemfile.lock
@@ -0,0 +1,20 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ json (1.6.4-java)
+ minitest (2.10.0)
+ rake (0.9.2.2)
+ rdoc (3.12)
+ json (~> 1.4)
+ rjack-maven (3.0.3.1-java)
+ rjack-tarpit (2.0.0-java)
+ rake (~> 0.9.2)
+ rdoc (~> 3.6)
+ rjack-maven (~> 3.0)
+
+PLATFORMS
+ java
+
+DEPENDENCIES
+ minitest (~> 2.3)
+ rjack-tarpit (~> 2.0)
View
2 maven/History.rdoc
@@ -0,0 +1,2 @@
+=== 3.0.3.1 (TBD)
+* Initial release based on maven 3.0.3
View
13 maven/Manifest.static
@@ -0,0 +1,13 @@
+History.rdoc
+Manifest.txt
+NOTICE.txt
+README.rdoc
+Rakefile
+assembly.xml
+pom.xml
+bin/rmvn
+config/m2.conf
+lib/rjack-maven/base.rb
+lib/rjack-maven.rb
+test/setup.rb
+test/test_maven.rb
View
42 maven/Manifest.txt
@@ -0,0 +1,42 @@
+History.rdoc
+Manifest.txt
+NOTICE.txt
+README.rdoc
+Rakefile
+assembly.xml
+pom.xml
+bin/rmvn
+config/m2.conf
+lib/rjack-maven/base.rb
+lib/rjack-maven.rb
+test/setup.rb
+test/test_maven.rb
+lib/rjack-maven/aether-api-1.13.1.jar
+lib/rjack-maven/aether-connector-wagon-1.13.1.jar
+lib/rjack-maven/aether-impl-1.13.1.jar
+lib/rjack-maven/aether-spi-1.13.1.jar
+lib/rjack-maven/aether-util-1.13.1.jar
+lib/rjack-maven/commons-cli-1.2.jar
+lib/rjack-maven/maven-aether-provider-3.0.3.jar
+lib/rjack-maven/maven-artifact-3.0.3.jar
+lib/rjack-maven/maven-compat-3.0.3.jar
+lib/rjack-maven/maven-core-3.0.3.jar
+lib/rjack-maven/maven-embedder-3.0.3.jar
+lib/rjack-maven/maven-model-3.0.3.jar
+lib/rjack-maven/maven-model-builder-3.0.3.jar
+lib/rjack-maven/maven-plugin-api-3.0.3.jar
+lib/rjack-maven/maven-repository-metadata-3.0.3.jar
+lib/rjack-maven/maven-settings-3.0.3.jar
+lib/rjack-maven/maven-settings-builder-3.0.3.jar
+lib/rjack-maven/plexus-cipher-1.4.jar
+lib/rjack-maven/plexus-classworlds-2.4.jar
+lib/rjack-maven/plexus-component-annotations-1.5.5.jar
+lib/rjack-maven/plexus-interpolation-1.14.jar
+lib/rjack-maven/plexus-sec-dispatcher-1.3.jar
+lib/rjack-maven/plexus-utils-2.0.6.jar
+lib/rjack-maven/sisu-guice-2.9.4-no_aop.jar
+lib/rjack-maven/sisu-inject-bean-2.1.1.jar
+lib/rjack-maven/sisu-inject-plexus-2.1.1.jar
+lib/rjack-maven/wagon-http-lightweight-1.0.jar
+lib/rjack-maven/wagon-http-shared-1.0.jar
+lib/rjack-maven/wagon-provider-api-1.0.jar
View
13 maven/NOTICE.txt
@@ -0,0 +1,13 @@
+rjack-maven gem
+Copyright (c) 2012 David Kellum
+
+This product includes software developed by:
+
+Apache Maven
+Copyright 2001-2011 The Apache Software Foundation
+
+Plexus and Classworlds
+The Codehaus Foundation (http://www.codehaus.org/).
+
+Aether, Sisu, Spice, Plexus Ciper and Sec Dispatcher
+Sonatype Inc. (http://www.sonatype.org/).
View
43 maven/README.rdoc
@@ -0,0 +1,43 @@
+= rjack-maven
+
+* http://rjack.rubyforge.org/maven
+* http://rjack.rubyforge.org
+* https://github.com/dekellum/rjack
+
+== Description
+
+A gem packaging of {Maven}[http://maven.apache.org].
+
+== License
+
+=== rjack-maven gem
+
+Copyright (c) 2012 David Kellum
+
+Licensed under the Apache License, Version 2.0 (the "License"); you
+may not use this file except in compliance with the License. You
+may obtain a copy of the License at:
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+implied. See the License for the specific language governing
+permissions and limitations under the License.
+
+=== Maven (java)
+
+Copyright (c) 2001-2011 The Apache Software Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License"); you
+may not use this file except in compliance with the License. You
+may obtain a copy of the License at:
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+implied. See the License for the specific language governing
+permissions and limitations under the License.
View
7 maven/Rakefile
@@ -0,0 +1,7 @@
+# -*- ruby -*-
+
+require 'rubygems'
+require 'bundler/setup'
+require 'rjack-tarpit'
+
+RJack::TarPit.new( "rjack-maven" ).define_tasks
View
12 maven/assembly.xml
@@ -0,0 +1,12 @@
+<assembly>
+ <id>bin</id>
+ <formats>
+ <format>dir</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <dependencySets>
+ <dependencySet>
+ <useProjectArtifact>false</useProjectArtifact>
+ </dependencySet>
+ </dependencySets>
+</assembly>
View
32 maven/bin/rmvn
@@ -0,0 +1,32 @@
+#!/usr/bin/env jruby
+# -*- ruby -*-
+#--
+# Copyright (c) 2012 David Kellum
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you
+# may not use this file except in compliance with the License. You may
+# obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#++
+
+require 'java'
+
+module BinScript
+
+ BIN_DIR = File.dirname(__FILE__)
+ BASE_DIR = File.expand_path( '..', BIN_DIR )
+
+ $LOAD_PATH.unshift File.join( BASE_DIR, "lib" )
+
+ require 'rubygems'
+ require 'rjack-maven'
+
+ exit RJack::Maven.launch
+end
View
2 maven/config/m2.conf
@@ -0,0 +1,2 @@
+main is org.apache.maven.cli.MavenCli from plexus.core
+[plexus.core]
View
45 maven/lib/rjack-maven.rb
@@ -0,0 +1,45 @@
+#--
+# Copyright (c) 2012 David Kellum
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you
+# may not use this file except in compliance with the License. You may
+# obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#++
+
+require 'rjack-maven/base'
+
+require 'java'
+
+module RJack::Maven
+
+ BASE_DIR = File.expand_path( '..', File.dirname(__FILE__) )
+
+ Dir.glob( File.join( LIB_DIR, '*.jar' ) ).each { |jar| require jar }
+
+ import 'org.codehaus.plexus.classworlds.launcher.Launcher'
+
+ def self.setup_system_properties
+ sys = Java::java.lang.System
+
+ sys.set_property( "maven.home", BASE_DIR )
+ sys.set_property( "classworlds.conf",
+ File.join( BASE_DIR, 'config', 'm2.conf' ) )
+ end
+
+ setup_system_properties
+
+ # Launch maven with args, using plexis launcher.
+ # Returns exit status.
+ def self.launch( args = ARGV )
+ Launcher.main_with_exit_code( args )
+ end
+
+end
View
23 maven/lib/rjack-maven/base.rb
@@ -0,0 +1,23 @@
+#--
+# Copyright (c) 2012 David Kellum
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you
+# may not use this file except in compliance with the License. You may
+# obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#++
+
+module RJack
+ module Maven
+ MAVEN_VERSION = '3.0.3'
+ VERSION = MAVEN_VERSION + '.1'
+ LIB_DIR = File.dirname( __FILE__ ) # :nodoc:
+ end
+end
View
109 maven/pom.xml
@@ -0,0 +1,109 @@
+<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">
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>rjack</groupId>
+ <artifactId>rjack-maven</artifactId>
+ <packaging>pom</packaging>
+ <version>1.0</version>
+ <name>Maven for Gem</name>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.0.3</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-embedder</artifactId>
+ <version>3.0.3</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-http-shared</artifactId>
+ <version>1.0</version>
+
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jsoup</groupId>
+ <artifactId>jsoup</artifactId>
+ </exclusion>
+
+ </exclusions>
+
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-http-lightweight</artifactId>
+ <version>1.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.sonatype.aether</groupId>
+ <artifactId>aether-api</artifactId>
+ <version>1.13.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.sonatype.aether</groupId>
+ <artifactId>aether-impl</artifactId>
+ <version>1.13.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.sonatype.aether</groupId>
+ <artifactId>aether-util</artifactId>
+ <version>1.13.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.sonatype.aether</groupId>
+ <artifactId>aether-connector-wagon</artifactId>
+ <version>1.13.1</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>2.2.1</version>
+ <configuration>
+ <attach>false</attach>
+ <ignoreDirFormatExtensions>false</ignoreDirFormatExtensions>
+ <descriptors>
+ <descriptor>assembly.xml</descriptor>
+ </descriptors>
+ </configuration>
+ <executions>
+ <execution>
+ <id>assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
View
30 maven/rjack-maven.gemspec
@@ -0,0 +1,30 @@
+# -*- ruby -*- encoding: utf-8 -*-
+
+gem 'rjack-tarpit', '~> 2.0'
+require 'rjack-tarpit/spec'
+
+RJack::TarPit.specify do |s|
+
+ # Avoid require since we need an install'd rjack-maven to build
+ # self.
+ load 'rjack-maven/base.rb'
+
+ s.version = RJack::Maven::VERSION
+
+ s.add_developer( 'David Kellum', 'dek-oss@gravitext.com' )
+
+ s.maven_strategy = :jars_from_assembly
+ s.assembly_version = 1.0
+
+ s.depend 'minitest', '~> 2.3', :dev
+ s.depend 'rjack-tarpit', '~> 2.0', :dev
+
+ # Since an install'd rjack-maven will be used to build this, avoid
+ # warnings by removing constants loaded above.
+ RJack::Maven.module_eval do
+ %w[ VERSION MAVEN_VERSION LIB_DIR ].each do |c|
+ remove_const( c )
+ end
+ end
+
+end
View
7 maven/test/setup.rb
@@ -0,0 +1,7 @@
+require 'rubygems'
+require 'bundler/setup'
+
+$LOAD_PATH.unshift( File.join( File.dirname( __FILE__ ), '..', 'lib' ) )
+
+require 'minitest/unit'
+require 'minitest/autorun'
View
30 maven/test/test_maven.rb
@@ -0,0 +1,30 @@
+#!/usr/bin/env jruby
+#.hashdot.profile += jruby-shortlived
+
+#--
+# Copyright (c) 2012 David Kellum
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you
+# may not use this file except in compliance with the License. You may
+# obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#++
+
+require File.join( File.dirname( __FILE__ ), "setup" )
+
+require 'rjack-maven'
+
+class TestMaven < MiniTest::Unit::TestCase
+
+ def test_launch
+ assert_equal( 0, RJack::Maven.launch( %w[ -v ] ) )
+ end
+
+end

0 comments on commit ad23d49

Please sign in to comment.
Something went wrong with that request. Please try again.