Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

clean up Rakefile, Mavenfile and generated jbundler.jar and pom.xml

  • Loading branch information...
commit 63b972bfbd19d808c85bb44ea90a4da3ce187ed9 1 parent 12c3db5
@mkristian authored
View
6 Mavenfile
@@ -34,6 +34,12 @@ profile 'run-its' do |r|
end
end
+plugin( :jar ).in_phase( 'prepare-package' ).execute_goal( :jar ).with :finalName => "${project.artifactId}", :outputDirectory => "${project.basedir}/lib"
+
+plugin(:clean, '2.5' ).with :filesets => [ { :directory => './',
+ :includes => [ 'Gemfile.lock',
+ 'lib/${project.artifactId}.jar' ] } ]
+
execute_in_phase( :initialize ) do
pom = File.read( 'pom.xml' )
if File.exists? '.pom.xml'
View
20 Rakefile
@@ -3,9 +3,13 @@
require 'ruby-maven'
require 'fileutils'
-task :default => [ :minispec]
+task :default => [ :minispec ]
-task :build do
+task :common do
+ FileUtils.rm_f( '.pom.xml' )
+end
+
+task :build => [ :common ] do
rmvn = Maven::Ruby::Maven.new
rmvn.options['-Dmaven.test.skip'] = true
if rmvn.exec('package')
@@ -15,16 +19,19 @@ task :build do
end
end
-task :compile do
+task :compile => [ :common ] do
rmvn = Maven::Ruby::Maven.new
rmvn.options['-Dmaven.test.skip'] = true
+ # jruby related debug log
+ rmvn.options['-Djruby.verbose'] = true
# compiles java sources and build the jar
+
unless rmvn.exec('prepare-package')
raise 'failed'
end
end
-task :features => [:compile] do
+task :features => [ :compile ] do
rmvn = Maven::Ruby::Maven.new
rversion = RUBY_VERSION =~ /^1.8./ ? '--1.8': '--1.9'
rmvn.options['-Djruby.versions'] = '1.7.2'#JRUBY_VERSION
@@ -39,7 +46,7 @@ task :features => [:compile] do
end
end
-task :minispec => [:compile] do
+task :minispec => [ :compile ] do
require 'minitest/autorun'
$LOAD_PATH << "spec"
@@ -48,8 +55,7 @@ task :minispec => [:compile] do
end
task :clean do
- FileUtils.rm_rf('target')
- FileUtils.rm_f(File.join('lib','jbundler.jar'))
+ Maven::Ruby::Maven.new.exec 'clean'
end
# vim: syntax=Ruby
View
BIN  lib/jbundler.jar
Binary file not shown
View
15 pom.xml
@@ -276,6 +276,21 @@
<build>
<plugins>
<plugin>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <filesets>
+ <fileset>
+ <directory>./</directory>
+ <includes>
+ <include>Gemfile.lock</include>
+ <include>lib/${project.artifactId}.jar</include>
+ </includes>
+ </fileset>
+ </filesets>
+ </configuration>
+ </plugin>
+ <plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
Please sign in to comment.
Something went wrong with that request. Please try again.