Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use maven-tools, prepare release

  • Loading branch information...
commit 1750722f07321089e0628d360e91c65b75bf8606 1 parent 126ab96
Christian Meier authored
22 pom.xml
View
@@ -22,7 +22,7 @@
<groupId>rubygems</groupId>
<artifactId>ruby-maven</artifactId>
- <version>${maven.version}.${jruby.plugins.version}.pre</version>
+ <version>${maven.version}.${jruby.plugins.version}</version>
<packaging>gem</packaging>
<name>ruby wrapper around maven and more</name>
@@ -40,6 +40,12 @@
<version>0.14.6</version>
<type>gem</type>
</dependency>
+ <dependency>
+ <groupId>rubygems</groupId>
+ <artifactId>maven-tools</artifactId>
+ <version>${jruby.plugins.version}</version>
+ <type>gem</type>
+ </dependency>
</dependencies>
<properties>
@@ -47,8 +53,8 @@
<!-- if some more gem releases are needed you can append some number
here with the gem.version -->
<jruby.plugins.version>0.29.0</jruby.plugins.version>
- <jruby.plugins.version.postfix>-SNAPSHOT</jruby.plugins.version.postfix>
- <maven.version>3.0.3</maven.version>
+ <jruby.plugins.version.postfix></jruby.plugins.version.postfix>
+ <maven.version>3.0.4</maven.version>
<gem.basedir>${project.build.directory}/ruby-maven-${project.version}</gem.basedir>
</properties>
<build>
@@ -79,12 +85,6 @@
<type>zip</type>
<outputDirectory>${gem.basedir}</outputDirectory>
</artifactItem>
- <artifactItem>
- <groupId>de.saumya.mojo</groupId>
- <artifactId>ruby-tools</artifactId>
- <version>${jruby.plugins.version}${jruby.plugins.version.postfix}</version>
- <outputDirectory>${gem.basedir}/apache-maven-${maven.version}/lib/ruby</outputDirectory>
- </artifactItem>
</artifactItems>
</configuration>
</execution>
@@ -102,7 +102,7 @@
<includeOpenSSL>true</includeOpenSSL>
</configuration>
</plugin>
- <plugin>
+ <!--plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.2</version>
<configuration>
@@ -116,7 +116,7 @@
</goals>
</execution>
</executions>
- </plugin>
+ </plugin-->
</plugins>
</build>
1  src/main/gemspec/maven.gemspec
View
@@ -35,6 +35,7 @@ Gem::Specification.new do |s|
s.rubygems_version = %q{1.3.5}
s.summary = %q{maven support for ruby projects with gemspec, Gemfile}
s.add_dependency 'thor', '~> 0.14.6'
+ s.add_dependency 'maven-tools', "= #{s.version.to_s.sub(/^[0-9].[0-9].[0-9]./, '')}"
File.chmod(0755, File.join("bin", "mvn"))
end
0  src/main/resources/bin/gwt 100644 → 100755
View
File mode changed
1  src/main/resources/bin/rmvn
View
@@ -6,5 +6,4 @@ mvn = Maven::RubyMaven.new
args = ARGV.dup
ARGV.clear # clean up in case another script gets executed it gets clear ARGV
-print "maven commandline: "
mvn.exec(*args)
18 src/main/resources/lib/ruby/ruby_maven.rb
View
@@ -10,12 +10,11 @@ class RubyMaven
:rake => [:rake],
:jruby => [:jruby, :compile],
:gem => [:package, :install, :push, :exec, :pom, :initialize, :irb],
- :gemify => [:gemify, :versions],
- :rails2 => [:new, :generate, :rake, :server, :console],
:rails3 => [:new, :generate, :rake, :server, :console, :dbconsole, :pom, :initialize],
:cucumber => [:test],
:rspec => [:test],
:runit => [:test],
+ :mini => [:test,:spec],
:bundler => [:install, :update]
}
ALIASES = {
@@ -136,9 +135,9 @@ def options_string
def options_array
options.collect do |k,v|
if k =~ /^-D/
- v = "=#{v}" if v
+ v = "=#{v}" unless v.nil?
else
- v = " #{v}" if v
+ v = " #{v}" unless v.nil?
end
"#{k}#{v}"
end
@@ -162,7 +161,7 @@ def generate_pom(*args)
Maven::Tools::GemProject.new
end
filename = gemfiles[0]
- proj.load(filename)
+ proj.load_gemfile(filename)
else
gemspecs = Dir["*.gemspec"]
gemspecs.delete_if {|g| g =~ /.pom/}
@@ -173,9 +172,12 @@ def generate_pom(*args)
end
end
if filename
- proj.load(File.join(File.dirname(filename), 'Mavenfile'))
+ proj.load_jarfile(File.join(File.dirname(filename), 'Jarfile'))
+ proj.load_gemfile(File.join(File.dirname(filename), 'Mavenfile'))
proj.add_defaults
- pom = filename + ".pom"
+ #target = File.join(File.dirname(filename), 'target')
+ #FileUtils.mkdir_p target
+ pom = ".pom.xml"
File.open(pom, 'w') do |f|
f.puts proj.to_xml
end
@@ -194,7 +196,7 @@ def exec(*args)
a << options_array
a.flatten!
a = generate_pom(*a) unless no_pom
- puts a.join ' ' if verbose
+ puts "mvn #{a.join(' ')}" if verbose
if defined? JRUBY_VERSION
# TODO use a setup like maven_gemify from jruby to launch maven
launch_java(a)
Please sign in to comment.
Something went wrong with that request. Please try again.