Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use jar-dependencies for creating the vendored directory
- Loading branch information
Showing
17 changed files
with
341 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 12 additions & 8 deletions
20
lib/jbundler/lock_down_pom.rb → lib/jbundler/dependency_pom.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,27 @@ | ||
bdir = java.lang.System.getProperty( "jbundler.basedir" ) | ||
jfile = java.lang.System.getProperty( "jbundler.jarfile" ) | ||
gfile = java.lang.System.getProperty( "jbundler.gemfile" ) | ||
jworkdir = java.lang.System.getProperty( "jbundler.workdir" ) | ||
|
||
basedir( File.dirname( jfile ) ) | ||
basedir( bdir ) | ||
if basedir != bdir | ||
# older maven-tools needs this | ||
self.instance_variable_set( :@basedir, bdir ) | ||
end | ||
|
||
gemfile( gfile ) if File.exists? gfile | ||
|
||
jarfile( jfile ) | ||
jarfile( jfile, :skip_locked => true ) | ||
|
||
build do | ||
directory = jworkdir | ||
default_goal 'dependency:list' | ||
end | ||
|
||
properties( 'project.build.sourceEncoding' => 'utf-8', | ||
'tesla.dump.readOnly' => true, | ||
'tesla.dump.pom' => 'tree.pom.xml' ) | ||
|
||
plugin( :dependency, '2.8', | ||
:includeTypes => 'jar', | ||
:outputAbsoluteArtifactFilename => true, | ||
:outputFile => "#{jworkdir}/dependencies.txt" ) | ||
|
||
properties( 'project.build.sourceEncoding' => 'utf-8', | ||
'tesla.dump.readOnly' => true, | ||
'tesla.dump.pom' => 'lockdown.pom.xml' ) | ||
:outputFile => java.lang.System.getProperty( "jbundler.outputFile" ) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
require 'jbundler/pom_runner' | ||
require 'fileutils' | ||
module JBundler | ||
class JRubyComplete < PomRunner | ||
|
||
def initialize( config, options ) | ||
super options | ||
work_dir = File.expand_path( config.work_dir ) | ||
maven.property( 'jbundler.workdir', work_dir ) | ||
maven.property( 'jbundler.basedir', config.basedir ) | ||
maven.property( 'jbundler.jarfile', config.jarfile ) | ||
maven.property( 'jbundler.gemfile', config.gemfile ) | ||
@tree = File.join( work_dir, 'tree.txt' ) | ||
maven.property( 'jbundler.outputFile', @tree ) | ||
end | ||
|
||
def pom_file | ||
File.join( File.dirname( __FILE__ ), 'jruby_complete_pom.rb' ) | ||
end | ||
|
||
def show_versions | ||
puts '...' | ||
|
||
FileUtils.rm_f( @tree ) | ||
|
||
exec( 'dependency:tree' ) | ||
|
||
if File.exists?( @tree ) | ||
puts File.read( @tree ) | ||
end | ||
end | ||
|
||
def packit | ||
puts '...' | ||
exec( :package ) | ||
|
||
puts | ||
puts 'now you can use jruby like this' | ||
puts | ||
puts "\tjava -jar jruby_complete_custom.jar" | ||
puts | ||
end | ||
end | ||
end |
Oops, something went wrong.