Permalink
Browse files

clean up pom, Rakefilem gemspec

  • Loading branch information...
1 parent af7330c commit eb6ebaff063903dbf3a01c1f9b93b2550ac47434 @mkristian committed Jul 29, 2010
Showing with 27 additions and 21 deletions.
  1. +4 −2 Rakefile
  2. +23 −19 pom.xml
View
@@ -19,16 +19,18 @@ desc 'package as a gem.'
task :package do
require 'fileutils'
gemspec = Dir['*.gemspec'].first
- sh "gem build #{gemspec}"
+ Kernel.system("#{RUBY} -S gem build #{gemspec}")
FileUtils.mkdir_p(build_dir)
gem = Dir['*.gem'].first
FileUtils.mv(gem, File.join(build_dir,"#{gem}"))
+ puts File.join(build_dir,"#{gem}")
end
desc 'Install the package as a gem.'
task :install => [:package] do
gem = Dir[File.join(build_dir, '*.gem')].first
- sh "gem install --local #{gem} --no-ri --no-rdoc"
+ extra = ENV['GEM_HOME'].nil? && ENV['GEM_PATH'].nil? ? "--user-install" : ""
+ Kernel.system("#{RUBY} -S gem install --local #{gem} --no-ri --no-rdoc #{extra}")
end
desc 'Run specifications'
View
42 pom.xml
@@ -82,28 +82,12 @@
<extraFiles>Rakefile</extraFiles>
<gemspecOverwrite>true</gemspecOverwrite>
</configuration>
- </plugin>
- <plugin>
- <groupId>de.saumya.mojo</groupId>
- <artifactId>rspec-maven-plugin</artifactId>
- <version>${jruby.plugins.version}</version>
- <executions>
- <execution>
- <goals>
- <goal>test</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>de.saumya.mojo</groupId>
- <artifactId>jruby-maven-plugin</artifactId>
- <version>${jruby.plugins.version}</version>
- <executions>
+ <executions>
<execution>
+ <id>version</id>
<phase>compile</phase>
<goals>
- <goal>jruby</goal>
+ <goal>exec</goal>
</goals>
<configuration>
<script>
@@ -117,6 +101,26 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>de.saumya.mojo</groupId>
+ <artifactId>rspec-maven-plugin</artifactId>
+ <version>${jruby.plugins.version}</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
</plugins>
</build>
<properties>

0 comments on commit eb6ebaf

Please sign in to comment.