maven-tools-1.2.1/0000755000175000017500000000000014506273454013315 5ustar jeromejeromemaven-tools-1.2.1/spec/0000755000175000017500000000000014506273454014247 5ustar jeromejeromemaven-tools-1.2.1/spec/spec_helper.rb0000644000175000017500000000047214506273454017070 0ustar jeromejeromebegin require 'minitest' rescue LoadError end require 'minitest/autorun' $LOAD_PATH.unshift File.join( File.dirname( File.expand_path( __FILE__ ) ), '..', 'lib' ) # due to development dependencies we have a cycle, so remove it $LOAD_PATH.delete_if { |lp| lp.match /maven-tools-/ } maven-tools-1.2.1/spec/pom_with_execute/0000755000175000017500000000000014506273454017617 5ustar jeromejeromemaven-tools-1.2.1/spec/pom_with_execute/pom.xml0000644000175000017500000000535414506273454021143 0ustar jeromejerome 4.0.0 no_group_id_given pom_with_execute 0.0.0 example with execute io.takari.polyglot polyglot-maven-plugin 0.1.18 validate execute pom.rb second validate execute second pom.rb third validate execute third pom.rb forth validate execute forth pom.rb fifth validate execute fifth pom.rb io.takari.polyglot polyglot-ruby 0.1.18 maven-tools-1.2.1/spec/pom_with_execute/pom.rb0000644000175000017500000000073314506273454020742 0ustar jeromejeromeproject 'example with execute' do build do execute( :phase => :validate ) do |ctx| p ctx.project end execute( :second, :phase => :validate ) do |ctx| p ctx.project end execute( :third, :validate ) do |ctx| p ctx.project end phase :validate do execute( :id => :forth ) do |ctx| p ctx.project end end end phase :validate do execute( :id => :fifth ) do |ctx| p ctx.project end end end maven-tools-1.2.1/spec/pom_spec.rb0000644000175000017500000000201714506273454016401 0ustar jeromejeromerequire File.expand_path( 'spec_helper', File.dirname( __FILE__ ) ) require 'maven/tools/pom' require 'maven/tools/versions' describe Maven::Tools::POM do ( Dir[ File.join( File.dirname( __FILE__ ), 'gem*' ) ] + Dir[ File.join( File.dirname( __FILE__ ), 'pom*' ) ] + Dir[ File.join( File.dirname( __FILE__ ), 'mavenfile*' ) ] ).each do |dir| if File.directory?( dir ) it "should convert #{dir}" do pom = Maven::Tools::POM.new( dir ) file = File.join( dir, 'pom.xml' ) file = File.join( File.dirname( dir ), 'pom.xml' ) unless File.exists? file pom_xml = File.read( file ) pom_xml.sub!( /\n/, '' ) pom_xml.sub!( /\n/, '' ) pom_xml.sub!( /]|\n)*>/, '' ) pom_xml.gsub!( /io.tesla.polyglot/, 'io.takari.polyglot' ) pom_xml.gsub!( /tesla-polyglot/, 'polyglot' ) pom_xml.gsub!( /${tesla.version}/, Maven::Tools::VERSIONS[ :polyglot_version ] ) pom.to_s.must_equal pom_xml end end end end maven-tools-1.2.1/spec/pom_maven_style/0000755000175000017500000000000014506273454017450 5ustar jeromejeromemaven-tools-1.2.1/spec/pom_maven_style/pom.rb0000644000175000017500000004060514506273454020575 0ustar jeromejeromeproject do model_version '1.0.1' parent 'example:parent:1.1' do relative_path '../pom.xml' end id 'example:project:1.1' packaging 'jar' name 'my name' url 'example.com' description 'some description' inception_year 2020 organization do name 'ngo' url 'ngo.org' end licenses do license do name 'AGPL' url 'gnu.org/agpl' distribution 'online' comments 'should be used more often' end end developers do developer do id '1' name 'first' email 'first@example.com' url 'example.com/first' organization 'orga' organization_url 'example.org' roles 'developer', 'architect' timezone 'IST' properties :gender => :male end end contributors do contributor do name 'first' email 'first@example.com' url 'example.com/first' organization 'orga' organization_url 'example.org' roles 'developer', 'architect' timezone 'IST' properties :gender => :male end end mailing_lists do mailing_list do name 'development' subscribe 'subcribe@example.com' unsubscribe 'unsubcribe@example.com' post 'post@example.com' archive 'example.com/archive' other_archives 'example.com/archive1', 'example.com/archive2' end end prerequisites do maven '3.0.5' end modules 'part1', 'part2' scm do connection 'scm:git:git://github.com/torquebox/maven-tools.git' developer_connection 'scm:git:ssh://git@github.com/torquebox/maven-tools.git' tag 'first' url 'http://github.com/torquebox/maven-tools' end issue_management do system 'jira' url 'https://issues.sonatype.org/' end ci_management do url 'travis-ci.org/jruby/jruby' system 'travis' notifier do type 'email' address 'mail2@example.com' end notifier do type 'email' address 'mail@example.com' send_on_error true send_on_failure false send_on_success true send_on_warning false configuration :key1 => 'value1', :key2 => 'value2' end end distribution do status 'active' download_url 'http://dev.example.com/downloads' repository do id :first url 'http://repo.example.com' name 'First' layout 'legacy' releases do enabled true update_policy 'daily' checksum_policy :strict end snapshots do enabled false update_policy :never checksum_policy 'none' end end snapshot_repository( 'snapshots', 'http://snaphots.example.com', 'First Snapshots', :layout => 'legacy' ) do releases( :enabled => false, :update_policy => 'daily', :checksum_policy => :strict ) snapshots( :enabled =>true, :update_policy => :never, :checksum_policy => 'none' ) end site do id 'first' url 'http://dev.example.com' name 'dev site' end relocation( 'org.group:artifact:1.2.3' ) do message 'follow the maven convention' end end properties :key1 => 'value1', 'key2' => :value2 dependency_management do dependencies do dependency do group_id 'com.example' artifact_id 'tools' version '1.2.3' classifier 'super' scope 'provided' system_path '/home/development/tools.jar' optional true exclusion 'org.example:some' exclusion 'org.example', 'something' end end end dependencies do dependency do group_id 'com.example' artifact_id 'tools' version '2.3' type :war classifier 'super' scope 'provided' system_path '/home/development/wartools.jar' optional false exclusion 'org.example:some' exclusion 'org.example', 'something' end end repositories do repository do id :first url 'http://repo.example.com' name 'First' layout 'legacy' releases do enabled true update_policy 'daily' checksum_policy :strict end snapshots do enabled false update_policy :never checksum_policy 'none' end end snapshot_repository do id 'snapshots' url 'http://snaphots.example.com' name 'First Snapshots' layout 'legacy' releases do update_policy 'daily' checksum_policy :strict end snapshots do update_policy :never checksum_policy 'none' end end end plugin_repositories do plugin_repository do id :first url 'http://pluginrepo.example.com' name 'First' layout 'legacy' releases do enabled true update_policy 'daily' checksum_policy :strict end snapshots do enabled false update_policy :never checksum_policy 'none' end end end build do default_goal :deploy directory 'target' final_name 'myproject' source_directory 'src' script_source_directory 'script' test_source_directory 'test' output_directory 'pkg' test_output_directory 'pkg/test' extension 'org.group:gem-extension:1.2' resource do target_path 'target' filtering true directory 'resources' includes [ '**/*' ] excludes [ '*~' ] end test_resource do target_path 'target/test' filtering false directory 'testresources' includes [ '**/*' ] excludes [ '*~' ] end plugins do plugin :jar, '1.0' do inherited false extensions 'true' configuration :finalName => :testing end jruby_plugin :gem, '1.0.0' do extensions false dependency do group_id 'rubygems' artifact_id 'bundler' version '1.7.13' type :gem end end plugin :antrun do execute_goals( 'run' ) do configuration( 'tasks' => { 'exec' => { '@executable' => '/bin/sh', '@osfamily' => 'unix', 'arg' => { '@line' => '-c \'cp "${jruby.basedir}/bin/jruby.bash" "${jruby.basedir}/bin/jruby"\'' } }, 'chmod' => { '@file' => '${jruby.basedir}/bin/jruby', '@perm' => '755' } } ) id 'copy' phase 'package' end dependency do group_id 'org.super.duper' artifact_id 'executor' version '1.0.0' end end plugin 'org.codehaus.mojo:exec-maven-plugin' do execute_goal( 'exec' ) do id 'invoker-generator' configuration( 'arguments' => [ '-Djruby.bytecode.version=${base.java.version}', '-classpath', xml( '' ), 'org.jruby.anno.InvokerGenerator', '${anno.sources}/annotated_classes.txt', '${project.build.outputDirectory}' ], 'executable' => 'java', 'classpathScope' => 'compile' ) end end end plugin_management do plugins do jruby_plugin( :gem, '3.0.0') do configuration( :scope => :compile, :gems => { 'thread_safe' => '0.3.3', 'jdbc-mysql' => '5.1.30' } ) end plugin( "org.mortbay.jetty:jetty-maven-plugin:8.1" ) do configuration( :path => '/', :connectors => [ { :@implementation => "org.eclipse.jetty.server.nio.SelectChannelConnector", :port => '${run.port}' }, { :@implementation => "org.eclipse.jetty.server.ssl.SslSelectChannelConnector", :port => '${run.sslport}', :keystore => '${run.keystore}', :keyPassword => '${run.keystore.pass}', :trustPassword => '${run.truststore.pass}' } ], :httpConnector => { :port => '${run.port}' } ) end end end end profiles do profile :id => 'one' do activation do active_by_default false jdk '1.7' os :family => 'nix', :version => '2.7', :arch => 'x86_64', :name => 'linux' file :missing => 'required_file', :exists => 'optional' property :name => 'test', :value => 'extended' end end end end # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # value # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # maven-tools-1.2.1/spec/pom_maven_hash_style/0000755000175000017500000000000014506273454020453 5ustar jeromejeromemaven-tools-1.2.1/spec/pom_maven_hash_style/pom.rb0000644000175000017500000004203114506273454021573 0ustar jeromejeromeproject :name => 'my name', :url => 'example.com' do model_version '1.0.1' parent( :group_id => 'example', :artifact_id => 'parent', :version => '1.1', :relative_path => '../pom.xml' ) id( :group_id => 'example', :artifact_id => 'project', :version => '1.1' ) packaging 'jar' description 'some description' inception_year 2020 organization :name => 'ngo', :url => 'ngo.org' license( :name => 'AGPL', :url => 'gnu.org/agpl', :distribution => 'online', :comments => 'should be used more often' ) developer( :id => '1', :name => 'first', :url => 'example.com/first', :email => 'first@example.com', :organization => 'orga', :organization_url => 'example.org', :roles => [ 'developer', 'architect' ], :timezone => 'IST', :properties => { :gender => :male } ) contributor( :name => 'first', :url => 'example.com/first', :email => 'first@example.com', :organization => 'orga', :organization_url => 'example.org', :roles => [ 'developer', 'architect' ], :timezone => 'IST', :properties => { :gender => :male } ) mailing_list( :name => 'development', :subscribe => 'subcribe@example.com', :unsubscribe => 'unsubcribe@example.com', :post => 'post@example.com', :archive => 'example.com/archive', :other_archives => [ 'example.com/archive1', 'example.com/archive2' ] ) prerequisites :maven => '3.0.5' modules 'part1', 'part2' scm( :connection => 'scm:git:git://github.com/torquebox/maven-tools.git', :developer_connection => 'scm:git:ssh://git@github.com/torquebox/maven-tools.git', :tag => 'first', :url => 'http://github.com/torquebox/maven-tools' ) issue_management( :system => 'jira', :url => 'https://issues.sonatype.org/' ) ci_management( :system => 'travis', :url => 'travis-ci.org/jruby/jruby' ) do notifier( :type => 'email', :address => 'mail2@example.com' ) notifier( :type => 'email', :send_on_error => true, :send_on_failure => false, :send_on_success =>true, :send_on_warning => false, :address => 'mail@example.com', :configuration => { :key1 => 'value1', :key2 => 'value2' } ) end distribution( :status => 'active', :download_url => 'http://dev.example.com/downloads' ) do repository( :id => 'first', :name => 'First', :url => 'http://repo.example.com', :layout => 'legacy' ) do releases( :enabled => true, :update_policy => 'daily', :checksum_policy => :strict ) snapshots( :enabled => false, :update_policy => :never, :checksum_policy => 'none' ) end snapshot_repository( :id => 'snapshots', :name => 'First Snapshots', :url => 'http://snaphots.example.com', :layout => 'legacy' ) do releases( :enabled => false, :update_policy => 'daily', :checksum_policy => :strict ) snapshots( :enabled =>true, :update_policy => :never, :checksum_policy => 'none' ) end site( :id => 'first', :name => 'dev site', :url => 'http://dev.example.com' ) relocation( :group_id => 'org.group', :artifact_id => 'artifact', :version => '1.2.3', :message => 'follow the maven convention' ) end properties :key1 => 'value1', 'key2' => :value2 dependency_management do jar( :group_id => 'com.example', :artifact_id => 'tools', :version => '1.2.3', :classifier => 'super', :scope => 'provided', :system_path => '/home/development/tools.jar', :exclusions => [ { :group_id => 'org.example', :artifact_id => 'some' }, { :group_id => 'org.example', :artifact_id => 'something' } ], :optional => true ) end war( :group_id => 'com.example', :artifact_id => 'tools', :version => '2.3', :classifier => 'super', :scope => 'provided', :system_path => '/home/development/wartools.jar', :exclusions => [ { :group_id => 'org.example', :artifact_id => 'some' }, { :group_id => 'org.example', :artifact_id => 'something' } ], :optional => false ) repository( :id => 'first', :url => 'http://repo.example.com', :name => 'First', :layout => 'legacy' ) do releases( :enabled => true, :update_policy => 'daily', :checksum_policy => :strict ) snapshots( :enabled => false, :update_policy => :never, :checksum_policy => 'none' ) end snapshot_repository( :id => 'snapshots', :url => 'http://snaphots.example.com', :name => 'First Snapshots', :layout => 'legacy' ) do releases( :update_policy => 'daily', :checksum_policy => :strict ) snapshots( :update_policy => :never, :checksum_policy => 'none' ) end plugin_repository( :id => :first, :url => 'http://pluginrepo.example.com', :name => 'First', :layout => 'legacy' ) do releases( :enabled => true, :update_policy => 'daily', :checksum_policy => :strict ) snapshots( :enabled => false, :update_policy => :never, :checksum_policy => 'none' ) end build do directory 'target' final_name 'myproject' source_directory 'src' script_source_directory 'script' test_source_directory 'test' output_directory 'pkg' test_output_directory 'pkg/test' default_goal :deploy extension( :group_id => 'org.group', :artifact_id => 'gem-extension', :version => '1.2' ) resource( :target_path => 'target', :filtering => true, :directory => 'resources', :includes => [ '**/*' ], :excludes => [ '*~' ] ) test_resource( :target_path => 'target/test', :filtering => false, :directory => 'testresources', :includes => [ '**/*' ], :excludes => [ '*~' ] ) plugin( :jar, '1.0', :inherited => false, :extensions => true, :finalName => :testing ) jruby_plugin :gem, '1.0.0', 'extensions' => false do gem :bundler, '1.7.13' end plugin :antrun do execute_goals( 'run', :id => 'copy', :phase => 'package', 'tasks' => { 'exec' => { '@executable' => '/bin/sh', '@osfamily' => 'unix', 'arg' => { '@line' => '-c \'cp "${jruby.basedir}/bin/jruby.bash" "${jruby.basedir}/bin/jruby"\'' } }, 'chmod' => { '@file' => '${jruby.basedir}/bin/jruby', '@perm' => '755' } } ) jar 'org.super.duper:executor:1.0.0' end plugin 'org.codehaus.mojo:exec-maven-plugin' do execute_goal( 'exec', :id => 'invoker-generator', :arguments => [ '-Djruby.bytecode.version=${base.java.version}', '-classpath', xml( '' ), 'org.jruby.anno.InvokerGenerator', '${anno.sources}/annotated_classes.txt', '${project.build.outputDirectory}' ], :executable => 'java', :classpath_scope => 'compile' ) end plugin_management do jruby_plugin( :gem, '3.0.0', :scope => :compile, :gems => { 'thread_safe' => '0.3.3', 'jdbc-mysql' => '5.1.30' } ) plugin( "org.mortbay.jetty:jetty-maven-plugin:8.1", :path => '/', :connectors => [ { :@implementation => "org.eclipse.jetty.server.nio.SelectChannelConnector", :port => '${run.port}' }, { :@implementation => "org.eclipse.jetty.server.ssl.SslSelectChannelConnector", :port => '${run.sslport}', :keystore => '${run.keystore}', :key_password => '${run.keystore.pass}', :trust_password => '${run.truststore.pass}' } ], :http_connector => { :port => '${run.port}' } ) end end profile :id => 'one' do activation do active_by_default false jdk '1.7' os :family => 'nix', :version => '2.7', :arch => 'x86_64', :name => 'linux' file :missing => 'required_file', :exists => 'optional' property :name => 'test', :value => 'extended' end end end # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # value # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # maven-tools-1.2.1/spec/pom_maven_alternative_style/0000755000175000017500000000000014506273454022046 5ustar jeromejeromemaven-tools-1.2.1/spec/pom_maven_alternative_style/pom.rb0000644000175000017500000004335514506273454023200 0ustar jeromejeromeproject 'my name', 'example.com' do model_version '1.0.1' parent 'example', 'parent', '1.1' do relative_path '../pom.xml' end id 'example', 'project', '1.1' packaging 'jar' description 'some description' inception_year 2020 organization 'ngo', 'ngo.org' license 'AGPL', 'gnu.org/agpl' do distribution 'online' comments 'should be used more often' end developer '1', 'first', 'example.com/first', 'first@example.com' do organization 'orga' organization_url 'example.org' roles 'developer', 'architect' timezone 'IST' properties[ :gender ] = :male end contributor 'first', 'example.com/first', 'first@example.com' do organization 'orga' organization_url 'example.org' roles 'developer', 'architect' timezone 'IST' properties[ :gender ] = :male end mailing_list 'development' do subscribe 'subcribe@example.com' unsubscribe 'unsubcribe@example.com' post 'post@example.com' archive 'example.com/archive' other_archives 'example.com/archive1', 'example.com/archive2' end prerequisites do maven '3.0.5' end modules 'part1', 'part2' scm( 'scm:git:git://github.com/torquebox/maven-tools.git', 'scm:git:ssh://git@github.com/torquebox/maven-tools.git', 'http://github.com/torquebox/maven-tools', :tag => 'first' ) issue_management( 'https://issues.sonatype.org/', :system => 'jira' ) ci_management( 'travis-ci.org/jruby/jruby', :system => 'travis' ) do notifier( 'email', 'mail2@example.com' ) notifier( 'email', 'mail@example.com', :send_on_error => true, :send_on_failure => false, :send_on_success =>true, :send_on_warning => false, :configuration => { :key1 => 'value1', :key2 => 'value2' } ) end distribution( 'active', 'http://dev.example.com/downloads' ) do repository( :first, 'http://repo.example.com', 'First', :layout => 'legacy' ) do releases( :enabled => true, :update_policy => 'daily', :checksum_policy => :strict ) snapshots( :enabled =>false, :update_policy => :never, :checksum_policy => 'none' ) end snapshot_repository( 'snapshots', 'http://snaphots.example.com', 'First Snapshots', :layout => 'legacy' ) do releases( :enabled => false, :update_policy => 'daily', :checksum_policy => :strict ) snapshots( :enabled =>true, :update_policy => :never, :checksum_policy => 'none' ) end site( 'first','http://dev.example.com', 'dev site' ) relocation( 'org.group', 'artifact', '1.2.3', :message => 'follow the maven convention' ) end properties :key1 => 'value1', 'key2' => :value2 scope :provided do dependency_management do jar( 'com.example', 'tools', '1.2.3', :classifier => 'super', :system_path => '/home/development/tools.jar', :exclusions => [ 'org.example:some', 'org.example:something' ], :optional => true ) end war( 'com.example', 'tools', '2.3', :classifier => 'super', :system_path => '/home/development/wartools.jar', :exclusions => [ 'org.example:some', 'org.example:something' ], :optional => false ) end repository( 'first', 'http://repo.example.com', 'First' ) do layout 'legacy' releases( :enabled => true, :update_policy => 'daily', :checksum_policy => :strict ) snapshots( :enabled => false, :update_policy => :never, :checksum_policy => 'none' ) end snapshot_repository( 'snapshots', 'http://snaphots.example.com', 'First Snapshots', :layout => 'legacy' ) do releases( :update_policy => 'daily', :checksum_policy => :strict ) snapshots( :update_policy => :never, :checksum_policy => 'none' ) end plugin_repository( :first, 'http://pluginrepo.example.com', 'First' ) do layout 'legacy' releases( :enabled => true, :update_policy => 'daily', :checksum_policy => :strict ) snapshots( :enabled => false, :update_policy => :never, :checksum_policy => 'none' ) end build do default_goal :deploy directory 'target' final_name 'myproject' source_directory 'src' script_source_directory 'script' test_source_directory 'test' output_directory 'pkg' test_output_directory 'pkg/test' extension 'org.group', 'gem-extension', '1.2' resource do target_path 'target' filtering true directory 'resources' includes [ '**/*' ] excludes [ '*~' ] end test_resource do target_path 'target/test' filtering false directory 'testresources' includes [ '**/*' ] excludes [ '*~' ] end plugin :jar, '1.0', :inherited => false, :extensions => true do configuration :finalName => :testing end jruby_plugin :gem, '1.0.0', 'extensions' => false do gem :bundler, '1.7.13' end phase :package do plugin :antrun do execute_goals( 'run', :id => 'copy', 'tasks' => { 'exec' => { '@executable' => '/bin/sh', '@osfamily' => 'unix', 'arg' => { '@line' => '-c \'cp "${jruby.basedir}/bin/jruby.bash" "${jruby.basedir}/bin/jruby"\'' } }, 'chmod' => { '@file' => '${jruby.basedir}/bin/jruby', '@perm' => '755' } } ) jar 'org.super.duper:executor:1.0.0' end end plugin 'org.codehaus.mojo:exec-maven-plugin' do execute_goal( 'exec', :id => 'invoker-generator', 'arguments' => [ '-Djruby.bytecode.version=${base.java.version}', '-classpath', xml( '' ), 'org.jruby.anno.InvokerGenerator', '${anno.sources}/annotated_classes.txt', '${project.build.outputDirectory}' ], 'executable' => 'java', 'classpathScope' => 'compile' ) end overrides do jruby_plugin( :gem, '3.0.0', :scope => :compile, :gems => { 'thread_safe' => '0.3.3', 'jdbc-mysql' => '5.1.30' } ) plugin( "org.mortbay.jetty:jetty-maven-plugin:8.1", :path => '/', :connectors => [ { :@implementation => "org.eclipse.jetty.server.nio.SelectChannelConnector", :port => '${run.port}' }, { :@implementation => "org.eclipse.jetty.server.ssl.SslSelectChannelConnector", :port => '${run.sslport}', :keystore => '${run.keystore}', :keyPassword => '${run.keystore.pass}', :trustPassword => '${run.truststore.pass}' } ], :httpConnector => { :port => '${run.port}' } ) end end profile :id => 'one' do activation do active_by_default false jdk '1.7' os :family => 'nix', :version => '2.7', :arch => 'x86_64', :name => 'linux' file :missing => 'required_file', :exists => 'optional' property :name => 'test', :value => 'extended' end end end # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # value # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # maven-tools-1.2.1/spec/pom_from_jarfile_with_repos/0000755000175000017500000000000014506273454022024 5ustar jeromejeromemaven-tools-1.2.1/spec/pom_from_jarfile_with_repos/pom.xml0000644000175000017500000000302214506273454023336 0ustar jeromejerome 4.0.0 no_group_id_given pom_from_jarfile_with_repos 0.0.0 junit junit 4.11 http://1.2.3.4/artifactory/ http://1.2.3.4/artifactory/ http://1.2.3.4/artifactory/ takari takari http://otto.takari.io:8081/nexus/content/groups/public false true tesla tesla http://repository.tesla.io:8081/nexus/content/groups/public maven-tools-1.2.1/spec/pom_from_jarfile_with_repos/pom.rb0000644000175000017500000000003114506273454023136 0ustar jeromejeromeproject do jarfile end maven-tools-1.2.1/spec/pom_from_jarfile_with_repos/Jarfile0000644000175000017500000000035114506273454023322 0ustar jeromejeromesource "http://1.2.3.4/artifactory/" repository 'takari', "http://otto.takari.io:8081/nexus/content/groups/public" snapshot_repository 'tesla', "http://repository.tesla.io:8081/nexus/content/groups/public" jar 'junit:junit', '4.11' maven-tools-1.2.1/spec/pom_from_jarfile_with_jruby/0000755000175000017500000000000014506273454022027 5ustar jeromejeromemaven-tools-1.2.1/spec/pom_from_jarfile_with_jruby/pom.xml0000644000175000017500000000107014506273454023342 0ustar jeromejerome 4.0.0 no_group_id_given pom_from_jarfile_with_jruby 0.0.0 example from jarfile maven-tools-1.2.1/spec/pom_from_jarfile_with_jruby/pom.rb0000644000175000017500000000006214506273454023145 0ustar jeromejeromeproject 'example from jarfile' do jarfile end maven-tools-1.2.1/spec/pom_from_jarfile_with_jruby/Jarfile0000644000175000017500000000015214506273454023324 0ustar jeromejerome# not used anymore jruby '1.7.16' do no_asm true scope :compile jar 'joda-time:joda-time', '2.6' endmaven-tools-1.2.1/spec/pom_from_jarfile_with_exclusions/0000755000175000017500000000000014506273454023070 5ustar jeromejeromemaven-tools-1.2.1/spec/pom_from_jarfile_with_exclusions/pom.xml0000644000175000017500000000421114506273454024403 0ustar jeromejerome 4.0.0 no_group_id_given pom_from_jarfile_with_exclusions 0.0.0 example from jarfile asd asd 123 source test group a1 group a2 group a3 group a4 group a5 group a6 group a7 dsa dsa 12 provided group b1 group b2 group b3 maven-tools-1.2.1/spec/pom_from_jarfile_with_exclusions/pom.rb0000644000175000017500000000006214506273454024206 0ustar jeromejeromeproject 'example from jarfile' do jarfile end maven-tools-1.2.1/spec/pom_from_jarfile_with_exclusions/Jarfile0000644000175000017500000000072614506273454024374 0ustar jeromejeromejar 'asd:asd:123' do scope 'test' classifier 'source' exclusions 'group:a1', ['group','a2'] do exclusion 'group', 'a3' exclusion :artifact_id => 'a4', :group_id => 'group' exclusion 'group:a5' exclusion 'group' do artifact_id 'a6' end exclusion do group_id 'group' artifact_id 'a7' end end end jar 'dsa:dsa', '12', :exclusions => ['group:b1', ['group','b2']], :classifier => 'provided' do exclusion 'group:b3' end maven-tools-1.2.1/spec/pom_from_jarfile_help_only/0000755000175000017500000000000014506273454021632 5ustar jeromejeromemaven-tools-1.2.1/spec/pom_from_jarfile_help_only/pom.xml0000644000175000017500000000227714506273454023157 0ustar jeromejerome 4.0.0 no_group_id_given pom_from_jarfile_help_only 0.0.0 example from jarfile asd asd asd asd asd asd pom maven-tools-1.2.1/spec/pom_from_jarfile_help_only/pom.rb0000644000175000017500000000006214506273454022750 0ustar jeromejeromeproject 'example from jarfile' do jarfile end maven-tools-1.2.1/spec/pom_from_jarfile_help_only/Jarfile0000644000175000017500000000021614506273454023130 0ustar jeromejeromehelp jar 'asd:asd' do help exclusions 'asd:asd' do help; end exclusion do help; end end pom 'asd:asd' do help end jruby do help; end maven-tools-1.2.1/spec/pom_from_jarfile_and_skip_lock/0000755000175000017500000000000014506273454022441 5ustar jeromejeromemaven-tools-1.2.1/spec/pom_from_jarfile_and_skip_lock/pom.xml0000644000175000017500000000215214506273454023756 0ustar jeromejerome 4.0.0 no_group_id_given pom_from_jarfile_and_skip_lock 0.0.0 example from jarfile junit junit [4.11,4.99999] test org.slf4j simple-slf4 [1.6.4,1.6.99999] maven-tools-1.2.1/spec/pom_from_jarfile_and_skip_lock/pom.rb0000644000175000017500000000010514506273454023555 0ustar jeromejeromeproject 'example from jarfile' do jarfile :skip_lock => true end maven-tools-1.2.1/spec/pom_from_jarfile_and_skip_lock/Jarfile.lock0000644000175000017500000000011314506273454024662 0ustar jeromejerome--- :test: - org.hamcrest:hamcrest-core:jar:1.3 - junit:junit:jar:4.11 maven-tools-1.2.1/spec/pom_from_jarfile_and_skip_lock/Jarfile0000644000175000017500000000012614506273454023737 0ustar jeromejeromejar 'junit:junit', '~> 4.11', :scope => :test jar 'org.slf4j:simple-slf4', '~> 1.6.4'maven-tools-1.2.1/spec/pom_from_jarfile_and_lock/0000755000175000017500000000000014506273454021413 5ustar jeromejeromemaven-tools-1.2.1/spec/pom_from_jarfile_and_lock/pom2.xml0000644000175000017500000000246414506273454023020 0ustar jeromejerome 4.0.0 no_group_id_given pom_from_jarfile 0.0.0 example from jarfile pom2.xml org.bouncycastle bcpkix-jdk15on 1.49 junit junit 4.11 org.hamcrest hamcrest-core 1.3 org.bouncycastle bcprov-jdk15on 1.49 org.jruby jruby 1.7.13 pom provided maven-tools-1.2.1/spec/pom_from_jarfile_and_lock/pom.xml0000644000175000017500000000241014506273454022725 0ustar jeromejerome 4.0.0 no_group_id_given pom_from_jarfile_and_lock 0.0.0 example from jarfile org.slf4j simple-slf4 [1.6.4,1.6.99999] org.hamcrest hamcrest-core 1.3 test junit junit 4.11 test maven-tools-1.2.1/spec/pom_from_jarfile_and_lock/pom.rb0000644000175000017500000000013414506273454022531 0ustar jeromejeromeproject 'example from jarfile' do jarfile #properties 'tesla.dump.pom' => 'pom2.xml' end maven-tools-1.2.1/spec/pom_from_jarfile_and_lock/Jarfile.lock0000644000175000017500000000011314506273454023634 0ustar jeromejerome--- :test: - org.hamcrest:hamcrest-core:jar:1.3 - junit:junit:jar:4.11 maven-tools-1.2.1/spec/pom_from_jarfile_and_lock/Jarfile0000644000175000017500000000010514506273454022706 0ustar jeromejeromejar 'junit:junit', '~> 4.11' jar 'org.slf4j:simple-slf4', '~> 1.6.4'maven-tools-1.2.1/spec/pom_from_jarfile_and_empty_lock/0000755000175000017500000000000014506273454022631 5ustar jeromejeromemaven-tools-1.2.1/spec/pom_from_jarfile_and_empty_lock/pom.xml0000644000175000017500000000212114506273454024142 0ustar jeromejerome 4.0.0 no_group_id_given pom_from_jarfile_and_empty_lock 0.0.0 example from jarfile junit junit [4.11,4.99999] org.slf4j simple-slf4 [1.6.4,1.6.99999] maven-tools-1.2.1/spec/pom_from_jarfile_and_empty_lock/pom.rb0000644000175000017500000000006214506273454023747 0ustar jeromejeromeproject 'example from jarfile' do jarfile end maven-tools-1.2.1/spec/pom_from_jarfile_and_empty_lock/Jarfile.lock0000644000175000017500000000000014506273454025045 0ustar jeromejeromemaven-tools-1.2.1/spec/pom_from_jarfile_and_empty_lock/Jarfile0000644000175000017500000000010514506273454024124 0ustar jeromejeromejar 'junit:junit', '~> 4.11' jar 'org.slf4j:simple-slf4', '~> 1.6.4'maven-tools-1.2.1/spec/pom_from_jarfile/0000755000175000017500000000000014506273454017561 5ustar jeromejeromemaven-tools-1.2.1/spec/pom_from_jarfile/pom.xml0000644000175000017500000000220114506273454021071 0ustar jeromejerome 4.0.0 no_group_id_given pom_from_jarfile 0.0.0 example from jarfile junit junit 4.11 ruby.maven-tools.jar myfirst 0 system ${basedir}/myfirst.jar maven-tools-1.2.1/spec/pom_from_jarfile/pom.rb0000644000175000017500000000006214506273454020677 0ustar jeromejeromeproject 'example from jarfile' do jarfile end maven-tools-1.2.1/spec/pom_from_jarfile/Jarfile0000644000175000017500000000011514506273454021055 0ustar jeromejeromejar 'junit:junit', '4.11' local './myfirst.jar' jruby :version => '1.7.13' maven-tools-1.2.1/spec/pom.xml0000644000175000017500000003341214506273454015567 0ustar jeromejerome 1.0.1 example parent 1.1 ../pom.xml project jar my name example.com some description 2020 ngo ngo.org AGPL gnu.org/agpl online should be used more often 1 first example.com/first first@example.com orga example.org developer architect IST male first example.com/first first@example.com orga example.org developer architect IST male development subcribe@example.com unsubcribe@example.com post@example.com example.com/archive example.com/archive1 example.com/archive2 3.0.5 part1 part2 scm:git:git://github.com/torquebox/maven-tools.git scm:git:ssh://git@github.com/torquebox/maven-tools.git first http://github.com/torquebox/maven-tools jira https://issues.sonatype.org/ travis travis-ci.org/jruby/jruby email
mail2@example.com
email true false true false
mail@example.com
value1 value2
true daily strict false never none first First http://repo.example.com legacy false daily strict true never none snapshots First Snapshots http://snaphots.example.com legacy first dev site http://dev.example.com http://dev.example.com/downloads active org.group artifact 1.2.3 follow the maven convention value1 value2 com.example tools 1.2.3 super provided /home/development/tools.jar org.example some org.example something true com.example tools 2.3 war super provided /home/development/wartools.jar org.example some org.example something false true daily strict false never none first First http://repo.example.com legacy false daily strict true never none snapshots First Snapshots http://snaphots.example.com legacy true daily strict false never none first First http://pluginrepo.example.com legacy src script test pkg pkg/test org.group gem-extension 1.2 deploy target true resources **/* *~ target/test false testresources **/* *~ target myproject org.jruby.maven gem-maven-plugin 3.0.0 compile 0.3.3 5.1.30 org.mortbay.jetty jetty-maven-plugin 8.1 / ${run.port} ${run.sslport} ${run.keystore} ${run.keystore.pass} ${run.truststore.pass} ${run.port} maven-jar-plugin 1.0 true false testing org.jruby.maven gem-maven-plugin 1.0.0 false rubygems bundler 1.7.13 gem maven-antrun-plugin copy package run org.super.duper executor 1.0.0 org.codehaus.mojo exec-maven-plugin invoker-generator exec -Djruby.bytecode.version=${base.java.version} -classpath org.jruby.anno.InvokerGenerator ${anno.sources}/annotated_classes.txt ${project.build.outputDirectory} java compile one false 1.7 linux nix x86_64 2.7 test extended required_file optional
maven-tools-1.2.1/spec/my/0000755000175000017500000000000014506273454014674 5ustar jeromejeromemaven-tools-1.2.1/spec/my/my.gemspec0000644000175000017500000000026714506273454016673 0ustar jeromejerome#-*- mode: ruby -*- Gem::Specification.new do |s| s.name = 'my' s.version = '1.0' s.author = 'me' s.summary = 'summary' s.files << 'my.gemspec' end # vim: syntax=Ruby maven-tools-1.2.1/spec/mavenfile_jrubyWar/0000755000175000017500000000000014506273454020102 5ustar jeromejeromemaven-tools-1.2.1/spec/mavenfile_jrubyWar/pom.xml0000644000175000017500000000254414506273454021424 0ustar jeromejerome 4.0.0 no_group_id_given mavenfile_jrubyWar 0.0.0 jrubyWar mavenfile_jrubyWar 0.3.0 org.jruby.maven jruby9-extensions ${jruby9.plugins.version} ${basedir} something ${basedir}/pkg my maven-tools-1.2.1/spec/mavenfile_jrubyWar/Mavenfile0000644000175000017500000000016414506273454021734 0ustar jeromejerome#-*- mode: ruby -*- packaging 'jrubyWar' final_name 'my' resource :includes => ['something'] # vim: syntax=Ruby maven-tools-1.2.1/spec/mavenfile_jrubyJar/0000755000175000017500000000000014506273454020065 5ustar jeromejeromemaven-tools-1.2.1/spec/mavenfile_jrubyJar/pom.xml0000644000175000017500000000254414506273454021407 0ustar jeromejerome 4.0.0 no_group_id_given mavenfile_jrubyJar 0.0.0 jrubyJar mavenfile_jrubyJar 0.3.0 org.jruby.maven jruby9-extensions ${jruby9.plugins.version} ${basedir} something ${basedir}/pkg my maven-tools-1.2.1/spec/mavenfile_jrubyJar/Mavenfile0000644000175000017500000000016414506273454021717 0ustar jeromejerome#-*- mode: ruby -*- packaging 'jrubyJar' final_name 'my' resource :includes => ['something'] # vim: syntax=Ruby maven-tools-1.2.1/spec/mavenfile/0000755000175000017500000000000014506273454016215 5ustar jeromejeromemaven-tools-1.2.1/spec/mavenfile/Mavenfile0000644000175000017500000005342714506273454020061 0ustar jeromejerome#-*- mode: ruby -*- name 'my name' url 'example.com' model_version '1.0.1' parent( 'example:parent', '1.1', :relative_path => '../pom.xml' ) id 'example:project', '1.1' packaging 'jar' description 'some description' inception_year 2020 organization :name => 'ngo', :url => 'ngo.org' license( :name => 'AGPL', :url => 'gnu.org/agpl', :distribution => 'online', :comments => 'should be used more often' ) developer( :id => '1', :name => 'first', :url => 'example.com/first', :email => 'first@example.com', :organization => 'orga', :organization_url => 'example.org', :roles => [ 'developer', 'architect' ], :timezone => 'IST', :properties => { :gender => :male } ) contributor( :name => 'first', :url => 'example.com/first', :email => 'first@example.com', :organization => 'orga', :organization_url => 'example.org', :roles => [ 'developer', 'architect' ], :timezone => 'IST', :properties => { :gender => :male } ) mailing_list( :name => 'development', :subscribe => 'subcribe@example.com', :unsubscribe => 'unsubcribe@example.com', :post => 'post@example.com', :archives => [ 'example.com/archive', 'example.com/archive1', 'example.com/archive2' ] ) prerequisites :maven => '3.0.5' modules 'part1', 'part2' scm do connection 'scm:git:git://github.com/torquebox/maven-tools.git' developer_connection 'scm:git:ssh://git@github.com/torquebox/maven-tools.git' tag 'first' url 'http://github.com/torquebox/maven-tools' end issue_management do system 'jira' url 'https://issues.sonatype.org/' end ci_management do url 'travis-ci.org/jruby/jruby' system 'travis' notifier do type 'email' address 'mail2@example.com' end notifier do type 'email' address 'mail@example.com' send_on_error true send_on_failure false send_on_success true send_on_warning false configuration :key1 => 'value1', :key2 => 'value2' end end distribution do status 'active' download_url 'http://dev.example.com/downloads' repository do id :first url 'http://repo.example.com' name 'First' layout 'legacy' releases do enabled true update_policy 'daily' checksum_policy :strict end snapshots do enabled false update_policy :never checksum_policy 'none' end end snapshot_repository( 'snapshots', 'http://snaphots.example.com', 'First Snapshots', :layout => 'legacy' ) do releases( :enabled => false, :update_policy => 'daily', :checksum_policy => :strict ) snapshots( :enabled =>true, :update_policy => :never, :checksum_policy => 'none' ) end site do id 'first' url 'http://dev.example.com' name 'dev site' end relocation( 'org.group:artifact:1.2.3' ) do message 'follow the maven convention' end end properties :key1 => 'value1', 'key2' => :value2 dependency_management do jar( 'com.example:tools:1.2.3' ) do classifier 'super' scope 'provided' system_path '/home/development/tools.jar' optional true exclusion 'org.example:some' exclusion 'org.example', 'something' end end war( 'com.example:tools', '2.3' ) do classifier 'super' scope 'provided' system_path '/home/development/wartools.jar' optional false exclusion 'org.example:some' exclusion 'org.example', 'something' end repository do id :first url 'http://repo.example.com' name 'First' layout 'legacy' releases do enabled true update_policy 'daily' checksum_policy :strict end snapshots do enabled false update_policy :never checksum_policy 'none' end end snapshot_repository do id 'snapshots' url 'http://snaphots.example.com' name 'First Snapshots' layout 'legacy' releases do update_policy 'daily' checksum_policy :strict end snapshots do update_policy :never checksum_policy 'none' end end plugin_repository do id :first url 'http://pluginrepo.example.com' name 'First' layout 'legacy' releases do enabled true update_policy 'daily' checksum_policy :strict end snapshots do enabled false update_policy :never checksum_policy 'none' end end default_goal :deploy directory 'target' final_name 'myproject' extension 'org.group:gem-extension:1.2' source_directory 'src' script_source_directory 'script' test_source_directory 'test' output_directory 'pkg' test_output_directory 'pkg/test' resource do target_path 'target' filtering true directory 'resources' includes [ '**/*' ] excludes [ '*~' ] end test_resource do target_path 'target/test' filtering false directory 'testresources' includes [ '**/*' ] excludes [ '*~' ] end plugin :jar, '1.0', 'inherited' => 'false', :extensions => true do configuration :finalName => :testing end jruby_plugin :gem, '1.0.0', :extensions => false do gem :bundler, '1.7.13' end phase :package do plugin :antrun do execute_goals( 'run', :id => 'copy', 'tasks' => { 'exec' => { '@executable' => '/bin/sh', '@osfamily' => 'unix', 'arg' => { '@line' => '-c \'cp "${jruby.basedir}/bin/jruby.bash" "${jruby.basedir}/bin/jruby"\'' } }, 'chmod' => { '@file' => '${jruby.basedir}/bin/jruby', '@perm' => '755' } } ) jar 'org.super.duper:executor:1.0.0' end end plugin 'org.codehaus.mojo:exec-maven-plugin' do execute_goal( 'exec', :id => 'invoker-generator', 'arguments' => [ '-Djruby.bytecode.version=${base.java.version}', '-classpath', xml( '' ), 'org.jruby.anno.InvokerGenerator', '${anno.sources}/annotated_classes.txt', '${project.build.outputDirectory}' ], 'executable' => 'java', 'classpathScope' => 'compile' ) end plugin_management do jruby_plugin( :gem, '3.0.0', :scope => :compile, :gems => { 'thread_safe' => '0.3.3', 'jdbc-mysql' => '5.1.30' } ) plugin( "org.mortbay.jetty:jetty-maven-plugin:8.1", :path => '/', :connectors => [ { :@implementation => "org.eclipse.jetty.server.nio.SelectChannelConnector", :port => '${run.port}' }, { :@implementation => "org.eclipse.jetty.server.ssl.SslSelectChannelConnector", :port => '${run.sslport}', :keystore => '${run.keystore}', :keyPassword => '${run.keystore.pass}', :trustPassword => '${run.truststore.pass}' } ], :httpConnector => { :port => '${run.port}' } ) end profile :id => 'one' do activation do active_by_default false jdk '1.7' os :family => 'nix', :version => '2.7', :arch => 'x86_64', :name => 'linux' file :missing => 'required_file', :exists => 'optional' property :name => 'test', :value => 'extended' end end # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # value # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # value # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # value # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # vim: syntax=Ruby maven-tools-1.2.1/spec/jarfile_spec.rb0000644000175000017500000000554414506273454017232 0ustar jeromejeromerequire File.expand_path( 'spec_helper', File.dirname( __FILE__ ) ) require 'maven/tools/jarfile' class Container attr_reader :artifacts, :repositories def initialize @artifacts = [] @repositories = [] end def add_artifact(a) @artifacts << a end def add_repository(name, url) @repositories << name end end describe Maven::Tools::Jarfile do let(:workdir) { 'pkg' } let(:jfile) { File.join(workdir, 'tmp-jarfile') } let(:jfile_lock) { jfile + ".lock"} let(:container) { Container.new } subject { Maven::Tools::Jarfile.new(jfile) } before do FileUtils.mkdir_p workdir Dir[File.join(workdir, "tmp*")].each { |f| FileUtils.rm_f f } end after do FileUtils.rm_rf(File.join(workdir, "tmp-*")) end it 'generates lockfile' do subject.generate_lockfile(%w( a b c d e f ruby.bundler:bla)) File.read(jfile_lock).must_equal <<-EOF a b c d e f EOF end it 'check locked coordinate' do File.open(jfile_lock, 'w') do |f| f.write <<-EOF a:b:pom:3 a:c:jar:1 EOF end subject.locked.must_equal ["a:b:pom:3", "a:c:jar:1"] subject.locked?("a:b:pom:321").must_equal true subject.locked?("a:b:jar:321").must_equal true subject.locked?("a:d:jar:432").must_equal false end it 'populate repositories' do File.open(jfile, 'w') do |f| f.write <<-EOF repository :first, "http://example.com/repo" source 'second', "http://example.org/repo" source "http://example.org/repo/3" EOF end subject.populate_unlocked container container.repositories.size.must_equal 3 container.artifacts.size.must_equal 0 container.repositories[0].must_equal "first" container.repositories[1].must_equal "second" container.repositories[2].must_equal "http://example.org/repo/3" end it 'populate artifacts without locked' do File.open(jfile, 'w') do |f| f.write <<-EOF jar 'a:b', '123' pom 'x:y', '987' EOF end subject.populate_unlocked container container.repositories.size.must_equal 0 container.artifacts.size.must_equal 2 container.artifacts[0].to_s.must_equal "a:b:jar:123" container.artifacts[1].to_s.must_equal "x:y:pom:987" end it 'populate artifacts with locked' do File.open(jfile, 'w') do |f| f.write <<-EOF jar 'a:b', '123' pom 'x:y', '987' EOF end File.open(jfile_lock, 'w') do |f| f.write <<-EOF a:b:jar:432 EOF end subject.populate_unlocked container container.repositories.size.must_equal 0 container.artifacts.size.must_equal 1 container.artifacts[0].to_s.must_equal "x:y:pom:987" end it 'populate locked artifacts' do File.open(jfile_lock, 'w') do |f| f.write <<-EOF a:b:jar:432 EOF end subject.populate_locked container container.repositories.size.must_equal 0 container.artifacts.size.must_equal 1 container.artifacts[0].to_s.must_equal "a:b:jar:432" end end maven-tools-1.2.1/spec/gemspec_with_source_and_no_jar/0000755000175000017500000000000014506273454022457 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_source_and_no_jar/src/0000755000175000017500000000000014506273454023246 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_source_and_no_jar/src/main/0000755000175000017500000000000014506273454024172 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_source_and_no_jar/src/main/java/0000755000175000017500000000000014506273454025113 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_source_and_no_jar/src/main/java/.keep0000644000175000017500000000000014506273454026026 0ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_source_and_no_jar/pom.xml0000644000175000017500000000551314506273454024000 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 rubygems thor [0.14.6,2.0) gem rubygems rake [10.0,10.99999] gem test mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec maven-tools-1.2.1/spec/gemspec_with_source_and_no_jar/bouncy-castle-java.gemspec0000644000175000017500000000136514506273454027520 0ustar jeromejerome#-*- mode: ruby -*- Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.add_dependency 'thor', '>= 0.14.6', '< 2.0' s.add_development_dependency 'rake', '~> 10.0' s.require_path = 'mylib' end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_source_and_no_jar/Mavenfile0000644000175000017500000000007514506273454024312 0ustar jeromejerome#-*- mode: ruby -*- gemspec :jar => nil # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_source_and_custom_jarname/0000755000175000017500000000000014506273454024216 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_source_and_custom_jarname/src/0000755000175000017500000000000014506273454025005 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_source_and_custom_jarname/src/main/0000755000175000017500000000000014506273454025731 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_source_and_custom_jarname/src/main/java/0000755000175000017500000000000014506273454026652 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_source_and_custom_jarname/src/main/java/.keep0000644000175000017500000000000014506273454027565 0ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_source_and_custom_jarname/pom.xml0000644000175000017500000000731614506273454025542 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 rubygems thor [0.14.6,2.0) gem rubygems rake [10.0,10.99999] gem test mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-with-jar-extension ${jruby.plugins.version} ${basedir}/pkg maven-jar-plugin 2.4 prepare-package jar mylib green maven-clean-plugin 2.4 mylib green.jar */**/*.jar org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec maven-tools-1.2.1/spec/gemspec_with_source_and_custom_jarname/bouncy-castle-java.gemspec0000644000175000017500000000136514506273454031257 0ustar jeromejerome#-*- mode: ruby -*- Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.add_dependency 'thor', '>= 0.14.6', '< 2.0' s.add_development_dependency 'rake', '~> 10.0' s.require_path = 'mylib' end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_source_and_custom_jarname/Mavenfile0000644000175000017500000000010114506273454026037 0ustar jeromejerome#-*- mode: ruby -*- gemspec :jar => 'green' # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_source/0000755000175000017500000000000014506273454020305 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_source/src/0000755000175000017500000000000014506273454021074 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_source/src/main/0000755000175000017500000000000014506273454022020 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_source/src/main/java/0000755000175000017500000000000014506273454022741 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_source/src/main/java/.keep0000644000175000017500000000000014506273454023654 0ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_source/pom.xml0000644000175000017500000000726414506273454021633 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0149 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 org.bouncycastle bcpkix-jdk15on 1.49 org.bouncycastle bcprov-jdk15on 1.49 mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-with-jar-extension ${jruby.plugins.version} ${basedir}/pkg maven-jar-plugin 2.4 prepare-package jar mylib bouncy-castle-java maven-clean-plugin 2.4 mylib bouncy-castle-java.jar */**/*.jar org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec maven-tools-1.2.1/spec/gemspec_with_source/bouncy-castle-version.rb0000644000175000017500000000024114506273454025062 0ustar jeromejeromeclass BouncyCastle MAVEN_VERSION = '1.49' unless defined? MAVEN_VERSION VERSION_ = MAVEN_VERSION.sub( /[.]/, '' ) unless defined? BouncyCastle::VERSION_ end maven-tools-1.2.1/spec/gemspec_with_source/bouncy-castle-java.gemspec0000644000175000017500000000160614506273454025344 0ustar jeromejerome#-*- mode: ruby -*- require './bouncy-castle-version.rb' Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0#{BouncyCastle::VERSION_}" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.requirements << "jar org.bouncycastle:bcpkix-jdk15on, #{BouncyCastle::MAVEN_VERSION}" s.requirements << "jar org.bouncycastle:bcprov-jdk15on, #{BouncyCastle::MAVEN_VERSION}" s.require_path = 'mylib' end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_source/Mavenfile0000644000175000017500000000006114506273454022133 0ustar jeromejerome#-*- mode: ruby -*- gemspec # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_prereleased_dependency_and_no_repo/0000755000175000017500000000000014506273454026041 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_prereleased_dependency_and_no_repo/pom.xml0000644000175000017500000000503114506273454027355 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.1 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 rubygems minitest [5.3,5.99999] gem test org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec maven-tools-1.2.1/spec/gemspec_with_prereleased_dependency_and_no_repo/bouncy-castle-java.gemspec0000644000175000017500000000123114506273454033072 0ustar jeromejerome#-*- mode: ruby -*- Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.1" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.add_development_dependency 'minitest', '~> 5.3' end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_prereleased_dependency_and_no_repo/Mavenfile0000644000175000017500000000011314506273454027665 0ustar jeromejerome#-*- mode: ruby -*- gemspec :no_rubygems_repo => true # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_prereleased_dependency/0000755000175000017500000000000014506273454023476 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_prereleased_dependency/pom.xml0000644000175000017500000000524714506273454025023 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.1 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 rubygems minitest [5.3,5.99999] gem test mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec maven-tools-1.2.1/spec/gemspec_with_prereleased_dependency/bouncy-castle-java.gemspec0000644000175000017500000000123114506273454030527 0ustar jeromejerome#-*- mode: ruby -*- Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.1" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.add_development_dependency 'minitest', '~> 5.3' end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_prereleased_dependency/Mavenfile0000644000175000017500000000006114506273454025324 0ustar jeromejerome#-*- mode: ruby -*- gemspec # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_jars_lock/0000755000175000017500000000000014506273454020754 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_jars_lock/pom.xml0000644000175000017500000000747414506273454022305 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0149 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html EPL-1.0 http://opensource.org/licenses/EPL-1.0 Eclipse Public License 1.0 GPL-2.0 http://opensource.org/licenses/GPL-2.0 GNU General Public License version 2.0 LGPL-2.1 http://opensource.org/licenses/LGPL-2.1 GNU Library or "Lesser" General Public License version 2.1 Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 org.bouncycastle bcpkix-jdk15on 1.49 mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec Jars.lock Jars.lock org.bouncycastle bcpkix-jdk15on 1.50 compile org.bouncycastle bcprov-jdk15on 1.50 compile maven-tools-1.2.1/spec/gemspec_with_jars_lock/bouncy-castle-version.rb0000644000175000017500000000024114506273454025531 0ustar jeromejeromeclass BouncyCastle MAVEN_VERSION = '1.49' unless defined? MAVEN_VERSION VERSION_ = MAVEN_VERSION.sub( /[.]/, '' ) unless defined? BouncyCastle::VERSION_ end maven-tools-1.2.1/spec/gemspec_with_jars_lock/bouncy-castle-java.gemspec0000644000175000017500000000150114506273454026005 0ustar jeromejerome#-*- mode: ruby -*- require './bouncy-castle-version.rb' Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0#{BouncyCastle::VERSION_}" s.author = 'Hiroshi Nakamura' s.email = 'nahi@ruby-lang.org' s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.licenses = [ 'EPL-1.0', 'GPL-2.0', 'LGPL-2.1' ] s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.requirements << "jar org.bouncycastle:bcpkix-jdk15on, #{BouncyCastle::MAVEN_VERSION}" end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_jars_lock/Mavenfile0000644000175000017500000000006114506273454022602 0ustar jeromejerome#-*- mode: ruby -*- gemspec # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_jars_lock/Jars.lock0000644000175000017500000000013414506273454022523 0ustar jeromejeromeorg.bouncycastle:bcpkix-jdk15on:1.50:compile: org.bouncycastle:bcprov-jdk15on:1.50:compile: maven-tools-1.2.1/spec/gemspec_with_jar_dependencies/0000755000175000017500000000000014506273454022267 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_jar_dependencies/pom.xml0000644000175000017500000000655314506273454023615 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html EPL-1.0 http://opensource.org/licenses/EPL-1.0 Eclipse Public License 1.0 GPL-2.0 http://opensource.org/licenses/GPL-2.0 GNU General Public License version 2.0 LGPL-2.1 http://opensource.org/licenses/LGPL-2.1 GNU Library or "Lesser" General Public License version 2.1 Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 org.bouncycastle bcpkix-jdk15on 1.2.3 org.bouncycastle bcprov-jdk15on 1.2.3 test mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec maven-tools-1.2.1/spec/gemspec_with_jar_dependencies/bouncy-castle-java.gemspec0000644000175000017500000000127414506273454027327 0ustar jeromejerome#-*- mode: ruby -*- Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0" s.author = 'Hiroshi Nakamura' s.email = 'nahi@ruby-lang.org' s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.licenses = [ 'EPL-1.0', 'GPL-2.0', 'LGPL-2.1' ] s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.requirements << "jar org.bouncycastle:bcpkix-jdk15on, 1.2.3" s.requirements << "jar org.bouncycastle:bcprov-jdk15on, 1.2.3, :scope => :test" end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_jar_dependencies/Mavenfile0000644000175000017500000000006114506273454024115 0ustar jeromejerome#-*- mode: ruby -*- gemspec # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_extras/0000755000175000017500000000000014506273454020313 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_extras/pom.xml0000644000175000017500000001046114506273454021632 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0149 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 pom.xml true org.bouncycastle bcpkix-jdk15on 1.49 org.bouncycastle bcprov-jdk15on 1.49 mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/lib ../../lib/ruby/shared/ bouncy-castle-java.rb ${basedir}/pkg maven-dependency-plugin generate-test-resources copy-dependencies lib true org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec true true maven-clean-plugin 2.5 clean-lib clean clean ${basedir}/lib false maven-tools-1.2.1/spec/gemspec_with_extras/bouncy-castle-version.rb0000644000175000017500000000024114506273454025070 0ustar jeromejeromeclass BouncyCastle MAVEN_VERSION = '1.49' unless defined? MAVEN_VERSION VERSION_ = MAVEN_VERSION.sub( /[.]/, '' ) unless defined? BouncyCastle::VERSION_ end maven-tools-1.2.1/spec/gemspec_with_extras/bouncy-castle-java.gemspec0000644000175000017500000000155314506273454025353 0ustar jeromejerome#-*- mode: ruby -*- require './bouncy-castle-version.rb' Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0#{BouncyCastle::VERSION_}" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.requirements << "jar org.bouncycastle:bcpkix-jdk15on, #{BouncyCastle::MAVEN_VERSION}" s.requirements << "jar org.bouncycastle:bcprov-jdk15on, #{BouncyCastle::MAVEN_VERSION}" end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_extras/Mavenfile0000644000175000017500000000100714506273454022142 0ustar jeromejerome#-*- mode: ruby -*- gemspec :include_jars => true resource do directory '../../lib/ruby/shared/' target_path '${basedir}/lib' includes 'bouncy-castle-java.rb' end plugin( :clean, '2.5' ) do execute_goals( :clean, :phase => :clean, :id => 'clean-lib', :filesets => [ { :directory => '${basedir}/lib' } ], :failOnError => false ) end properties( 'tesla.dump.pom' => 'pom.xml', 'tesla.dump.readonly' => true ) # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_custom_source_and_custom_jarname/0000755000175000017500000000000014506273454025610 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_custom_source_and_custom_jarname/src/0000755000175000017500000000000014506273454026377 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_custom_source_and_custom_jarname/src/java/0000755000175000017500000000000014506273454027320 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_custom_source_and_custom_jarname/src/java/.keep0000644000175000017500000000000014506273454030233 0ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_custom_source_and_custom_jarname/pom.xml0000644000175000017500000000737214506273454027136 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 rubygems thor [0.14.6,2.0) gem rubygems rake [10.0,10.99999] gem test mavengems mavengem:https://rubygems.org src/java org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-with-jar-extension ${jruby.plugins.version} ${basedir}/pkg maven-jar-plugin 2.4 prepare-package jar lib green maven-clean-plugin 2.4 lib green.jar */**/*.jar org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec maven-tools-1.2.1/spec/gemspec_with_custom_source_and_custom_jarname/bouncy-castle-java.gemspec0000644000175000017500000000133214506273454032643 0ustar jeromejerome#-*- mode: ruby -*- Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.add_dependency 'thor', '>= 0.14.6', '< 2.0' s.add_development_dependency 'rake', '~> 10.0' end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_custom_source_and_custom_jarname/Mavenfile0000644000175000017500000000013014506273454027433 0ustar jeromejerome#-*- mode: ruby -*- gemspec :source => 'src/java', :jar => 'green' # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_custom_source/0000755000175000017500000000000014506273454021677 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_custom_source/src/0000755000175000017500000000000014506273454022466 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_custom_source/src/java/0000755000175000017500000000000014506273454023407 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_custom_source/src/java/.keep0000644000175000017500000000000014506273454024322 0ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_custom_source/pom.xml0000644000175000017500000000743014506273454023220 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 rubygems thor [0.14.6,2.0) gem rubygems rake [10.0,10.99999] gem test mavengems mavengem:https://rubygems.org src/java org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-with-jar-extension ${jruby.plugins.version} ${basedir}/pkg maven-jar-plugin 2.4 prepare-package jar mylib bouncy-castle-java maven-clean-plugin 2.4 mylib bouncy-castle-java.jar */**/*.jar org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec maven-tools-1.2.1/spec/gemspec_with_custom_source/bouncy-castle-java.gemspec0000644000175000017500000000136514506273454026740 0ustar jeromejerome#-*- mode: ruby -*- Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.add_dependency 'thor', '>= 0.14.6', '< 2.0' s.add_development_dependency 'rake', '~> 10.0' s.require_path = 'mylib' end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_custom_source/Mavenfile0000644000175000017500000000010714506273454023526 0ustar jeromejerome#-*- mode: ruby -*- gemspec :source => 'src/java' # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_access_to_model/0000755000175000017500000000000014506273454022130 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_with_access_to_model/pom.xml0000644000175000017500000000476214506273454023456 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 1.5.0 mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec maven-tools-1.2.1/spec/gemspec_with_access_to_model/bouncy-castle-java.gemspec0000644000175000017500000000117014506273454027163 0ustar jeromejerome#-*- mode: ruby -*- Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_with_access_to_model/Mavenfile0000644000175000017500000000014514506273454023761 0ustar jeromejerome#-*- mode: ruby -*- gemspec properties( :version_from_model => model.version ) # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_prerelease_snapshot/0000755000175000017500000000000014506273454022020 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_prerelease_snapshot/pom.xml0000644000175000017500000000526514506273454023345 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.beta.1-SNAPSHOT gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 rubygems minitest [5.3,5.99999] gem test mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec maven-tools-1.2.1/spec/gemspec_prerelease_snapshot/bouncy-castle-java.gemspec0000644000175000017500000000123614506273454027056 0ustar jeromejerome#-*- mode: ruby -*- Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.beta.1" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.add_development_dependency 'minitest', '~> 5.3' end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_prerelease_snapshot/Mavenfile0000644000175000017500000000010314506273454023643 0ustar jeromejerome#-*- mode: ruby -*- gemspec :snapshot => true # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_prerelease/0000755000175000017500000000000014506273454020101 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_prerelease/pom.xml0000644000175000017500000000526514506273454021426 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.beta.1-SNAPSHOT gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 rubygems minitest [5.3,5.99999] gem test mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec maven-tools-1.2.1/spec/gemspec_prerelease/bouncy-castle-java.gemspec0000644000175000017500000000123614506273454025137 0ustar jeromejerome#-*- mode: ruby -*- Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.beta.1" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.add_development_dependency 'minitest', '~> 5.3' end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_prerelease/Mavenfile0000644000175000017500000000006114506273454021727 0ustar jeromejerome#-*- mode: ruby -*- gemspec # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_no_rubygems_repo/0000755000175000017500000000000014506273454021330 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_no_rubygems_repo/pom.xml0000644000175000017500000000503114506273454022644 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.1 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 rubygems minitest [5.3,5.99999] gem test org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec maven-tools-1.2.1/spec/gemspec_no_rubygems_repo/bouncy-castle-java.gemspec0000644000175000017500000000123114506273454026361 0ustar jeromejerome#-*- mode: ruby -*- Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.1" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.add_development_dependency 'minitest', '~> 5.3' end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_no_rubygems_repo/Mavenfile0000644000175000017500000000011314506273454023154 0ustar jeromejerome#-*- mode: ruby -*- gemspec :no_rubygems_repo => true # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_include_jars/0000755000175000017500000000000014506273454020414 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_include_jars/pom.xml0000644000175000017500000000656014506273454021740 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0149 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 org.bouncycastle bcpkix-jdk15on 1.49 org.bouncycastle bcprov-jdk15on 1.49 mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg maven-dependency-plugin generate-test-resources copy-dependencies lib true org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec true true maven-tools-1.2.1/spec/gemspec_include_jars/bouncy-castle-version.rb0000644000175000017500000000024114506273454025171 0ustar jeromejeromeclass BouncyCastle MAVEN_VERSION = '1.49' unless defined? MAVEN_VERSION VERSION_ = MAVEN_VERSION.sub( /[.]/, '' ) unless defined? BouncyCastle::VERSION_ end maven-tools-1.2.1/spec/gemspec_include_jars/bouncy-castle-java.gemspec0000644000175000017500000000155314506273454025454 0ustar jeromejerome#-*- mode: ruby -*- require './bouncy-castle-version.rb' Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0#{BouncyCastle::VERSION_}" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.requirements << "jar org.bouncycastle:bcpkix-jdk15on, #{BouncyCastle::MAVEN_VERSION}" s.requirements << "jar org.bouncycastle:bcprov-jdk15on, #{BouncyCastle::MAVEN_VERSION}" end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_include_jars/Mavenfile0000644000175000017500000000010714506273454022243 0ustar jeromejerome#-*- mode: ruby -*- gemspec :include_jars => true # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_in_profile/0000755000175000017500000000000014506273454020100 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec_in_profile/pom.xml0000644000175000017500000000430014506273454021412 0ustar jeromejerome 4.0.0 no_group_id_given gemspec_in_profile 0.0.0 gemspec_in_profile org.jruby.maven mavengem-wagon ${mavengem.wagon.version} gem org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec utf-8 3.0.0 2.0.0 org.bouncycastle bcpkix-jdk15on 1.49 org.bouncycastle bcprov-jdk15on 1.49 mavengems mavengem:https://rubygems.org maven-tools-1.2.1/spec/gemspec_in_profile/bouncy-castle-version.rb0000644000175000017500000000024114506273454024655 0ustar jeromejeromeclass BouncyCastle MAVEN_VERSION = '1.49' unless defined? MAVEN_VERSION VERSION_ = MAVEN_VERSION.sub( /[.]/, '' ) unless defined? BouncyCastle::VERSION_ end maven-tools-1.2.1/spec/gemspec_in_profile/bouncy-castle-java.gemspec0000644000175000017500000000155314506273454025140 0ustar jeromejerome#-*- mode: ruby -*- require './bouncy-castle-version.rb' Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0#{BouncyCastle::VERSION_}" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.requirements << "jar org.bouncycastle:bcpkix-jdk15on, #{BouncyCastle::MAVEN_VERSION}" s.requirements << "jar org.bouncycastle:bcprov-jdk15on, #{BouncyCastle::MAVEN_VERSION}" end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_in_profile/Mavenfile0000644000175000017500000000010714506273454021727 0ustar jeromejerome#-*- mode: ruby -*- profile :gem do gemspec end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec_dependencies_spec.rb0000644000175000017500000000600514506273454021740 0ustar jeromejeromerequire File.expand_path( 'spec_helper', File.dirname( __FILE__ ) ) require 'maven/tools/gemspec_dependencies' describe Maven::Tools::GemspecDependencies do let( :spec ) do Gem::Specification.new do |s| s.add_dependency 'thor', '>= 0.14.6', '< 2.0' s.add_dependency 'maven-tools', "~> 0.32.3" s.add_development_dependency 'minitest', '~> 5.3' s.add_development_dependency 'rake', '~> 10.0' s.requirements << 'jar sdas:das:tes, 123' s.requirements << 'jar sdas:das, 123' s.requirements << 'jar sdas.asd:das, 123, [fds:fre]' s.requirements << 'jar sdas.asd:das:bla, 123,[fds:fre, ferf:de]' s.requirements << 'jar sdas.asd:das, blub, 123,[fds:fre, ferf:de]' s.requirements << 'jar "de.sdas:das:tes",123' s.requirements << 'jar de.sdas:das, "123"' s.requirements << 'jar "de.sdas.asd:das", 123, ["fds:fre"]' s.requirements << "jar 'de.sdas.asd:das:bla', '123',['fds:fre', 'ferf:de']" s.requirements << 'jar "de.sdas.asd:das", "blub", 123,"[fds:fre, ferf:de]"' end end subject { Maven::Tools::GemspecDependencies.new( spec ) } it 'should setup artifact' do subject.runtime.must_equal ["rubygems:thor:[0.14.6,2.0)", "rubygems:maven-tools:[0.32.3,0.32.99999]"] subject.development.must_equal ["rubygems:minitest:[5.3,5.99999]", "rubygems:rake:[10.0,10.99999]"] subject.java_runtime.must_equal [ ["sdas", "das", "jar", "tes", "123"], ["sdas", "das", "jar", "123"], ["sdas.asd", "das", "jar", "123", ["fds:fre"]], ["sdas.asd", "das", "jar", "bla", "123", ["fds:fre", "ferf:de"]], ["sdas.asd", "das", "jar", "blub", "123", ["fds:fre", "ferf:de"]], ["de.sdas", "das", "jar", "tes", "123"], ["de.sdas", "das", "jar", "123"], ["de.sdas.asd", "das", "jar", "123", ["fds:fre"]], ["de.sdas.asd", "das", "jar", "bla", "123", ["fds:fre", "ferf:de"]], ["de.sdas.asd", "das", "jar", "blub", "123", ["fds:fre","ferf:de"]] ] subject.java_dependencies.must_equal [ [:compile, "sdas", "das", "jar", "tes", "123"], [:compile, "sdas", "das", "jar", "123"], [:compile, "sdas.asd", "das", "jar", "123", ["fds:fre"]], [:compile, "sdas.asd", "das", "jar", "bla", "123", ["fds:fre", "ferf:de"]], [:compile, "sdas.asd", "das", "jar", "blub", "123", ["fds:fre", "ferf:de"]], [:compile, "de.sdas", "das", "jar", "tes", "123"], [:compile, "de.sdas", "das", "jar", "123"], [:compile, "de.sdas.asd", "das", "jar", "123", ["fds:fre"]], [:compile, "de.sdas.asd", "das", "jar", "bla", "123", ["fds:fre", "ferf:de"]], [:compile, "de.sdas.asd", "das", "jar", "blub", "123", ["fds:fre","ferf:de"]] ] end end maven-tools-1.2.1/spec/gemspec/0000755000175000017500000000000014506273454015672 5ustar jeromejeromemaven-tools-1.2.1/spec/gemspec/pom.xml0000644000175000017500000000652214506273454017214 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0149 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html EPL-1.0 http://opensource.org/licenses/EPL-1.0 Eclipse Public License 1.0 GPL-2.0 http://opensource.org/licenses/GPL-2.0 GNU General Public License version 2.0 LGPL-2.1 http://opensource.org/licenses/LGPL-2.1 GNU Library or "Lesser" General Public License version 2.1 Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 org.bouncycastle bcpkix-jdk15on 1.49 org.bouncycastle bcprov-jdk15on 1.49 mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec maven-tools-1.2.1/spec/gemspec/bouncy-castle-version.rb0000644000175000017500000000024114506273454022447 0ustar jeromejeromeclass BouncyCastle MAVEN_VERSION = '1.49' unless defined? MAVEN_VERSION VERSION_ = MAVEN_VERSION.sub( /[.]/, '' ) unless defined? BouncyCastle::VERSION_ end maven-tools-1.2.1/spec/gemspec/bouncy-castle-java.gemspec0000644000175000017500000000163314506273454022731 0ustar jeromejerome#-*- mode: ruby -*- require './bouncy-castle-version.rb' Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0#{BouncyCastle::VERSION_}" s.author = 'Hiroshi Nakamura' s.email = 'nahi@ruby-lang.org' s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.licenses = [ 'EPL-1.0', 'GPL-2.0', 'LGPL-2.1' ] s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.requirements << "jar org.bouncycastle:bcpkix-jdk15on, #{BouncyCastle::MAVEN_VERSION}" s.requirements << "jar org.bouncycastle:bcprov-jdk15on, #{BouncyCastle::MAVEN_VERSION}" end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemspec/Mavenfile0000644000175000017500000000006114506273454017520 0ustar jeromejerome#-*- mode: ruby -*- gemspec # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_without_gemspec/0000755000175000017500000000000014506273454021145 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_without_gemspec/pom.xml0000644000175000017500000000372614506273454022472 0ustar jeromejerome 4.0.0 no_group_id_given gemfile_without_gemspec 0.0.0 gemfile_without_gemspec utf-8 3.0.0 2.0.0 rubygems virtus [0,) gem mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} install gems initialize maven-tools-1.2.1/spec/gemfile_without_gemspec/Mavenfile0000644000175000017500000000006114506273454022773 0ustar jeromejerome#-*- mode: ruby -*- gemfile # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_without_gemspec/Gemfile0000644000175000017500000000011114506273454022431 0ustar jeromejerome#-*- mode: ruby -*- gem 'virtus', :require => false # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_two_sources/0000755000175000017500000000000014506273454021346 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_two_sources/pom.xml0000644000175000017500000000362514506273454022671 0ustar jeromejerome 4.0.0 no_group_id_given gemfile_with_two_sources 0.0.0 gemfile_with_two_sources utf-8 3.0.0 2.0.0 mavengems mavengem:https://rubygems.org http_github.com_rubygems mavengem:http://github.com/rubygems org.jruby.maven mavengem-wagon ${mavengem.wagon.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} install gems initialize maven-tools-1.2.1/spec/gemfile_with_two_sources/Mavenfile0000644000175000017500000000006114506273454023174 0ustar jeromejerome#-*- mode: ruby -*- gemfile # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_two_sources/Gemfile0000644000175000017500000000015314506273454022640 0ustar jeromejerome#-*- mode: ruby -*- source 'https://rubygems.org' source 'http://github.com/rubygems' # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_test_group/0000755000175000017500000000000014506273454021165 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_test_group/pom.xml0000644000175000017500000002230614506273454022505 0ustar jeromejerome 4.0.0 no_group_id_given gemfile_with_test_group 0.0.0 gemfile_with_test_group utf-8 3.0.0 2.0.0 mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} install gems initialize gemfile Gemfile.lock rubygems rack [1.5.2,1.5.99999] gem rubygems activerecord [4.1.1,4.1.99999] gem rubygems activerecord-jdbcmysql-adapter [1.3.7,1.3.99999] gem rubygems newrelic_rpm [0,) gem rubygems aws-sdk [1.40.2,1.40.99999] gem rubygems grape [0.7.0,0.7.99999] gem rubygems codeclimate-test-reporter [0,) gem test rubygems rspec-mocks [2.14.1,2.14.99999] gem test rubygems rspec [2.14.1,2.14.99999] gem test rubygems simplecov [0.8.2,0.8.99999] gem test rubygems thor [0.18.1,0.18.99999] gem test rubygems vcr [2.8.0,2.8.99999] gem test rubygems webmock [1.16.0,1.16.99999] gem test rubygems fake_sqs [0.1.0,0.1.99999] gem test rubygems rack-test [0.6.2,0.6.99999] gem test rubygems database_cleaner [1.2.0,1.2.99999] gem test rubygems shoulda-matchers [2.6.1,2.6.99999] gem test gemfile_lock Gemfile.lock org.jruby.maven gem-maven-plugin ${jruby.plugins.version} install gem sets for compile initialize sets compile 1.5.2 4.1.1 4.1.1 4.1.1 0.6.9 1.8.1 5.3.3 0.3.3 1.1.0 3.2.2 5.0.1.20140414130214 1.3.7 1.3.7 5.1.30 3.8.1.221 1.40.3 1.6.1 0.5.3 0.7.0 2.1.1 1.10.0 0.5.5 0.4.5 0.8.3 1.0.2 0.1.1 0.0.4 0.11.0 1.0.0 0.0.9 install gem sets for test initialize sets test 0.3.0 0.8.2 1.1.3 0.8.0 2.14.6 2.14.1 2.14.8 2.14.5 1.2.5 0.18.1 2.8.0 1.16.1 2.3.6 0.4.2 1.0.3 0.1.0 1.4.5 1.5.3 1.4.1 0.6.2 1.2.0 2.6.1 maven-tools-1.2.1/spec/gemfile_with_test_group/Mavenfile0000644000175000017500000000006114506273454023013 0ustar jeromejerome#-*- mode: ruby -*- gemfile # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_test_group/Gemfile.lock0000644000175000017500000000620714506273454023414 0ustar jeromejeromeGEM remote: https://rubygems.org/ specs: activemodel (4.1.1) activesupport (= 4.1.1) builder (~> 3.1) activerecord (4.1.1) activemodel (= 4.1.1) activesupport (= 4.1.1) arel (~> 5.0.0) activerecord-jdbc-adapter (1.3.7) activerecord (>= 2.2) activerecord-jdbcmysql-adapter (1.3.7) activerecord-jdbc-adapter (~> 1.3.7) jdbc-mysql (>= 5.1.22) activesupport (4.1.1) i18n (~> 0.6, >= 0.6.9) json (~> 1.7, >= 1.7.13) minitest (~> 5.1) thread_safe (~> 0.1) tzinfo (~> 1.1) addressable (2.3.6) arel (5.0.1.20140414130214) aws-sdk (1.40.3) json (~> 1.4) nokogiri (>= 1.4.4) axiom-types (0.1.1) descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) builder (3.2.2) codeclimate-test-reporter (0.3.0) simplecov (>= 0.7.1, < 1.0.0) coercible (1.0.0) descendants_tracker (~> 0.0.1) crack (0.4.2) safe_yaml (~> 1.0.0) database_cleaner (1.2.0) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) diff-lcs (1.2.5) docile (1.1.3) equalizer (0.0.9) fake_sqs (0.1.0) builder sinatra grape (0.7.0) activesupport builder hashie (>= 1.2.0) multi_json (>= 1.3.2) multi_xml (>= 0.5.2) rack (>= 1.3.0) rack-accept rack-mount virtus (>= 1.0.0) hashie (2.1.1) i18n (0.6.9) ice_nine (0.11.0) jdbc-mysql (5.1.30) json (1.8.1-java) mini_portile (0.5.3) minitest (5.3.3) multi_json (1.10.0) multi_xml (0.5.5) newrelic_rpm (3.8.1.221) nokogiri (1.6.1-java) mini_portile (~> 0.5.0) rack (1.5.2) rack-accept (0.4.5) rack (>= 0.4) rack-mount (0.8.3) rack (>= 1.0.0) rack-protection (1.5.3) rack rack-test (0.6.2) rack (>= 1.0) rspec (2.14.1) rspec-core (~> 2.14.0) rspec-expectations (~> 2.14.0) rspec-mocks (~> 2.14.0) rspec-core (2.14.8) rspec-expectations (2.14.5) diff-lcs (>= 1.1.3, < 2.0) rspec-mocks (2.14.6) safe_yaml (1.0.3) shoulda-matchers (2.6.1) activesupport (>= 3.0.0) simplecov (0.8.2) docile (~> 1.1.0) multi_json simplecov-html (~> 0.8.0) simplecov-html (0.8.0) sinatra (1.4.5) rack (~> 1.4) rack-protection (~> 1.4) tilt (~> 1.3, >= 1.3.4) thor (0.18.1) thread_safe (0.3.3-java) tilt (1.4.1) tzinfo (1.1.0) thread_safe (~> 0.1) vcr (2.8.0) virtus (1.0.2) axiom-types (~> 0.1) coercible (~> 1.0) descendants_tracker (~> 0.0.3) equalizer (~> 0.0.9) webmock (1.16.1) addressable (>= 2.2.7) crack (>= 0.3.2) PLATFORMS java DEPENDENCIES activerecord (~> 4.1.1) activerecord-jdbcmysql-adapter (~> 1.3.7) aws-sdk (~> 1.40.2) codeclimate-test-reporter database_cleaner (~> 1.2.0) fake_sqs (~> 0.1.0) grape (~> 0.7.0) newrelic_rpm rack (~> 1.5.2) rack-test (~> 0.6.2) rspec (~> 2.14.1) rspec-mocks (~> 2.14.1) shoulda-matchers (~> 2.6.1) simplecov (~> 0.8.2) thor (~> 0.18.1) vcr (~> 2.8.0) webmock (~> 1.16.0) maven-tools-1.2.1/spec/gemfile_with_test_group/Gemfile0000644000175000017500000000175114506273454022464 0ustar jeromejerome#-*- mode: ruby -*- source 'https://rubygems.org' ruby '1.9.3', engine: 'jruby', engine_version: '1.7.12' gem 'rack', '~> 1.5.2' gem 'activerecord', '~> 4.1.1' gem 'activerecord-jdbcmysql-adapter', '~> 1.3.7' gem 'newrelic_rpm' gem 'aws-sdk', '~> 1.40.2' gem 'grape', '~> 0.7.0' group :test do gem 'codeclimate-test-reporter', require: false gem 'rspec-mocks', '~> 2.14.1' gem 'rspec', '~> 2.14.1' gem 'simplecov', '~> 0.8.2', require: false gem 'thor', '~> 0.18.1', require: false gem 'vcr', '~> 2.8.0' gem 'webmock', '~> 1.16.0' gem 'fake_sqs', '~> 0.1.0' gem 'rack-test', '~> 0.6.2' gem 'database_cleaner', '~> 1.2.0' gem 'shoulda-matchers', '~> 2.6.1' end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_source_and_no_jar/0000755000175000017500000000000014506273454022444 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_source_and_no_jar/src/0000755000175000017500000000000014506273454023233 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_source_and_no_jar/src/main/0000755000175000017500000000000014506273454024157 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_source_and_no_jar/src/main/java/0000755000175000017500000000000014506273454025100 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_source_and_no_jar/src/main/java/.keep0000644000175000017500000000000014506273454026013 0ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_source_and_no_jar/pom.xml0000644000175000017500000000551314506273454023765 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 rubygems thor [0.14.6,2.0) gem rubygems rake [10.0,10.99999] gem test mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec maven-tools-1.2.1/spec/gemfile_with_source_and_no_jar/bouncy-castle-java.gemspec0000644000175000017500000000136514506273454027505 0ustar jeromejerome#-*- mode: ruby -*- Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.add_dependency 'thor', '>= 0.14.6', '< 2.0' s.add_development_dependency 'rake', '~> 10.0' s.require_path = 'mylib' end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_source_and_no_jar/Mavenfile0000644000175000017500000000007514506273454024277 0ustar jeromejerome#-*- mode: ruby -*- gemfile :jar => nil # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_source_and_no_jar/Gemfile0000644000175000017500000000006114506273454023734 0ustar jeromejerome#-*- mode: ruby -*- gemspec # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_source_and_custom_jarname/0000755000175000017500000000000014506273454024203 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_source_and_custom_jarname/src/0000755000175000017500000000000014506273454024772 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_source_and_custom_jarname/src/main/0000755000175000017500000000000014506273454025716 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_source_and_custom_jarname/src/main/java/0000755000175000017500000000000014506273454026637 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_source_and_custom_jarname/src/main/java/.keep0000644000175000017500000000000014506273454027552 0ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_source_and_custom_jarname/pom.xml0000644000175000017500000000731614506273454025527 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 rubygems thor [0.14.6,2.0) gem rubygems rake [10.0,10.99999] gem test mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-with-jar-extension ${jruby.plugins.version} ${basedir}/pkg maven-jar-plugin 2.4 prepare-package jar mylib green maven-clean-plugin 2.4 mylib green.jar */**/*.jar org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec maven-tools-1.2.1/spec/gemfile_with_source_and_custom_jarname/bouncy-castle-java.gemspec0000644000175000017500000000136514506273454031244 0ustar jeromejerome#-*- mode: ruby -*- Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.add_dependency 'thor', '>= 0.14.6', '< 2.0' s.add_development_dependency 'rake', '~> 10.0' s.require_path = 'mylib' end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_source_and_custom_jarname/Mavenfile0000644000175000017500000000010114506273454026024 0ustar jeromejerome#-*- mode: ruby -*- gemfile :jar => 'green' # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_source_and_custom_jarname/Gemfile0000644000175000017500000000006114506273454025473 0ustar jeromejerome#-*- mode: ruby -*- gemspec # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_source/0000755000175000017500000000000014506273454020272 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_source/src/0000755000175000017500000000000014506273454021061 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_source/src/main/0000755000175000017500000000000014506273454022005 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_source/src/main/java/0000755000175000017500000000000014506273454022726 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_source/src/main/java/.keep0000644000175000017500000000000014506273454023641 0ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_source/pom.xml0000644000175000017500000000772314506273454021620 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0149 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 rubygems paseserver [1.3,1.99999] gem org.bouncycastle bcpkix-jdk15on 1.49 org.bouncycastle bcprov-jdk15on 1.49 mavengems mavengem:https://rubygems.org https_example.com mavengem:https://example.com org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-with-jar-extension ${jruby.plugins.version} ${basedir}/pkg maven-jar-plugin 2.4 prepare-package jar mylib bouncy-castle-java maven-clean-plugin 2.4 mylib bouncy-castle-java.jar */**/*.jar org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec maven-tools-1.2.1/spec/gemfile_with_source/bouncy-castle-version.rb0000644000175000017500000000024114506273454025047 0ustar jeromejeromeclass BouncyCastle MAVEN_VERSION = '1.49' unless defined? MAVEN_VERSION VERSION_ = MAVEN_VERSION.sub( /[.]/, '' ) unless defined? BouncyCastle::VERSION_ end maven-tools-1.2.1/spec/gemfile_with_source/bouncy-castle-java.gemspec0000644000175000017500000000160614506273454025331 0ustar jeromejerome#-*- mode: ruby -*- require './bouncy-castle-version.rb' Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0#{BouncyCastle::VERSION_}" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.requirements << "jar org.bouncycastle:bcpkix-jdk15on, #{BouncyCastle::MAVEN_VERSION}" s.requirements << "jar org.bouncycastle:bcprov-jdk15on, #{BouncyCastle::MAVEN_VERSION}" s.require_path = 'mylib' end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_source/Mavenfile0000644000175000017500000000006114506273454022120 0ustar jeromejerome#-*- mode: ruby -*- gemfile # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_source/Gemfile0000644000175000017500000000015014506273454021561 0ustar jeromejeromesource 'https://rubygems.org' gemspec source 'https://example.com' do gem 'paseserver', '~>1.3' end maven-tools-1.2.1/spec/gemfile_with_platforms/0000755000175000017500000000000014506273454021001 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_platforms/pom.xml0000644000175000017500000000417114506273454022321 0ustar jeromejerome 4.0.0 no_group_id_given gemfile_with_platforms 0.0.0 gemfile_with_platforms utf-8 3.0.0 2.0.0 rubygems cucumber 2.13.0 gem rubygems virtus 1.0.2 gem mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} install gems initialize maven-tools-1.2.1/spec/gemfile_with_platforms/Mavenfile0000644000175000017500000000006114506273454022627 0ustar jeromejerome#-*- mode: ruby -*- gemfile # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_platforms/Gemfile0000644000175000017500000000047714506273454022304 0ustar jeromejerome#-*- mode: ruby -*- platforms :ruby, :mri_18 do gem 'rspec', '2.13.0' end platforms :jruby do gem 'cucumber', '2.13.0' end gem 'copyright-header', '1.0.3', :platform => [:mri_19, :mri_20] gem 'minitest', '5.3.3', :platform => :ruby gem 'virtus', '1.0.2', :platforms => :jruby # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_path/0000755000175000017500000000000014506273454017726 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_path/pom.xml0000644000175000017500000000465114506273454021251 0ustar jeromejerome 4.0.0 no_group_id_given gemfile_with_path 0.0.0 gemfile_with_path utf-8 3.0.0 2.0.0 rubygems rake [0,) gem rubygems bundler 1.10.6 gem provided mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} install gems initialize bundle install exec bundle install maven-tools-1.2.1/spec/gemfile_with_path/Mavenfile0000644000175000017500000000006114506273454021554 0ustar jeromejerome#-*- mode: ruby -*- gemfile # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_path/Gemfile0000644000175000017500000000012714506273454021221 0ustar jeromejerome#-*- mode: ruby -*- gem 'my', '1.0', :path => '../my' gem 'rake' # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_lock/0000755000175000017500000000000014506273454017722 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_lock/pom.xml0000644000175000017500000001332714506273454021245 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0149 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 org.bouncycastle bcpkix-jdk15on 1.49 org.bouncycastle bcprov-jdk15on 1.49 http_localhost_8081_gems mavengem:http://localhost:8081/gems org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec gemfile Gemfile.lock rubygems virtus [0,) gem rubygems rake [10.2,10.99999] gem rubygems rspec [2.11,2.99999] gem test gemfile_lock Gemfile.lock org.jruby.maven gem-maven-plugin ${jruby.plugins.version} install gem sets for compile initialize sets compile 1.0.2 0.1.1 0.0.4 0.3.3 0.11.0 1.0.1 0.1.0 10.3.0 install gem sets for test initialize sets test 2.14.1 2.14.7 2.14.5 1.2.5 2.14.6 rubygems bundler 1.10.5 gem maven-tools-1.2.1/spec/gemfile_with_lock/bouncy-castle-version.rb0000644000175000017500000000024114506273454024477 0ustar jeromejeromeclass BouncyCastle MAVEN_VERSION = '1.49' unless defined? MAVEN_VERSION VERSION_ = MAVEN_VERSION.sub( /[.]/, '' ) unless defined? BouncyCastle::VERSION_ end maven-tools-1.2.1/spec/gemfile_with_lock/bouncy-castle-java.gemspec0000644000175000017500000000171214506273454024757 0ustar jeromejerome#-*- mode: ruby -*- require './bouncy-castle-version.rb' Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0#{BouncyCastle::VERSION_}" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.requirements << "jar org.bouncycastle:bcpkix-jdk15on, #{BouncyCastle::MAVEN_VERSION}" s.requirements << "jar org.bouncycastle:bcprov-jdk15on, #{BouncyCastle::MAVEN_VERSION}" s.add_runtime_dependency 'rake', '~> 10.2' s.add_development_dependency 'rspec', '~> 2.11' end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_lock/Mavenfile0000644000175000017500000000006114506273454021550 0ustar jeromejerome#-*- mode: ruby -*- gemfile # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_lock/Gemfile.lock0000644000175000017500000000163314506273454022147 0ustar jeromejeromePATH remote: . specs: bouncy-castle-java (1.5.0149) rake (~> 10.2) GEM specs: axiom-types (0.1.1) descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) coercible (1.0.1) descendants_tracker (~> 0.0.1) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) diff-lcs (1.2.5) equalizer (0.1.0) ice_nine (0.11.0) rake (10.3.0) rspec (2.14.1) rspec-core (~> 2.14.0) rspec-expectations (~> 2.14.0) rspec-mocks (~> 2.14.0) rspec-core (2.14.7) rspec-expectations (2.14.5) diff-lcs (>= 1.1.3, < 2.0) rspec-mocks (2.14.6) thread_safe (0.3.3) virtus (1.0.2) axiom-types (~> 0.1) coercible (~> 1.0) descendants_tracker (~> 0.0.3) equalizer (~> 0.1.0) PLATFORMS ruby DEPENDENCIES bouncy-castle-java! rspec (~> 2.11) virtus BUNDLED WITH 1.10.5maven-tools-1.2.1/spec/gemfile_with_lock/Gemfile0000644000175000017500000000014314506273454021213 0ustar jeromejerome#-*- mode: ruby -*- source 'http://localhost:8081/gems' gemspec gem 'virtus' # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_jars_lock/0000755000175000017500000000000014506273454020741 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_jars_lock/pom.xml0000644000175000017500000000462414506273454022264 0ustar jeromejerome 4.0.0 no_group_id_given gemfile_with_jars_lock 0.0.0 gemfile_with_jars_lock utf-8 3.0.0 2.0.0 mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} install gems initialize Jars.lock Jars.lock org.bouncycastle bcpkix-jdk15on 1.50 compile org.bouncycastle bcprov-jdk15on 1.50 compile maven-tools-1.2.1/spec/gemfile_with_jars_lock/Mavenfile0000644000175000017500000000006114506273454022567 0ustar jeromejerome#-*- mode: ruby -*- gemfile # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_jars_lock/Jars.lock0000644000175000017500000000013414506273454022510 0ustar jeromejeromeorg.bouncycastle:bcpkix-jdk15on:1.50:compile: org.bouncycastle:bcprov-jdk15on:1.50:compile: maven-tools-1.2.1/spec/gemfile_with_jars_lock/Gemfile0000644000175000017500000000000014506273454022222 0ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_groups_and_lockfile/0000755000175000017500000000000014506273454023003 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_groups_and_lockfile/pom.xml0000644000175000017500000001057714506273454024332 0ustar jeromejerome 4.0.0 no_group_id_given gemfile_with_groups_and_lockfile 0.0.0 gemfile_with_groups_and_lockfile utf-8 3.0.0 2.0.0 mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} install gems initialize gemfile Gemfile.lock rubygems rspec 2.13.0 gem test rubygems copyright-header 1.0.12 gem provided gemfile_lock Gemfile.lock org.jruby.maven gem-maven-plugin ${jruby.plugins.version} install gem sets for provided initialize sets provided 1.0.12 2.6.7 0.6.9.4 0.3.2 1.25.1 0.4.2 0.3.8 1.1.0 install gem sets for test initialize sets test 2.13.0 2.13.1 2.13.0 1.2.5 2.13.1 maven-tools-1.2.1/spec/gemfile_with_groups_and_lockfile/Mavenfile0000644000175000017500000000006114506273454024631 0ustar jeromejerome#-*- mode: ruby -*- gemfile # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_groups_and_lockfile/Gemfile.lock0000644000175000017500000000142714506273454025231 0ustar jeromejeromeGEM remote: https://rubygems.org/ specs: charlock_holmes (0.6.9.4) copyright-header (1.0.12) github-linguist (~> 2.6.7) diff-lcs (1.2.5) escape_utils (0.3.2) github-linguist (2.6.7) charlock_holmes (~> 0.6.6) escape_utils (~> 0.3.1) mime-types (~> 1.19) pygments.rb (~> 0.4.2) mime-types (1.25.1) posix-spawn (0.3.8) pygments.rb (0.4.2) posix-spawn (~> 0.3.6) yajl-ruby (~> 1.1.0) rspec (2.13.0) rspec-core (~> 2.13.0) rspec-expectations (~> 2.13.0) rspec-mocks (~> 2.13.0) rspec-core (2.13.1) rspec-expectations (2.13.0) diff-lcs (>= 1.1.3, < 2.0) rspec-mocks (2.13.1) yajl-ruby (1.1.0) PLATFORMS ruby DEPENDENCIES copyright-header (= 1.0.12) rspec (= 2.13.0) maven-tools-1.2.1/spec/gemfile_with_groups_and_lockfile/Gemfile0000644000175000017500000000026314506273454024277 0ustar jeromejerome#-*- mode: ruby -*- source 'https://rubygems.org' group :test do gem 'rspec', '2.13.0' end gem 'copyright-header', '1.0.12', :group => :development # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_groups/0000755000175000017500000000000014506273454020311 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_groups/pom.xml0000644000175000017500000000535414506273454021635 0ustar jeromejerome 4.0.0 no_group_id_given gemfile_with_groups 0.0.0 gemfile_with_groups utf-8 3.0.0 2.0.0 rubygems rspec 2.13.0 gem provided rubygems cucumber 2.13.0 gem test rubygems copyright-header 1.0.3 gem provided rubygems minitest 5.3.3 gem test rubygems virtus 1.0.2 gem test mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} install gems initialize maven-tools-1.2.1/spec/gemfile_with_groups/Mavenfile0000644000175000017500000000006114506273454022137 0ustar jeromejerome#-*- mode: ruby -*- gemfile # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_groups/Gemfile0000644000175000017500000000046414506273454021610 0ustar jeromejerome#-*- mode: ruby -*- group :test, :development do gem 'rspec', '2.13.0' end group :test do gem 'cucumber', '2.13.0' end gem 'copyright-header', '1.0.3', :group => [:development, :test] gem 'minitest', '5.3.3', :group => :test gem 'virtus', '1.0.2', :groups => :test # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_extras/0000755000175000017500000000000014506273454020300 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_extras/pom.xml0000644000175000017500000001046114506273454021617 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0149 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 pom.xml true org.bouncycastle bcpkix-jdk15on 1.49 org.bouncycastle bcprov-jdk15on 1.49 mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/lib ../../lib/ruby/shared/ bouncy-castle-java.rb ${basedir}/pkg maven-dependency-plugin generate-test-resources copy-dependencies lib true org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec true true maven-clean-plugin 2.5 clean-lib clean clean ${basedir}/lib false maven-tools-1.2.1/spec/gemfile_with_extras/bouncy-castle-version.rb0000644000175000017500000000024114506273454025055 0ustar jeromejeromeclass BouncyCastle MAVEN_VERSION = '1.49' unless defined? MAVEN_VERSION VERSION_ = MAVEN_VERSION.sub( /[.]/, '' ) unless defined? BouncyCastle::VERSION_ end maven-tools-1.2.1/spec/gemfile_with_extras/bouncy-castle-java.gemspec0000644000175000017500000000155314506273454025340 0ustar jeromejerome#-*- mode: ruby -*- require './bouncy-castle-version.rb' Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0#{BouncyCastle::VERSION_}" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.requirements << "jar org.bouncycastle:bcpkix-jdk15on, #{BouncyCastle::MAVEN_VERSION}" s.requirements << "jar org.bouncycastle:bcprov-jdk15on, #{BouncyCastle::MAVEN_VERSION}" end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_extras/Mavenfile0000644000175000017500000000100714506273454022127 0ustar jeromejerome#-*- mode: ruby -*- gemfile :include_jars => true resource do directory '../../lib/ruby/shared/' target_path '${basedir}/lib' includes 'bouncy-castle-java.rb' end plugin( :clean, '2.5' ) do execute_goals( :clean, :phase => :clean, :id => 'clean-lib', :filesets => [ { :directory => '${basedir}/lib' } ], :failOnError => false ) end properties( 'tesla.dump.pom' => 'pom.xml', 'tesla.dump.readonly' => true ) # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_extras/Gemfile0000644000175000017500000000006114506273454021570 0ustar jeromejerome#-*- mode: ruby -*- gemspec # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_custom_source_and_custom_jarname/0000755000175000017500000000000014506273454025575 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_custom_source_and_custom_jarname/src/0000755000175000017500000000000014506273454026364 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_custom_source_and_custom_jarname/src/java/0000755000175000017500000000000014506273454027305 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_custom_source_and_custom_jarname/src/java/.keep0000644000175000017500000000000014506273454030220 0ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_custom_source_and_custom_jarname/pom.xml0000644000175000017500000000737214506273454027123 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 rubygems thor [0.14.6,2.0) gem rubygems rake [10.0,10.99999] gem test mavengems mavengem:https://rubygems.org src/java org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-with-jar-extension ${jruby.plugins.version} ${basedir}/pkg maven-jar-plugin 2.4 prepare-package jar lib green maven-clean-plugin 2.4 lib green.jar */**/*.jar org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec maven-tools-1.2.1/spec/gemfile_with_custom_source_and_custom_jarname/bouncy-castle-java.gemspec0000644000175000017500000000133314506273454032631 0ustar jeromejerome#-*- mode: ruby -*- Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.add_dependency 'thor', '>= 0.14.6', '< 2.0' s.add_development_dependency 'rake', '~> 10.0' end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_custom_source_and_custom_jarname/Mavenfile0000644000175000017500000000013014506273454027420 0ustar jeromejerome#-*- mode: ruby -*- gemfile :source => 'src/java', :jar => 'green' # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_custom_source_and_custom_jarname/Gemfile0000644000175000017500000000006114506273454027065 0ustar jeromejerome#-*- mode: ruby -*- gemspec # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_custom_source/0000755000175000017500000000000014506273454021664 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_custom_source/src/0000755000175000017500000000000014506273454022453 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_custom_source/src/java/0000755000175000017500000000000014506273454023374 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_custom_source/src/java/.keep0000644000175000017500000000000014506273454024307 0ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_custom_source/pom.xml0000644000175000017500000000743014506273454023205 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 rubygems thor [0.14.6,2.0) gem rubygems rake [10.0,10.99999] gem test mavengems mavengem:https://rubygems.org src/java org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-with-jar-extension ${jruby.plugins.version} ${basedir}/pkg maven-jar-plugin 2.4 prepare-package jar mylib bouncy-castle-java maven-clean-plugin 2.4 mylib bouncy-castle-java.jar */**/*.jar org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec maven-tools-1.2.1/spec/gemfile_with_custom_source/bouncy-castle-java.gemspec0000644000175000017500000000136514506273454026725 0ustar jeromejerome#-*- mode: ruby -*- Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.add_dependency 'thor', '>= 0.14.6', '< 2.0' s.add_development_dependency 'rake', '~> 10.0' s.require_path = 'mylib' end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_custom_source/Mavenfile0000644000175000017500000000010714506273454023513 0ustar jeromejerome#-*- mode: ruby -*- gemfile :source => 'src/java' # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_custom_source/Gemfile0000644000175000017500000000006114506273454023154 0ustar jeromejerome#-*- mode: ruby -*- gemspec # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_access_to_model/0000755000175000017500000000000014506273454022115 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_with_access_to_model/pom.xml0000644000175000017500000000476214506273454023443 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 1.5.0 mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec maven-tools-1.2.1/spec/gemfile_with_access_to_model/bouncy-castle-java.gemspec0000644000175000017500000000117014506273454027150 0ustar jeromejerome#-*- mode: ruby -*- Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_access_to_model/Mavenfile0000644000175000017500000000014514506273454023746 0ustar jeromejerome#-*- mode: ruby -*- gemfile properties( :version_from_model => model.version ) # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_with_access_to_model/Gemfile0000644000175000017500000000006114506273454023405 0ustar jeromejerome#-*- mode: ruby -*- gemspec # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_include_jars/0000755000175000017500000000000014506273454020401 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile_include_jars/pom.xml0000644000175000017500000000656014506273454021725 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0149 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 org.bouncycastle bcpkix-jdk15on 1.49 org.bouncycastle bcprov-jdk15on 1.49 mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg maven-dependency-plugin generate-test-resources copy-dependencies lib true org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec true true maven-tools-1.2.1/spec/gemfile_include_jars/bouncy-castle-version.rb0000644000175000017500000000024114506273454025156 0ustar jeromejeromeclass BouncyCastle MAVEN_VERSION = '1.49' unless defined? MAVEN_VERSION VERSION_ = MAVEN_VERSION.sub( /[.]/, '' ) unless defined? BouncyCastle::VERSION_ end maven-tools-1.2.1/spec/gemfile_include_jars/bouncy-castle-java.gemspec0000644000175000017500000000155314506273454025441 0ustar jeromejerome#-*- mode: ruby -*- require './bouncy-castle-version.rb' Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0#{BouncyCastle::VERSION_}" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.requirements << "jar org.bouncycastle:bcpkix-jdk15on, #{BouncyCastle::MAVEN_VERSION}" s.requirements << "jar org.bouncycastle:bcprov-jdk15on, #{BouncyCastle::MAVEN_VERSION}" end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_include_jars/Mavenfile0000644000175000017500000000010714506273454022230 0ustar jeromejerome#-*- mode: ruby -*- gemfile :include_jars => true # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile_include_jars/Gemfile0000644000175000017500000000006114506273454021671 0ustar jeromejerome#-*- mode: ruby -*- gemspec # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile/0000755000175000017500000000000014506273454015657 5ustar jeromejeromemaven-tools-1.2.1/spec/gemfile/pom.xml0000644000175000017500000000566714506273454017212 0ustar jeromejerome 4.0.0 rubygems bouncy-castle-java 1.5.0149 gem Gem redistribution of Bouncy Castle jars http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html Hiroshi Nakamura nahi@ruby-lang.org https://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java.git http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/ utf-8 3.0.0 2.0.0 rubygems virtus [0,) gem org.bouncycastle bcpkix-jdk15on 1.49 org.bouncycastle bcprov-jdk15on 1.49 mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} bouncy-castle-java.gemspec maven-tools-1.2.1/spec/gemfile/bouncy-castle-version.rb0000644000175000017500000000024114506273454022434 0ustar jeromejeromeclass BouncyCastle MAVEN_VERSION = '1.49' unless defined? MAVEN_VERSION VERSION_ = MAVEN_VERSION.sub( /[.]/, '' ) unless defined? BouncyCastle::VERSION_ end maven-tools-1.2.1/spec/gemfile/bouncy-castle-java.gemspec0000644000175000017500000000155314506273454022717 0ustar jeromejerome#-*- mode: ruby -*- require './bouncy-castle-version.rb' Gem::Specification.new do |s| s.name = 'bouncy-castle-java' s.version = "1.5.0#{BouncyCastle::VERSION_}" s.author = 'Hiroshi Nakamura' s.email = [ 'nahi@ruby-lang.org' ] s.rubyforge_project = "jruby-extras" s.homepage = 'http://github.com/jruby/jruby/tree/master/gems/bouncy-castle-java/' s.summary = 'Gem redistribution of Bouncy Castle jars' s.description = 'Gem redistribution of "Legion of the Bouncy Castle Java cryptography APIs" jars at http://www.bouncycastle.org/java.html' s.platform = 'java' s.files = ['README', 'LICENSE.html', 'lib/bouncy-castle-java.rb' ] + Dir['lib/bc*.jar' ] s.requirements << "jar org.bouncycastle:bcpkix-jdk15on, #{BouncyCastle::MAVEN_VERSION}" s.requirements << "jar org.bouncycastle:bcprov-jdk15on, #{BouncyCastle::MAVEN_VERSION}" end # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile/Mavenfile0000644000175000017500000000006114506273454017505 0ustar jeromejerome#-*- mode: ruby -*- gemfile # vim: syntax=Ruby maven-tools-1.2.1/spec/gemfile/Gemfile0000644000175000017500000000012214506273454017145 0ustar jeromejerome#-*- mode: ruby -*- gemspec gem 'virtus', :require => false # vim: syntax=Ruby maven-tools-1.2.1/spec/dsl/0000755000175000017500000000000014506273454015031 5ustar jeromejeromemaven-tools-1.2.1/spec/dsl/project_gemspec_spec/0000755000175000017500000000000014506273454021214 5ustar jeromejeromemaven-tools-1.2.1/spec/dsl/project_gemspec_spec/unknown_license.xml0000644000175000017500000000362214506273454025142 0ustar jeromejerome 4.0.0 rubygems maven-tools 123 gem helpers for maven related tasks http://github.com/torquebox/maven-tools adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc unknown Christian Meier m.kristian@web.de https://github.com/torquebox/maven-tools.git http://github.com/torquebox/maven-tools utf-8 3.0.0 2.0.0 mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} unknown_license.gemspec maven-tools-1.2.1/spec/dsl/project_gemspec_spec/unknown_license.gemspec0000644000175000017500000000076314506273454025770 0ustar jeromejerome# -*- mode:ruby -*- # -*- coding: utf-8 -*- Gem::Specification.new do |s| s.name = 'maven-tools' s.version = '123' s.summary = 'helpers for maven related tasks' s.description = 'adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc' s.homepage = 'http://github.com/torquebox/maven-tools' s.authors = ['Christian Meier'] s.email = ['m.kristian@web.de'] s.license = 'unknown' end # vim: syntax=Ruby maven-tools-1.2.1/spec/dsl/project_gemspec_spec/snapshot.xml0000644000175000017500000000374614506273454023607 0ustar jeromejerome 4.0.0 rubygems maven-tools VERSION gem helpers for maven related tasks http://github.com/torquebox/maven-tools adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc MIT http://opensource.org/licenses/MIT MIT license Christian Meier m.kristian@web.de https://github.com/torquebox/maven-tools.git http://github.com/torquebox/maven-tools utf-8 3.0.0 2.0.0 mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} snapshot.gemspec maven-tools-1.2.1/spec/dsl/project_gemspec_spec/snapshot.gemspec0000644000175000017500000000075714506273454024431 0ustar jeromejerome# -*- mode:ruby -*- # -*- coding: utf-8 -*- Gem::Specification.new do |s| s.name = 'maven-tools' s.version = '1.a' s.summary = 'helpers for maven related tasks' s.description = 'adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc' s.homepage = 'http://github.com/torquebox/maven-tools' s.authors = ['Christian Meier'] s.email = ['m.kristian@web.de'] s.license = 'MIT' end # vim: syntax=Ruby maven-tools-1.2.1/spec/dsl/project_gemspec_spec/profile.xml0000644000175000017500000000534314506273454023403 0ustar jeromejerome 4.0.0 rubygems maven-tools VERSION gem helpers for maven related tasks http://github.com/torquebox/maven-tools adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc MIT http://opensource.org/licenses/MIT MIT license Christian Meier m.kristian@web.de https://github.com/torquebox/maven-tools.git http://github.com/torquebox/maven-tools utf-8 3.0.0 2.0.0 mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} maven-tools.gemspec hidden rubygems virtus [1.0,1.99999] gem rubygems rake [10.0,10.99999] gem test rubygems minitest [5.3,5.99999] gem test maven-tools-1.2.1/spec/dsl/project_gemspec_spec/no_gems.xml0000644000175000017500000000375114506273454023373 0ustar jeromejerome 4.0.0 rubygems maven-tools VERSION gem helpers for maven related tasks http://github.com/torquebox/maven-tools adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc MIT http://opensource.org/licenses/MIT MIT license Christian Meier m.kristian@web.de https://github.com/torquebox/maven-tools.git http://github.com/torquebox/maven-tools utf-8 3.0.0 2.0.0 mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} maven-tools.gemspec maven-tools-1.2.1/spec/dsl/project_gemspec_spec/maven-tools.xml0000644000175000017500000000507514506273454024211 0ustar jeromejerome 4.0.0 rubygems maven-tools VERSION gem helpers for maven related tasks http://github.com/torquebox/maven-tools adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc MIT http://opensource.org/licenses/MIT MIT license Christian Meier m.kristian@web.de https://github.com/torquebox/maven-tools.git http://github.com/torquebox/maven-tools utf-8 3.0.0 2.0.0 rubygems virtus [1.0,1.99999] gem rubygems rake [10.0,10.99999] gem test rubygems minitest [5.3,5.99999] gem test mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} maven-tools.gemspec maven-tools-1.2.1/spec/dsl/project_gemspec_spec/maven-tools.gemspec0000644000175000017500000004052514506273454025033 0ustar jeromejerome--- !ruby/object:Gem::Specification name: maven-tools version: !ruby/object:Gem::Version version: 1.0.5 platform: ruby authors: - Christian Meier autorequire: bindir: bin cert_chain: [] date: 2014-09-24 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: virtus requirement: !ruby/object:Gem::Requirement requirements: - - ~> - !ruby/object:Gem::Version version: '1.0' type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ~> - !ruby/object:Gem::Version version: '1.0' - !ruby/object:Gem::Dependency name: rake requirement: !ruby/object:Gem::Requirement requirements: - - ~> - !ruby/object:Gem::Version version: '10.0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ~> - !ruby/object:Gem::Version version: '10.0' - !ruby/object:Gem::Dependency name: minitest requirement: !ruby/object:Gem::Requirement requirements: - - ~> - !ruby/object:Gem::Version version: '5.3' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ~> - !ruby/object:Gem::Version version: '5.3' description: adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc email: - m.kristian@web.de executables: [] extensions: [] extra_rdoc_files: [] files: - maven-tools.gemspec - Rakefile - Mavenfile - Gemfile - lib/maven_tools.rb - lib/maven-tools.rb - lib/maven/tools/visitor.rb - lib/maven/tools/version.rb - lib/maven/tools/artifact.rb - lib/maven/tools/model.rb - lib/maven/tools/versions.rb - lib/maven/tools/gemspec_dependencies.rb - lib/maven/tools/gemfile_lock.rb - lib/maven/tools/dsl.rb - lib/maven/tools/jarfile.rb - lib/maven/tools/pom.rb - lib/maven/tools/coordinate.rb - lib/maven/tools/dsl/models.rb - lib/maven/tools/dsl/dependency_dsl.rb - lib/maven/tools/dsl/jarfile.rb - lib/maven/tools/dsl/jruby_dsl.rb - lib/maven/tools/dsl/exclusions_dsl.rb - lib/maven/tools/dsl/options.rb - spec/artifact_spec.rb - spec/jarfile_spec.rb - spec/coordinate_spec.rb - spec/pom_spec.rb - spec/spec_helper.rb - spec/gemspec_dependencies_spec.rb - spec/gemfile_with_source/bouncy-castle-version.rb - spec/pom_from_jarfile_with_jruby/pom.rb - spec/pom_maven_style/pom.rb - spec/gemspec_in_profile/bouncy-castle-version.rb - spec/gemfile_with_lock/bouncy-castle-version.rb - spec/pom_from_jarfile_help_only/pom.rb - spec/pom_from_jarfile/pom.rb - spec/gemfile_include_jars/bouncy-castle-version.rb - spec/gemfile/bouncy-castle-version.rb - spec/pom_with_execute/pom.rb - spec/gemspec/bouncy-castle-version.rb - spec/gemspec_with_source/bouncy-castle-version.rb - spec/pom_maven_hash_style/pom.rb - spec/gemspec_include_jars/bouncy-castle-version.rb - spec/gemspec_with_extras/bouncy-castle-version.rb - spec/gemfile_with_extras/bouncy-castle-version.rb - spec/pom_from_jarfile_with_exclusions/pom.rb - spec/pom_maven_alternative_style/pom.rb - MIT-LICENSE - README.md - spec/pom.xml - spec/gemfile_with_source/pom.xml - spec/pom_from_jarfile_with_jruby/pom.xml - spec/gemspec_in_profile/pom.xml - spec/pom_from_jarfile_with_repos/pom.xml - spec/gemfile_with_lock/pom.xml - spec/gemfile_with_test_group/pom.xml - spec/gemspec_with_prereleased_dependency_and_no_repo/pom.xml - spec/gemspec_with_custom_source_and_custom_jarname/pom.xml - spec/gemspec_prerelease_snapshot/pom.xml - spec/gemfile_with_path/pom.xml - spec/pom_from_jarfile_help_only/pom.xml - spec/gemfile_with_source_and_custom_jarname/pom.xml - spec/pom_from_jarfile/pom.xml - spec/gemspec_no_rubygems_repo/pom.xml - spec/gemfile_include_jars/pom.xml - spec/gemfile_with_source_and_no_jar/pom.xml - spec/gemspec_with_access_to_model/pom.xml - spec/gemfile/pom.xml - spec/gemspec_with_source_and_custom_jarname/pom.xml - spec/pom_with_execute/pom.xml - spec/gemspec/pom.xml - spec/gemspec_with_custom_source/pom.xml - spec/gemfile_with_platforms/pom.xml - spec/gemfile_with_access_to_model/pom.xml - spec/gemspec_with_source/pom.xml - spec/gemfile_with_groups_and_lockfile/pom.xml - spec/gemspec_prerelease/pom.xml - spec/gemfile_with_groups/pom.xml - spec/gemfile_with_custom_source/pom.xml - spec/gemspec_with_prereleased_dependency/pom.xml - spec/gemfile_without_gemspec/pom.xml - spec/gemfile_with_custom_source_and_custom_jarname/pom.xml - spec/gemspec_include_jars/pom.xml - spec/gemspec_with_extras/pom.xml - spec/gemspec_with_source_and_no_jar/pom.xml - spec/gemfile_with_extras/pom.xml - spec/pom_from_jarfile_with_exclusions/pom.xml - spec/gemfile_with_source/Mavenfile - spec/pom_from_jarfile_with_jruby/Jarfile - spec/gemspec_in_profile/Mavenfile - spec/pom_from_jarfile_with_repos/Jarfile - spec/pom_from_jarfile_with_repos/Mavenfile - spec/gemfile_with_lock/Mavenfile - spec/gemfile_with_lock/Gemfile - spec/gemfile_with_test_group/Mavenfile - spec/gemfile_with_test_group/Gemfile - spec/gemspec_with_prereleased_dependency_and_no_repo/Mavenfile - spec/gemspec_with_custom_source_and_custom_jarname/Mavenfile - spec/gemspec_prerelease_snapshot/Mavenfile - spec/gemfile_with_path/Mavenfile - spec/gemfile_with_path/Gemfile - spec/pom_from_jarfile_help_only/Jarfile - spec/gemfile_with_source_and_custom_jarname/Mavenfile - spec/gemfile_with_source_and_custom_jarname/Gemfile - spec/pom_from_jarfile/Jarfile - spec/gemspec_no_rubygems_repo/Mavenfile - spec/gemfile_include_jars/Mavenfile - spec/gemfile_include_jars/Gemfile - spec/gemfile_with_source_and_no_jar/Mavenfile - spec/gemfile_with_source_and_no_jar/Gemfile - spec/gemspec_with_access_to_model/Mavenfile - spec/gemfile/Mavenfile - spec/gemfile/Gemfile - spec/gemspec_with_source_and_custom_jarname/Mavenfile - spec/mavenfile/Mavenfile - spec/gemspec/Mavenfile - spec/gemspec_with_custom_source/Mavenfile - spec/gemfile_with_platforms/Mavenfile - spec/gemfile_with_platforms/Gemfile - spec/gemfile_with_access_to_model/Mavenfile - spec/gemfile_with_access_to_model/Gemfile - spec/gemspec_with_source/Mavenfile - spec/gemfile_with_groups_and_lockfile/Mavenfile - spec/gemfile_with_groups_and_lockfile/Gemfile - spec/gemspec_prerelease/Mavenfile - spec/gemfile_with_groups/Mavenfile - spec/gemfile_with_groups/Gemfile - spec/gemfile_with_custom_source/Mavenfile - spec/gemfile_with_custom_source/Gemfile - spec/gemspec_with_prereleased_dependency/Mavenfile - spec/gemfile_without_gemspec/Mavenfile - spec/gemfile_without_gemspec/Gemfile - spec/gemfile_with_custom_source_and_custom_jarname/Mavenfile - spec/gemfile_with_custom_source_and_custom_jarname/Gemfile - spec/gemspec_include_jars/Mavenfile - spec/gemspec_with_extras/Mavenfile - spec/gemspec_with_source_and_no_jar/Mavenfile - spec/gemfile_with_extras/Mavenfile - spec/gemfile_with_extras/Gemfile - spec/pom_from_jarfile_with_exclusions/Jarfile - spec/gemfile_with_lock/Gemfile.lock - spec/gemfile_with_test_group/Gemfile.lock - spec/gemfile_with_groups_and_lockfile/Gemfile.lock - spec/gemfile_with_source/src/main/java/.keep - spec/gemspec_with_custom_source_and_custom_jarname/src/java/.keep - spec/gemfile_with_source_and_custom_jarname/src/main/java/.keep - spec/gemfile_with_source_and_no_jar/src/main/java/.keep - spec/gemspec_with_source_and_custom_jarname/src/main/java/.keep - spec/gemspec_with_custom_source/src/java/.keep - spec/gemspec_with_source/src/main/java/.keep - spec/gemfile_with_custom_source/src/java/.keep - spec/gemfile_with_custom_source_and_custom_jarname/src/java/.keep - spec/gemspec_with_source_and_no_jar/src/main/java/.keep - spec/gemfile_with_source/bouncy-castle-java.gemspec - spec/gemspec_in_profile/bouncy-castle-java.gemspec - spec/gemfile_with_lock/bouncy-castle-java.gemspec - spec/gemspec_with_prereleased_dependency_and_no_repo/bouncy-castle-java.gemspec - spec/my/my.gemspec - spec/gemspec_with_custom_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec_prerelease_snapshot/bouncy-castle-java.gemspec - spec/gemfile_with_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec_no_rubygems_repo/bouncy-castle-java.gemspec - spec/gemfile_include_jars/bouncy-castle-java.gemspec - spec/gemfile_with_source_and_no_jar/bouncy-castle-java.gemspec - spec/gemspec_with_access_to_model/bouncy-castle-java.gemspec - spec/gemfile/bouncy-castle-java.gemspec - spec/gemspec_with_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec/bouncy-castle-java.gemspec - spec/gemspec_with_custom_source/bouncy-castle-java.gemspec - spec/gemfile_with_access_to_model/bouncy-castle-java.gemspec - spec/gemspec_with_source/bouncy-castle-java.gemspec - spec/gemspec_prerelease/bouncy-castle-java.gemspec - spec/gemfile_with_custom_source/bouncy-castle-java.gemspec - spec/gemspec_with_prereleased_dependency/bouncy-castle-java.gemspec - spec/gemfile_with_custom_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec_include_jars/bouncy-castle-java.gemspec - spec/gemspec_with_extras/bouncy-castle-java.gemspec - spec/gemspec_with_source_and_no_jar/bouncy-castle-java.gemspec - spec/gemfile_with_extras/bouncy-castle-java.gemspec homepage: http://github.com/torquebox/maven-tools licenses: - MIT metadata: {} post_install_message: rdoc_options: [] require_paths: - lib required_ruby_version: !ruby/object:Gem::Requirement requirements: - - '>=' - !ruby/object:Gem::Version version: '0' required_rubygems_version: !ruby/object:Gem::Requirement requirements: - - '>=' - !ruby/object:Gem::Version version: '0' requirements: [] rubyforge_project: rubygems_version: 2.4.2 signing_key: specification_version: 4 summary: helpers for maven related tasks test_files: - spec/artifact_spec.rb - spec/jarfile_spec.rb - spec/coordinate_spec.rb - spec/pom_spec.rb - spec/spec_helper.rb - spec/gemspec_dependencies_spec.rb - spec/gemfile_with_source/bouncy-castle-version.rb - spec/pom_from_jarfile_with_jruby/pom.rb - spec/pom_maven_style/pom.rb - spec/gemspec_in_profile/bouncy-castle-version.rb - spec/gemfile_with_lock/bouncy-castle-version.rb - spec/pom_from_jarfile_help_only/pom.rb - spec/pom_from_jarfile/pom.rb - spec/gemfile_include_jars/bouncy-castle-version.rb - spec/gemfile/bouncy-castle-version.rb - spec/pom_with_execute/pom.rb - spec/gemspec/bouncy-castle-version.rb - spec/gemspec_with_source/bouncy-castle-version.rb - spec/pom_maven_hash_style/pom.rb - spec/gemspec_include_jars/bouncy-castle-version.rb - spec/gemspec_with_extras/bouncy-castle-version.rb - spec/gemfile_with_extras/bouncy-castle-version.rb - spec/pom_from_jarfile_with_exclusions/pom.rb - spec/pom_maven_alternative_style/pom.rb - spec/pom.xml - spec/gemfile_with_source/pom.xml - spec/pom_from_jarfile_with_jruby/pom.xml - spec/gemspec_in_profile/pom.xml - spec/pom_from_jarfile_with_repos/pom.xml - spec/gemfile_with_lock/pom.xml - spec/gemfile_with_test_group/pom.xml - spec/gemspec_with_prereleased_dependency_and_no_repo/pom.xml - spec/gemspec_with_custom_source_and_custom_jarname/pom.xml - spec/gemspec_prerelease_snapshot/pom.xml - spec/gemfile_with_path/pom.xml - spec/pom_from_jarfile_help_only/pom.xml - spec/gemfile_with_source_and_custom_jarname/pom.xml - spec/pom_from_jarfile/pom.xml - spec/gemspec_no_rubygems_repo/pom.xml - spec/gemfile_include_jars/pom.xml - spec/gemfile_with_source_and_no_jar/pom.xml - spec/gemspec_with_access_to_model/pom.xml - spec/gemfile/pom.xml - spec/gemspec_with_source_and_custom_jarname/pom.xml - spec/pom_with_execute/pom.xml - spec/gemspec/pom.xml - spec/gemspec_with_custom_source/pom.xml - spec/gemfile_with_platforms/pom.xml - spec/gemfile_with_access_to_model/pom.xml - spec/gemspec_with_source/pom.xml - spec/gemfile_with_groups_and_lockfile/pom.xml - spec/gemspec_prerelease/pom.xml - spec/gemfile_with_groups/pom.xml - spec/gemfile_with_custom_source/pom.xml - spec/gemspec_with_prereleased_dependency/pom.xml - spec/gemfile_without_gemspec/pom.xml - spec/gemfile_with_custom_source_and_custom_jarname/pom.xml - spec/gemspec_include_jars/pom.xml - spec/gemspec_with_extras/pom.xml - spec/gemspec_with_source_and_no_jar/pom.xml - spec/gemfile_with_extras/pom.xml - spec/pom_from_jarfile_with_exclusions/pom.xml - spec/gemfile_with_source/Mavenfile - spec/pom_from_jarfile_with_jruby/Jarfile - spec/gemspec_in_profile/Mavenfile - spec/pom_from_jarfile_with_repos/Jarfile - spec/pom_from_jarfile_with_repos/Mavenfile - spec/gemfile_with_lock/Mavenfile - spec/gemfile_with_lock/Gemfile - spec/gemfile_with_test_group/Mavenfile - spec/gemfile_with_test_group/Gemfile - spec/gemspec_with_prereleased_dependency_and_no_repo/Mavenfile - spec/gemspec_with_custom_source_and_custom_jarname/Mavenfile - spec/gemspec_prerelease_snapshot/Mavenfile - spec/gemfile_with_path/Mavenfile - spec/gemfile_with_path/Gemfile - spec/pom_from_jarfile_help_only/Jarfile - spec/gemfile_with_source_and_custom_jarname/Mavenfile - spec/gemfile_with_source_and_custom_jarname/Gemfile - spec/pom_from_jarfile/Jarfile - spec/gemspec_no_rubygems_repo/Mavenfile - spec/gemfile_include_jars/Mavenfile - spec/gemfile_include_jars/Gemfile - spec/gemfile_with_source_and_no_jar/Mavenfile - spec/gemfile_with_source_and_no_jar/Gemfile - spec/gemspec_with_access_to_model/Mavenfile - spec/gemfile/Mavenfile - spec/gemfile/Gemfile - spec/gemspec_with_source_and_custom_jarname/Mavenfile - spec/mavenfile/Mavenfile - spec/gemspec/Mavenfile - spec/gemspec_with_custom_source/Mavenfile - spec/gemfile_with_platforms/Mavenfile - spec/gemfile_with_platforms/Gemfile - spec/gemfile_with_access_to_model/Mavenfile - spec/gemfile_with_access_to_model/Gemfile - spec/gemspec_with_source/Mavenfile - spec/gemfile_with_groups_and_lockfile/Mavenfile - spec/gemfile_with_groups_and_lockfile/Gemfile - spec/gemspec_prerelease/Mavenfile - spec/gemfile_with_groups/Mavenfile - spec/gemfile_with_groups/Gemfile - spec/gemfile_with_custom_source/Mavenfile - spec/gemfile_with_custom_source/Gemfile - spec/gemspec_with_prereleased_dependency/Mavenfile - spec/gemfile_without_gemspec/Mavenfile - spec/gemfile_without_gemspec/Gemfile - spec/gemfile_with_custom_source_and_custom_jarname/Mavenfile - spec/gemfile_with_custom_source_and_custom_jarname/Gemfile - spec/gemspec_include_jars/Mavenfile - spec/gemspec_with_extras/Mavenfile - spec/gemspec_with_source_and_no_jar/Mavenfile - spec/gemfile_with_extras/Mavenfile - spec/gemfile_with_extras/Gemfile - spec/pom_from_jarfile_with_exclusions/Jarfile - spec/gemfile_with_lock/Gemfile.lock - spec/gemfile_with_test_group/Gemfile.lock - spec/gemfile_with_groups_and_lockfile/Gemfile.lock - spec/gemfile_with_source/src/main/java/.keep - spec/gemspec_with_custom_source_and_custom_jarname/src/java/.keep - spec/gemfile_with_source_and_custom_jarname/src/main/java/.keep - spec/gemfile_with_source_and_no_jar/src/main/java/.keep - spec/gemspec_with_source_and_custom_jarname/src/main/java/.keep - spec/gemspec_with_custom_source/src/java/.keep - spec/gemspec_with_source/src/main/java/.keep - spec/gemfile_with_custom_source/src/java/.keep - spec/gemfile_with_custom_source_and_custom_jarname/src/java/.keep - spec/gemspec_with_source_and_no_jar/src/main/java/.keep - spec/gemfile_with_source/bouncy-castle-java.gemspec - spec/gemspec_in_profile/bouncy-castle-java.gemspec - spec/gemfile_with_lock/bouncy-castle-java.gemspec - spec/gemspec_with_prereleased_dependency_and_no_repo/bouncy-castle-java.gemspec - spec/my/my.gemspec - spec/gemspec_with_custom_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec_prerelease_snapshot/bouncy-castle-java.gemspec - spec/gemfile_with_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec_no_rubygems_repo/bouncy-castle-java.gemspec - spec/gemfile_include_jars/bouncy-castle-java.gemspec - spec/gemfile_with_source_and_no_jar/bouncy-castle-java.gemspec - spec/gemspec_with_access_to_model/bouncy-castle-java.gemspec - spec/gemfile/bouncy-castle-java.gemspec - spec/gemspec_with_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec/bouncy-castle-java.gemspec - spec/gemspec_with_custom_source/bouncy-castle-java.gemspec - spec/gemfile_with_access_to_model/bouncy-castle-java.gemspec - spec/gemspec_with_source/bouncy-castle-java.gemspec - spec/gemspec_prerelease/bouncy-castle-java.gemspec - spec/gemfile_with_custom_source/bouncy-castle-java.gemspec - spec/gemspec_with_prereleased_dependency/bouncy-castle-java.gemspec - spec/gemfile_with_custom_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec_include_jars/bouncy-castle-java.gemspec - spec/gemspec_with_extras/bouncy-castle-java.gemspec - spec/gemspec_with_source_and_no_jar/bouncy-castle-java.gemspec - spec/gemfile_with_extras/bouncy-castle-java.gemspec has_rdoc: maven-tools-1.2.1/spec/dsl/project_gemspec_spec/jars_and_poms_include_jars.xml0000644000175000017500000000635514506273454027310 0ustar jeromejerome 4.0.0 rubygems maven-tools 123 gem helpers for maven related tasks http://github.com/torquebox/maven-tools adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc MIT http://opensource.org/licenses/MIT MIT license Christian Meier m.kristian@web.de https://github.com/torquebox/maven-tools.git http://github.com/torquebox/maven-tools utf-8 3.0.0 2.0.0 org.slf4j slf4j-simple 1.6.4 org.jruby jruby 1.7.16 pom org.jruby jruby 1.7.16 noasm org.jruby jruby-stdlib mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg maven-dependency-plugin generate-test-resources copy-dependencies lib true org.jruby.maven gem-maven-plugin ${jruby.plugins.version} jars_and_poms.gemspec true true maven-tools-1.2.1/spec/dsl/project_gemspec_spec/jars_and_poms.xml0000644000175000017500000000522414506273454024560 0ustar jeromejerome 4.0.0 rubygems maven-tools 123 gem helpers for maven related tasks http://github.com/torquebox/maven-tools adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc MIT http://opensource.org/licenses/MIT MIT license Christian Meier m.kristian@web.de https://github.com/torquebox/maven-tools.git http://github.com/torquebox/maven-tools utf-8 3.0.0 2.0.0 org.slf4j slf4j-simple 1.6.4 org.jruby jruby 1.7.16 pom org.jruby jruby 1.7.16 noasm org.jruby jruby-stdlib mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} jars_and_poms.gemspec maven-tools-1.2.1/spec/dsl/project_gemspec_spec/jars_and_poms.gemspec0000644000175000017500000000130314506273454025375 0ustar jeromejerome# -*- mode:ruby -*- # -*- coding: utf-8 -*- Gem::Specification.new do |s| s.name = 'maven-tools' s.version = '123' s.summary = 'helpers for maven related tasks' s.description = 'adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc' s.homepage = 'http://github.com/torquebox/maven-tools' s.authors = ['Christian Meier'] s.email = ['m.kristian@web.de'] s.license = 'MIT' s.platform = 'java' s.requirements << 'jar org.slf4j:slf4j-simple, 1.6.4' s.requirements << 'pom org.jruby:jruby, 1.7.16' s.requirements << 'jar org.jruby:jruby, 1.7.16, noasm, [org.jruby:jruby-stdlib]' end # vim: syntax=Ruby maven-tools-1.2.1/spec/dsl/project_gemspec_spec/extended.xml0000644000175000017500000000537614506273454023551 0ustar jeromejerome 4.0.0 rubygems maven-tools 123 gem helpers for maven related tasks http://github.com/torquebox/maven-tools adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc MIT http://opensource.org/licenses/MIT MIT license Christian Meier m.kristian@web.de https://github.com/torquebox/maven-tools.git http://github.com/torquebox/maven-tools utf-8 3.0.0 2.0.0 org.slf4j slf4j-simple 1.6.4 org.jruby jruby 1.7.16 pom org.jruby jruby 1.7.16 noasm org.jruby jruby-stdlib mavengems mavengem:https://rubygems.org http://localhost/repo http://localhost/repo org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-extension ${jruby.plugins.version} ${basedir}/pkg org.jruby.maven gem-maven-plugin ${jruby.plugins.version} extended.gemspec maven-tools-1.2.1/spec/dsl/project_gemspec_spec/extended.gemspec0000644000175000017500000000136614506273454024367 0ustar jeromejerome# -*- mode:ruby -*- # -*- coding: utf-8 -*- Gem::Specification.new do |s| s.name = 'maven-tools' s.version = '123' s.summary = 'helpers for maven related tasks' s.description = 'adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc' s.homepage = 'http://github.com/torquebox/maven-tools' s.authors = ['Christian Meier'] s.email = ['m.kristian@web.de'] s.license = ['MIT'] s.platform = 'java' s.requirements << 'jar org.slf4j:slf4j-simple, 1.6.4' s.requirements << 'pom org.jruby:jruby, 1.7.16' s.requirements << 'jar org.jruby:jruby, 1.7.16, noasm, [org.jruby:jruby-stdlib]' s.requirements << 'repo http://localhost/repo' end # vim: syntax=Ruby maven-tools-1.2.1/spec/dsl/project_gemspec_spec.rb0000644000175000017500000000665714506273454021557 0ustar jeromejeromerequire_relative '../spec_helper' require 'yaml' require 'maven/tools/dsl/project_gemspec' require 'maven/tools/project' require 'maven/tools/model' require 'maven/tools/dsl' require 'maven/tools/version' require 'maven/tools/visitor' class Maven::Tools::Project include Maven::Tools::DSL end class XmlFile def self.read( name, artifact_id, version = '1.0.5' ) xml = File.read( __FILE__.sub( /.rb$/, "/#{name}" ) ) xml.gsub!( /BASEDIR/, artifact_id ) xml.gsub!( /VERSION/, version ) xml end end describe Maven::Tools::DSL::ProjectGemspec do let( :parent ) { Maven::Tools::Project.new( __FILE__.sub( /.rb$/, '/maven-tools.gemspec' ) ) } subject { Maven::Tools::DSL::ProjectGemspec } it 'evals maven_tools.gemspec' do parent = Maven::Tools::Project.new subject.new parent xml = "" Maven::Tools::Visitor.new( xml ).accept_project( parent.model ) v = Maven::Tools::VERSION v += '-SNAPSHOT' if v =~ /.[[:alpha:]][[:alnum:]]*$/ xml.must_equal( XmlFile.read( 'maven-tools.xml', 'maven-tools', v ) ) end it 'evals maven_tools.gemspec from yaml' do subject.new parent, 'maven-tools.gemspec' xml = "" Maven::Tools::Visitor.new( xml ).accept_project( parent.model ) xml.must_equal( XmlFile.read( 'maven-tools.xml', 'gemspec_spec' ) ) end it 'evals maven_tools.gemspec from yaml with profile' do subject.new parent, 'maven-tools.gemspec', :profile => :hidden xml = "" Maven::Tools::Visitor.new( xml ).accept_project( parent.model ) xml.must_equal( XmlFile.read( 'profile.xml', 'gemspec_spec' ) ) end it 'evals maven_tools.gemspec from yaml no gem dependencies' do subject.new parent, 'maven-tools.gemspec', :no_gems => true xml = "" Maven::Tools::Visitor.new( xml ).accept_project( parent.model ) xml.must_equal( XmlFile.read( 'no_gems.xml', 'gemspec_spec' ) ) end it 'evals snapshot.gemspec' do subject.new parent, 'snapshot.gemspec' xml = "" Maven::Tools::Visitor.new( xml ).accept_project( parent.model ) xml.must_equal( XmlFile.read( 'snapshot.xml', 'snapshot', '1.a-SNAPSHOT' ) ) end it 'evals gemspec with jar and pom dependencies' do subject.new parent, 'jars_and_poms.gemspec' xml = "" Maven::Tools::Visitor.new( xml ).accept_project( parent.model ) xml.must_equal( XmlFile.read( 'jars_and_poms.xml', 'gemspec_spec' ) ) end it 'evals gemspec with jar and pom dependencies' do subject.new parent, :name => 'jars_and_poms.gemspec', :include_jars => true xml = "" Maven::Tools::Visitor.new( xml ).accept_project( parent.model ) xml.must_equal( XmlFile.read( 'jars_and_poms_include_jars.xml', 'gemspec_spec' ) ) end it 'evals gemspec with extend functionality' do class Maven::Tools::DSL::ProjectGemspec def repo( url ) @parent.repository( :id => url, :url => url ) end end subject.new parent, :name => 'extended.gemspec' xml = "" Maven::Tools::Visitor.new( xml ).accept_project( parent.model ) xml.must_equal( XmlFile.read( 'extended.xml', 'gemspec_spec' ) ) end it 'evals gemspec with unknown license' do subject.new parent, :name => 'unknown_license.gemspec' xml = "" Maven::Tools::Visitor.new( xml ).accept_project( parent.model ) xml.must_equal( XmlFile.read( 'unknown_license.xml', 'gemspec_spec') ) end end maven-tools-1.2.1/spec/dsl/profile_gemspec_spec/0000755000175000017500000000000014506273454021206 5ustar jeromejeromemaven-tools-1.2.1/spec/dsl/profile_gemspec_spec/unknown_license.xml0000644000175000017500000000213014506273454025125 0ustar jeromejerome 4.0.0 no_group_id_given profile_gemspec_spec 0.0.0 profile_gemspec_spec utf-8 3.0.0 2.0.0 mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-maven-plugin ${jruby.plugins.version} unknown_license.gemspec maven-tools-1.2.1/spec/dsl/profile_gemspec_spec/unknown_license.gemspec0000644000175000017500000000076314506273454025762 0ustar jeromejerome# -*- mode:ruby -*- # -*- coding: utf-8 -*- Gem::Specification.new do |s| s.name = 'maven-tools' s.version = '123' s.summary = 'helpers for maven related tasks' s.description = 'adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc' s.homepage = 'http://github.com/torquebox/maven-tools' s.authors = ['Christian Meier'] s.email = ['m.kristian@web.de'] s.license = 'unknown' end # vim: syntax=Ruby maven-tools-1.2.1/spec/dsl/profile_gemspec_spec/snapshot.xml0000644000175000017500000000212114506273454023563 0ustar jeromejerome 4.0.0 no_group_id_given profile_gemspec_spec 0.0.0 profile_gemspec_spec utf-8 3.0.0 2.0.0 mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-maven-plugin ${jruby.plugins.version} snapshot.gemspec maven-tools-1.2.1/spec/dsl/profile_gemspec_spec/snapshot.gemspec0000644000175000017500000000075714506273454024423 0ustar jeromejerome# -*- mode:ruby -*- # -*- coding: utf-8 -*- Gem::Specification.new do |s| s.name = 'maven-tools' s.version = '1.a' s.summary = 'helpers for maven related tasks' s.description = 'adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc' s.homepage = 'http://github.com/torquebox/maven-tools' s.authors = ['Christian Meier'] s.email = ['m.kristian@web.de'] s.license = 'MIT' end # vim: syntax=Ruby maven-tools-1.2.1/spec/dsl/profile_gemspec_spec/no_gems.xml0000644000175000017500000000212414506273454023356 0ustar jeromejerome 4.0.0 no_group_id_given profile_gemspec_spec 0.0.0 profile_gemspec_spec utf-8 3.0.0 2.0.0 mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-maven-plugin ${jruby.plugins.version} maven-tools.gemspec maven-tools-1.2.1/spec/dsl/profile_gemspec_spec/maven-tools.xml0000644000175000017500000000321614506273454024176 0ustar jeromejerome 4.0.0 no_group_id_given BASEDIR 0.0.0 BASEDIR utf-8 3.0.0 2.0.0 rubygems virtus [1.0,1.99999] gem rubygems rake [10.0,10.99999] gem test rubygems minitest [5.3,5.99999] gem test mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-maven-plugin ${jruby.plugins.version} maven-tools.gemspec maven-tools-1.2.1/spec/dsl/profile_gemspec_spec/maven-tools.gemspec0000644000175000017500000004052514506273454025025 0ustar jeromejerome--- !ruby/object:Gem::Specification name: maven-tools version: !ruby/object:Gem::Version version: 1.0.5 platform: ruby authors: - Christian Meier autorequire: bindir: bin cert_chain: [] date: 2014-09-24 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: virtus requirement: !ruby/object:Gem::Requirement requirements: - - ~> - !ruby/object:Gem::Version version: '1.0' type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ~> - !ruby/object:Gem::Version version: '1.0' - !ruby/object:Gem::Dependency name: rake requirement: !ruby/object:Gem::Requirement requirements: - - ~> - !ruby/object:Gem::Version version: '10.0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ~> - !ruby/object:Gem::Version version: '10.0' - !ruby/object:Gem::Dependency name: minitest requirement: !ruby/object:Gem::Requirement requirements: - - ~> - !ruby/object:Gem::Version version: '5.3' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ~> - !ruby/object:Gem::Version version: '5.3' description: adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc email: - m.kristian@web.de executables: [] extensions: [] extra_rdoc_files: [] files: - maven-tools.gemspec - Rakefile - Mavenfile - Gemfile - lib/maven_tools.rb - lib/maven-tools.rb - lib/maven/tools/visitor.rb - lib/maven/tools/version.rb - lib/maven/tools/artifact.rb - lib/maven/tools/model.rb - lib/maven/tools/versions.rb - lib/maven/tools/gemspec_dependencies.rb - lib/maven/tools/gemfile_lock.rb - lib/maven/tools/dsl.rb - lib/maven/tools/jarfile.rb - lib/maven/tools/pom.rb - lib/maven/tools/coordinate.rb - lib/maven/tools/dsl/models.rb - lib/maven/tools/dsl/dependency_dsl.rb - lib/maven/tools/dsl/jarfile.rb - lib/maven/tools/dsl/jruby_dsl.rb - lib/maven/tools/dsl/exclusions_dsl.rb - lib/maven/tools/dsl/options.rb - spec/artifact_spec.rb - spec/jarfile_spec.rb - spec/coordinate_spec.rb - spec/pom_spec.rb - spec/spec_helper.rb - spec/gemspec_dependencies_spec.rb - spec/gemfile_with_source/bouncy-castle-version.rb - spec/pom_from_jarfile_with_jruby/pom.rb - spec/pom_maven_style/pom.rb - spec/gemspec_in_profile/bouncy-castle-version.rb - spec/gemfile_with_lock/bouncy-castle-version.rb - spec/pom_from_jarfile_help_only/pom.rb - spec/pom_from_jarfile/pom.rb - spec/gemfile_include_jars/bouncy-castle-version.rb - spec/gemfile/bouncy-castle-version.rb - spec/pom_with_execute/pom.rb - spec/gemspec/bouncy-castle-version.rb - spec/gemspec_with_source/bouncy-castle-version.rb - spec/pom_maven_hash_style/pom.rb - spec/gemspec_include_jars/bouncy-castle-version.rb - spec/gemspec_with_extras/bouncy-castle-version.rb - spec/gemfile_with_extras/bouncy-castle-version.rb - spec/pom_from_jarfile_with_exclusions/pom.rb - spec/pom_maven_alternative_style/pom.rb - MIT-LICENSE - README.md - spec/pom.xml - spec/gemfile_with_source/pom.xml - spec/pom_from_jarfile_with_jruby/pom.xml - spec/gemspec_in_profile/pom.xml - spec/pom_from_jarfile_with_repos/pom.xml - spec/gemfile_with_lock/pom.xml - spec/gemfile_with_test_group/pom.xml - spec/gemspec_with_prereleased_dependency_and_no_repo/pom.xml - spec/gemspec_with_custom_source_and_custom_jarname/pom.xml - spec/gemspec_prerelease_snapshot/pom.xml - spec/gemfile_with_path/pom.xml - spec/pom_from_jarfile_help_only/pom.xml - spec/gemfile_with_source_and_custom_jarname/pom.xml - spec/pom_from_jarfile/pom.xml - spec/gemspec_no_rubygems_repo/pom.xml - spec/gemfile_include_jars/pom.xml - spec/gemfile_with_source_and_no_jar/pom.xml - spec/gemspec_with_access_to_model/pom.xml - spec/gemfile/pom.xml - spec/gemspec_with_source_and_custom_jarname/pom.xml - spec/pom_with_execute/pom.xml - spec/gemspec/pom.xml - spec/gemspec_with_custom_source/pom.xml - spec/gemfile_with_platforms/pom.xml - spec/gemfile_with_access_to_model/pom.xml - spec/gemspec_with_source/pom.xml - spec/gemfile_with_groups_and_lockfile/pom.xml - spec/gemspec_prerelease/pom.xml - spec/gemfile_with_groups/pom.xml - spec/gemfile_with_custom_source/pom.xml - spec/gemspec_with_prereleased_dependency/pom.xml - spec/gemfile_without_gemspec/pom.xml - spec/gemfile_with_custom_source_and_custom_jarname/pom.xml - spec/gemspec_include_jars/pom.xml - spec/gemspec_with_extras/pom.xml - spec/gemspec_with_source_and_no_jar/pom.xml - spec/gemfile_with_extras/pom.xml - spec/pom_from_jarfile_with_exclusions/pom.xml - spec/gemfile_with_source/Mavenfile - spec/pom_from_jarfile_with_jruby/Jarfile - spec/gemspec_in_profile/Mavenfile - spec/pom_from_jarfile_with_repos/Jarfile - spec/pom_from_jarfile_with_repos/Mavenfile - spec/gemfile_with_lock/Mavenfile - spec/gemfile_with_lock/Gemfile - spec/gemfile_with_test_group/Mavenfile - spec/gemfile_with_test_group/Gemfile - spec/gemspec_with_prereleased_dependency_and_no_repo/Mavenfile - spec/gemspec_with_custom_source_and_custom_jarname/Mavenfile - spec/gemspec_prerelease_snapshot/Mavenfile - spec/gemfile_with_path/Mavenfile - spec/gemfile_with_path/Gemfile - spec/pom_from_jarfile_help_only/Jarfile - spec/gemfile_with_source_and_custom_jarname/Mavenfile - spec/gemfile_with_source_and_custom_jarname/Gemfile - spec/pom_from_jarfile/Jarfile - spec/gemspec_no_rubygems_repo/Mavenfile - spec/gemfile_include_jars/Mavenfile - spec/gemfile_include_jars/Gemfile - spec/gemfile_with_source_and_no_jar/Mavenfile - spec/gemfile_with_source_and_no_jar/Gemfile - spec/gemspec_with_access_to_model/Mavenfile - spec/gemfile/Mavenfile - spec/gemfile/Gemfile - spec/gemspec_with_source_and_custom_jarname/Mavenfile - spec/mavenfile/Mavenfile - spec/gemspec/Mavenfile - spec/gemspec_with_custom_source/Mavenfile - spec/gemfile_with_platforms/Mavenfile - spec/gemfile_with_platforms/Gemfile - spec/gemfile_with_access_to_model/Mavenfile - spec/gemfile_with_access_to_model/Gemfile - spec/gemspec_with_source/Mavenfile - spec/gemfile_with_groups_and_lockfile/Mavenfile - spec/gemfile_with_groups_and_lockfile/Gemfile - spec/gemspec_prerelease/Mavenfile - spec/gemfile_with_groups/Mavenfile - spec/gemfile_with_groups/Gemfile - spec/gemfile_with_custom_source/Mavenfile - spec/gemfile_with_custom_source/Gemfile - spec/gemspec_with_prereleased_dependency/Mavenfile - spec/gemfile_without_gemspec/Mavenfile - spec/gemfile_without_gemspec/Gemfile - spec/gemfile_with_custom_source_and_custom_jarname/Mavenfile - spec/gemfile_with_custom_source_and_custom_jarname/Gemfile - spec/gemspec_include_jars/Mavenfile - spec/gemspec_with_extras/Mavenfile - spec/gemspec_with_source_and_no_jar/Mavenfile - spec/gemfile_with_extras/Mavenfile - spec/gemfile_with_extras/Gemfile - spec/pom_from_jarfile_with_exclusions/Jarfile - spec/gemfile_with_lock/Gemfile.lock - spec/gemfile_with_test_group/Gemfile.lock - spec/gemfile_with_groups_and_lockfile/Gemfile.lock - spec/gemfile_with_source/src/main/java/.keep - spec/gemspec_with_custom_source_and_custom_jarname/src/java/.keep - spec/gemfile_with_source_and_custom_jarname/src/main/java/.keep - spec/gemfile_with_source_and_no_jar/src/main/java/.keep - spec/gemspec_with_source_and_custom_jarname/src/main/java/.keep - spec/gemspec_with_custom_source/src/java/.keep - spec/gemspec_with_source/src/main/java/.keep - spec/gemfile_with_custom_source/src/java/.keep - spec/gemfile_with_custom_source_and_custom_jarname/src/java/.keep - spec/gemspec_with_source_and_no_jar/src/main/java/.keep - spec/gemfile_with_source/bouncy-castle-java.gemspec - spec/gemspec_in_profile/bouncy-castle-java.gemspec - spec/gemfile_with_lock/bouncy-castle-java.gemspec - spec/gemspec_with_prereleased_dependency_and_no_repo/bouncy-castle-java.gemspec - spec/my/my.gemspec - spec/gemspec_with_custom_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec_prerelease_snapshot/bouncy-castle-java.gemspec - spec/gemfile_with_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec_no_rubygems_repo/bouncy-castle-java.gemspec - spec/gemfile_include_jars/bouncy-castle-java.gemspec - spec/gemfile_with_source_and_no_jar/bouncy-castle-java.gemspec - spec/gemspec_with_access_to_model/bouncy-castle-java.gemspec - spec/gemfile/bouncy-castle-java.gemspec - spec/gemspec_with_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec/bouncy-castle-java.gemspec - spec/gemspec_with_custom_source/bouncy-castle-java.gemspec - spec/gemfile_with_access_to_model/bouncy-castle-java.gemspec - spec/gemspec_with_source/bouncy-castle-java.gemspec - spec/gemspec_prerelease/bouncy-castle-java.gemspec - spec/gemfile_with_custom_source/bouncy-castle-java.gemspec - spec/gemspec_with_prereleased_dependency/bouncy-castle-java.gemspec - spec/gemfile_with_custom_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec_include_jars/bouncy-castle-java.gemspec - spec/gemspec_with_extras/bouncy-castle-java.gemspec - spec/gemspec_with_source_and_no_jar/bouncy-castle-java.gemspec - spec/gemfile_with_extras/bouncy-castle-java.gemspec homepage: http://github.com/torquebox/maven-tools licenses: - MIT metadata: {} post_install_message: rdoc_options: [] require_paths: - lib required_ruby_version: !ruby/object:Gem::Requirement requirements: - - '>=' - !ruby/object:Gem::Version version: '0' required_rubygems_version: !ruby/object:Gem::Requirement requirements: - - '>=' - !ruby/object:Gem::Version version: '0' requirements: [] rubyforge_project: rubygems_version: 2.4.2 signing_key: specification_version: 4 summary: helpers for maven related tasks test_files: - spec/artifact_spec.rb - spec/jarfile_spec.rb - spec/coordinate_spec.rb - spec/pom_spec.rb - spec/spec_helper.rb - spec/gemspec_dependencies_spec.rb - spec/gemfile_with_source/bouncy-castle-version.rb - spec/pom_from_jarfile_with_jruby/pom.rb - spec/pom_maven_style/pom.rb - spec/gemspec_in_profile/bouncy-castle-version.rb - spec/gemfile_with_lock/bouncy-castle-version.rb - spec/pom_from_jarfile_help_only/pom.rb - spec/pom_from_jarfile/pom.rb - spec/gemfile_include_jars/bouncy-castle-version.rb - spec/gemfile/bouncy-castle-version.rb - spec/pom_with_execute/pom.rb - spec/gemspec/bouncy-castle-version.rb - spec/gemspec_with_source/bouncy-castle-version.rb - spec/pom_maven_hash_style/pom.rb - spec/gemspec_include_jars/bouncy-castle-version.rb - spec/gemspec_with_extras/bouncy-castle-version.rb - spec/gemfile_with_extras/bouncy-castle-version.rb - spec/pom_from_jarfile_with_exclusions/pom.rb - spec/pom_maven_alternative_style/pom.rb - spec/pom.xml - spec/gemfile_with_source/pom.xml - spec/pom_from_jarfile_with_jruby/pom.xml - spec/gemspec_in_profile/pom.xml - spec/pom_from_jarfile_with_repos/pom.xml - spec/gemfile_with_lock/pom.xml - spec/gemfile_with_test_group/pom.xml - spec/gemspec_with_prereleased_dependency_and_no_repo/pom.xml - spec/gemspec_with_custom_source_and_custom_jarname/pom.xml - spec/gemspec_prerelease_snapshot/pom.xml - spec/gemfile_with_path/pom.xml - spec/pom_from_jarfile_help_only/pom.xml - spec/gemfile_with_source_and_custom_jarname/pom.xml - spec/pom_from_jarfile/pom.xml - spec/gemspec_no_rubygems_repo/pom.xml - spec/gemfile_include_jars/pom.xml - spec/gemfile_with_source_and_no_jar/pom.xml - spec/gemspec_with_access_to_model/pom.xml - spec/gemfile/pom.xml - spec/gemspec_with_source_and_custom_jarname/pom.xml - spec/pom_with_execute/pom.xml - spec/gemspec/pom.xml - spec/gemspec_with_custom_source/pom.xml - spec/gemfile_with_platforms/pom.xml - spec/gemfile_with_access_to_model/pom.xml - spec/gemspec_with_source/pom.xml - spec/gemfile_with_groups_and_lockfile/pom.xml - spec/gemspec_prerelease/pom.xml - spec/gemfile_with_groups/pom.xml - spec/gemfile_with_custom_source/pom.xml - spec/gemspec_with_prereleased_dependency/pom.xml - spec/gemfile_without_gemspec/pom.xml - spec/gemfile_with_custom_source_and_custom_jarname/pom.xml - spec/gemspec_include_jars/pom.xml - spec/gemspec_with_extras/pom.xml - spec/gemspec_with_source_and_no_jar/pom.xml - spec/gemfile_with_extras/pom.xml - spec/pom_from_jarfile_with_exclusions/pom.xml - spec/gemfile_with_source/Mavenfile - spec/pom_from_jarfile_with_jruby/Jarfile - spec/gemspec_in_profile/Mavenfile - spec/pom_from_jarfile_with_repos/Jarfile - spec/pom_from_jarfile_with_repos/Mavenfile - spec/gemfile_with_lock/Mavenfile - spec/gemfile_with_lock/Gemfile - spec/gemfile_with_test_group/Mavenfile - spec/gemfile_with_test_group/Gemfile - spec/gemspec_with_prereleased_dependency_and_no_repo/Mavenfile - spec/gemspec_with_custom_source_and_custom_jarname/Mavenfile - spec/gemspec_prerelease_snapshot/Mavenfile - spec/gemfile_with_path/Mavenfile - spec/gemfile_with_path/Gemfile - spec/pom_from_jarfile_help_only/Jarfile - spec/gemfile_with_source_and_custom_jarname/Mavenfile - spec/gemfile_with_source_and_custom_jarname/Gemfile - spec/pom_from_jarfile/Jarfile - spec/gemspec_no_rubygems_repo/Mavenfile - spec/gemfile_include_jars/Mavenfile - spec/gemfile_include_jars/Gemfile - spec/gemfile_with_source_and_no_jar/Mavenfile - spec/gemfile_with_source_and_no_jar/Gemfile - spec/gemspec_with_access_to_model/Mavenfile - spec/gemfile/Mavenfile - spec/gemfile/Gemfile - spec/gemspec_with_source_and_custom_jarname/Mavenfile - spec/mavenfile/Mavenfile - spec/gemspec/Mavenfile - spec/gemspec_with_custom_source/Mavenfile - spec/gemfile_with_platforms/Mavenfile - spec/gemfile_with_platforms/Gemfile - spec/gemfile_with_access_to_model/Mavenfile - spec/gemfile_with_access_to_model/Gemfile - spec/gemspec_with_source/Mavenfile - spec/gemfile_with_groups_and_lockfile/Mavenfile - spec/gemfile_with_groups_and_lockfile/Gemfile - spec/gemspec_prerelease/Mavenfile - spec/gemfile_with_groups/Mavenfile - spec/gemfile_with_groups/Gemfile - spec/gemfile_with_custom_source/Mavenfile - spec/gemfile_with_custom_source/Gemfile - spec/gemspec_with_prereleased_dependency/Mavenfile - spec/gemfile_without_gemspec/Mavenfile - spec/gemfile_without_gemspec/Gemfile - spec/gemfile_with_custom_source_and_custom_jarname/Mavenfile - spec/gemfile_with_custom_source_and_custom_jarname/Gemfile - spec/gemspec_include_jars/Mavenfile - spec/gemspec_with_extras/Mavenfile - spec/gemspec_with_source_and_no_jar/Mavenfile - spec/gemfile_with_extras/Mavenfile - spec/gemfile_with_extras/Gemfile - spec/pom_from_jarfile_with_exclusions/Jarfile - spec/gemfile_with_lock/Gemfile.lock - spec/gemfile_with_test_group/Gemfile.lock - spec/gemfile_with_groups_and_lockfile/Gemfile.lock - spec/gemfile_with_source/src/main/java/.keep - spec/gemspec_with_custom_source_and_custom_jarname/src/java/.keep - spec/gemfile_with_source_and_custom_jarname/src/main/java/.keep - spec/gemfile_with_source_and_no_jar/src/main/java/.keep - spec/gemspec_with_source_and_custom_jarname/src/main/java/.keep - spec/gemspec_with_custom_source/src/java/.keep - spec/gemspec_with_source/src/main/java/.keep - spec/gemfile_with_custom_source/src/java/.keep - spec/gemfile_with_custom_source_and_custom_jarname/src/java/.keep - spec/gemspec_with_source_and_no_jar/src/main/java/.keep - spec/gemfile_with_source/bouncy-castle-java.gemspec - spec/gemspec_in_profile/bouncy-castle-java.gemspec - spec/gemfile_with_lock/bouncy-castle-java.gemspec - spec/gemspec_with_prereleased_dependency_and_no_repo/bouncy-castle-java.gemspec - spec/my/my.gemspec - spec/gemspec_with_custom_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec_prerelease_snapshot/bouncy-castle-java.gemspec - spec/gemfile_with_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec_no_rubygems_repo/bouncy-castle-java.gemspec - spec/gemfile_include_jars/bouncy-castle-java.gemspec - spec/gemfile_with_source_and_no_jar/bouncy-castle-java.gemspec - spec/gemspec_with_access_to_model/bouncy-castle-java.gemspec - spec/gemfile/bouncy-castle-java.gemspec - spec/gemspec_with_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec/bouncy-castle-java.gemspec - spec/gemspec_with_custom_source/bouncy-castle-java.gemspec - spec/gemfile_with_access_to_model/bouncy-castle-java.gemspec - spec/gemspec_with_source/bouncy-castle-java.gemspec - spec/gemspec_prerelease/bouncy-castle-java.gemspec - spec/gemfile_with_custom_source/bouncy-castle-java.gemspec - spec/gemspec_with_prereleased_dependency/bouncy-castle-java.gemspec - spec/gemfile_with_custom_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec_include_jars/bouncy-castle-java.gemspec - spec/gemspec_with_extras/bouncy-castle-java.gemspec - spec/gemspec_with_source_and_no_jar/bouncy-castle-java.gemspec - spec/gemfile_with_extras/bouncy-castle-java.gemspec has_rdoc: maven-tools-1.2.1/spec/dsl/profile_gemspec_spec/jars_and_poms_include_jars.xml0000644000175000017500000000453414506273454027277 0ustar jeromejerome 4.0.0 no_group_id_given profile_gemspec_spec 0.0.0 profile_gemspec_spec utf-8 3.0.0 2.0.0 org.slf4j slf4j-simple 1.6.4 org.jruby jruby 1.7.16 pom org.jruby jruby 1.7.16 noasm org.jruby jruby-stdlib mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} maven-dependency-plugin generate-test-resources copy-dependencies lib true org.jruby.maven gem-maven-plugin ${jruby.plugins.version} jars_and_poms.gemspec true true maven-tools-1.2.1/spec/dsl/profile_gemspec_spec/jars_and_poms.xml0000644000175000017500000000340314506273454024547 0ustar jeromejerome 4.0.0 no_group_id_given profile_gemspec_spec 0.0.0 profile_gemspec_spec utf-8 3.0.0 2.0.0 org.slf4j slf4j-simple 1.6.4 org.jruby jruby 1.7.16 pom org.jruby jruby 1.7.16 noasm org.jruby jruby-stdlib mavengems mavengem:https://rubygems.org org.jruby.maven mavengem-wagon ${mavengem.wagon.version} org.jruby.maven gem-maven-plugin ${jruby.plugins.version} jars_and_poms.gemspec maven-tools-1.2.1/spec/dsl/profile_gemspec_spec/jars_and_poms.gemspec0000644000175000017500000000130314506273454025367 0ustar jeromejerome# -*- mode:ruby -*- # -*- coding: utf-8 -*- Gem::Specification.new do |s| s.name = 'maven-tools' s.version = '123' s.summary = 'helpers for maven related tasks' s.description = 'adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc' s.homepage = 'http://github.com/torquebox/maven-tools' s.authors = ['Christian Meier'] s.email = ['m.kristian@web.de'] s.license = 'MIT' s.platform = 'java' s.requirements << 'jar org.slf4j:slf4j-simple, 1.6.4' s.requirements << 'pom org.jruby:jruby, 1.7.16' s.requirements << 'jar org.jruby:jruby, 1.7.16, noasm, [org.jruby:jruby-stdlib]' end # vim: syntax=Ruby maven-tools-1.2.1/spec/dsl/profile_gemspec_spec.rb0000644000175000017500000000550114506273454021534 0ustar jeromejeromerequire_relative '../spec_helper' require 'yaml' require 'maven/tools/dsl/profile_gemspec' require 'maven/tools/project' require 'maven/tools/model' require 'maven/tools/dsl' require 'maven/tools/version' require 'maven/tools/visitor' class Maven::Tools::Project include Maven::Tools::DSL end class ProfileGemspecFile def self.read( name, artifact_id, version = '1.0.5' ) xml = File.read( __FILE__.sub( /.rb$/, "/#{name}" ) ) xml.gsub!( /BASEDIR/, artifact_id ) xml.gsub!( /VERSION/, version ) xml end end describe Maven::Tools::DSL::ProfileGemspec do let( :parent ) { Maven::Tools::Project.new( __FILE__.sub( /.rb$/, '/maven-tools.gemspec' ) ) } subject { Maven::Tools::DSL::ProfileGemspec } it 'evals maven_tools.gemspec' do parent = Maven::Tools::Project.new subject.new parent xml = "" Maven::Tools::Visitor.new( xml ).accept_project( parent.model ) v = Maven::Tools::VERSION v += '-SNAPSHOT' if v =~ /.dev$/ xml.must_equal( ProfileGemspecFile.read( 'maven-tools.xml', 'maven-tools', v ) ) end it 'evals maven_tools.gemspec from yaml' do subject.new parent, 'maven-tools.gemspec' xml = "" Maven::Tools::Visitor.new( xml ).accept_project( parent.model ) xml.must_equal( ProfileGemspecFile.read( 'maven-tools.xml', 'profile_gemspec_spec' ) ) end it 'evals maven_tools.gemspec from yaml no gem dependencies' do subject.new parent, 'maven-tools.gemspec', :no_gems => true xml = "" Maven::Tools::Visitor.new( xml ).accept_project( parent.model ) xml.must_equal( ProfileGemspecFile.read( 'no_gems.xml', 'gemspec_spec' ) ) end it 'evals snapshot.gemspec' do subject.new parent, 'snapshot.gemspec' xml = "" Maven::Tools::Visitor.new( xml ).accept_project( parent.model ) xml.must_equal( ProfileGemspecFile.read( 'snapshot.xml', 'snapshot', '1.a-SNAPSHOT' ) ) end it 'evals gemspec with jar and pom dependencies' do subject.new parent, 'jars_and_poms.gemspec' xml = "" Maven::Tools::Visitor.new( xml ).accept_project( parent.model ) xml.must_equal( ProfileGemspecFile.read( 'jars_and_poms.xml', 'gemspec_spec' ) ) end it 'evals gemspec with jar and pom dependencies' do subject.new parent, :name => 'jars_and_poms.gemspec', :include_jars => true xml = "" Maven::Tools::Visitor.new( xml ).accept_project( parent.model ) xml.must_equal( ProfileGemspecFile.read( 'jars_and_poms_include_jars.xml', 'gemspec_spec' ) ) end it 'evals gemspec without previously known license' do subject.new parent, 'unknown_license.gemspec' xml = "" Maven::Tools::Visitor.new( xml ).accept_project( parent.model ) xml.must_equal( ProfileGemspecFile.read( 'unknown_license.xml', 'gemspec_spec' ) ) end end maven-tools-1.2.1/spec/dsl/jarfile_lock_spec/0000755000175000017500000000000014506273454020467 5ustar jeromejeromemaven-tools-1.2.1/spec/dsl/jarfile_lock_spec/Jarfile.lock0000644000175000017500000000561014506273454022717 0ustar jeromejerome--- :jruby: - joda-time:joda-time:jar:2.3 - com.martiansoftware:nailgun-server:jar:0.9.1 - com.github.jnr:jnr-netdb:jar:1.1.5 - com.headius:invokebinder:jar:1.2 - org.jruby.joni:joni:jar:2.1.1 - com.github.jnr:jnr-posix:jar:3.0.1 - org.jruby.extras:bytelist:jar:1.0.11 - com.github.jnr:jnr-x86asm:jar:1.0.2 - org.yaml:snakeyaml:jar:1.13 - com.github.jnr:jnr-constants:jar:0.8.5 - com.github.jnr:jffi:jar:native:1.2.7 - com.jcraft:jzlib:jar:1.1.5 - com.github.jnr:jnr-enxio:jar:0.4 - org.jruby:yecht:jar:1.0 - org.jruby:jruby-stdlib:jar:1.7.11 - org.jruby.jcodings:jcodings:jar:1.0.10 - com.github.jnr:jffi:jar:1.2.7 - org.jruby:jruby-core:jar:noasm:1.7.11 - com.github.jnr:jnr-unixsocket:jar:0.3 :runtime: - org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.0.0.M2a - com.google.guava:guava:jar:10.0.1 - commons-logging:commons-logging:jar:1.1.5 - org.eclipse.aether:aether-connector-wagon:jar:0.9.0.M2 - org.eclipse.aether:aether-impl:jar:0.9.0.M2 - com.ning:async-http-client:jar:1.7.6 - org.apache.maven.wagon:wagon-http-shared4:jar:2.4 - org.sonatype.plexus:plexus-cipher:jar:1.4 - org.sonatype.sisu:sisu-guice:jar:no_aop:3.1.0 - org.apache.maven:maven-model:jar:3.1.0 - org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3 - org.codehaus.plexus:plexus-classworlds:jar:2.4 - org.apache.maven:maven-aether-provider:jar:3.1.0 - org.apache.maven.wagon:wagon-provider-api:jar:1.0 - io.netty:netty:jar:3.4.4.Final - aopalliance:aopalliance:jar:1.0 - org.eclipse.aether:aether-api:jar:0.9.0.M2 - org.jsoup:jsoup:jar:1.7.1 - org.codehaus.plexus:plexus-interpolation:jar:1.16 - javax.enterprise:cdi-api:jar:1.0 - org.slf4j:slf4j-api:jar:1.6.6 - asm:asm:jar:3.3.1 - com.google.code.findbugs:jsr305:jar:1.3.9 - org.apache.maven:maven-repository-metadata:jar:3.1.0 - org.bouncycastle:bcpkix-jdk15on:jar:1.49 - org.apache.httpcomponents:httpcore:jar:4.2.3 - javax.annotation:jsr250-api:jar:1.0 - org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.0.0.M2a - org.apache.maven:maven-settings:jar:3.1.0 - org.apache.maven.wagon:wagon-file:jar:2.4 - org.slf4j:slf4j-simple:jar:1.6.6 - org.bouncycastle:bcprov-jdk15on:jar:1.49 - org.eclipse.aether:aether-util:jar:0.9.0.M2 - commons-io:commons-io:jar:2.0.1 - org.apache.httpcomponents:httpclient:jar:4.2.3 - org.eclipse.aether:aether-connector-file:jar:0.9.0.M2 - org.eclipse.aether:aether-spi:jar:0.9.0.M2 - org.apache.maven:maven-settings-builder:jar:3.1.0 - javax.inject:javax.inject:jar:1 - org.apache.maven:maven-model-builder:jar:3.1.0 - org.codehaus.plexus:plexus-component-annotations:jar:1.5.5 - org.apache.maven.wagon:wagon-http:jar:2.4 - org.codehaus.plexus:plexus-utils:jar:3.0.10 - org.eclipse.aether:aether-connector-asynchttpclient:jar:0.9.0.M2 - commons-codec:commons-codec:jar:1.6 :test: - com.beust:jcommander:jar:1.27 - org.hamcrest:hamcrest-core:jar:1.1 - junit:junit:jar:4.10 - org.mockito:mockito-core:jar:1.9.5 - org.testng:testng:jar:6.8 - org.beanshell:bsh:jar:2.0b4 - org.objenesis:objenesis:jar:1.0 maven-tools-1.2.1/spec/dsl/jarfile_lock_spec/Jarfile.legacy.lock0000644000175000017500000000412714506273454024164 0ustar jeromejeromeorg.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.0.0.M2a com.google.guava:guava:jar:10.0.1 commons-logging:commons-logging:jar:1.1.5 org.eclipse.aether:aether-connector-wagon:jar:0.9.0.M2 org.eclipse.aether:aether-impl:jar:0.9.0.M2 com.ning:async-http-client:jar:1.7.6 org.apache.maven.wagon:wagon-http-shared4:jar:2.4 org.sonatype.plexus:plexus-cipher:jar:1.4 org.sonatype.sisu:sisu-guice:jar:no_aop:3.1.0 org.apache.maven:maven-model:jar:3.1.0 org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3 org.codehaus.plexus:plexus-classworlds:jar:2.4 org.apache.maven:maven-aether-provider:jar:3.1.0 org.apache.maven.wagon:wagon-provider-api:jar:1.0 io.netty:netty:jar:3.4.4.Final aopalliance:aopalliance:jar:1.0 org.eclipse.aether:aether-api:jar:0.9.0.M2 org.jsoup:jsoup:jar:1.7.1 org.codehaus.plexus:plexus-interpolation:jar:1.16 javax.enterprise:cdi-api:jar:1.0 org.slf4j:slf4j-api:jar:1.6.6 asm:asm:jar:3.3.1 com.google.code.findbugs:jsr305:jar:1.3.9 org.apache.maven:maven-repository-metadata:jar:3.1.0 org.bouncycastle:bcpkix-jdk15on:jar:1.49 org.apache.httpcomponents:httpcore:jar:4.2.3 javax.annotation:jsr250-api:jar:1.0 org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.0.0.M2a org.apache.maven:maven-settings:jar:3.1.0 org.apache.maven.wagon:wagon-file:jar:2.4 org.slf4j:slf4j-simple:jar:1.6.6 org.bouncycastle:bcprov-jdk15on:jar:1.49 org.eclipse.aether:aether-util:jar:0.9.0.M2 commons-io:commons-io:jar:2.0.1 org.apache.httpcomponents:httpclient:jar:4.2.3 org.eclipse.aether:aether-connector-file:jar:0.9.0.M2 org.eclipse.aether:aether-spi:jar:0.9.0.M2 org.apache.maven:maven-settings-builder:jar:3.1.0 javax.inject:javax.inject:jar:1 org.apache.maven:maven-model-builder:jar:3.1.0 org.codehaus.plexus:plexus-component-annotations:jar:1.5.5 org.apache.maven.wagon:wagon-http:jar:2.4 org.codehaus.plexus:plexus-utils:jar:3.0.10 org.eclipse.aether:aether-connector-asynchttpclient:jar:0.9.0.M2 commons-codec:commons-codec:jar:1.6 com.beust:jcommander:jar:1.27 org.hamcrest:hamcrest-core:jar:1.1 junit:junit:jar:4.10 org.mockito:mockito-core:jar:1.9.5 org.testng:testng:jar:6.8 org.beanshell:bsh:jar:2.0b4 org.objenesis:objenesis:jar:1.0 maven-tools-1.2.1/spec/dsl/jarfile_lock_spec.rb0000644000175000017500000001032314506273454021013 0ustar jeromejeromerequire_relative '../spec_helper' require 'maven/tools/dsl/jarfile_lock' describe Maven::Tools::DSL::JarfileLock do let( :base ) { __FILE__.sub( /.rb$/, '/Jarfile' ) } subject { Maven::Tools::DSL::JarfileLock } it 'loads legacy Jarfile.lock' do lock = subject.new( base + '.legacy' ) lock.coordinates( :test ).size.must_equal 0 lock.coordinates.size.must_equal 52 end it 'loads Jarfile.lock' do lock = subject.new( base ) lock.coordinates( :test ).size.must_equal 7 lock.coordinates.size.must_equal 45 end it 'tests existence' do lock = subject.new( base ) ( lock.coordinates( :test ) + lock.coordinates ).each do |c| lock.exists?( c ).must_equal true lock.exists?( c + ".bla" ).must_equal false end end it 'tests locked' do lock = subject.new( base ) ( lock.coordinates( :test ) + lock.coordinates ).each do |c| lock.locked?( c ).must_equal true lock.locked?( c + ".bla" ).must_equal true end end it 'dumps data' do file = 'Jarfile.temp' file_lock = 'Jarfile.temp.lock' begin FileUtils.rm_f file_lock lock = subject.new( file ) lock.update_unlocked( { :test => [ 'bla:blas:123' ], :runtime => [ 'huffle:puffle:321' ] } ) lock.dump lock = subject.new( file ) lock.coordinates.must_equal ['huffle:puffle:321'] lock.coordinates( :test ).must_equal ['bla:blas:123'] ensure FileUtils.rm_f file_lock end end it 'can replace the data' do lock = subject.new( 'something' ) lock.replace( { :test => [ 'bla:blas:123' ], :runtime => [ 'huffle:puffle:321' ] } ) lock.coordinates.must_equal ['huffle:puffle:321'] lock.coordinates( :test ).must_equal ['bla:blas:123'] lock.replace( { :runtime => [ 'huffle:puffle:321' ] } ) lock.coordinates.must_equal ['huffle:puffle:321'] lock.coordinates( :test ).must_equal [] lock.replace( { :test => [ 'bla:blas:123' ]} ) lock.coordinates.must_equal [] lock.coordinates( :test ).must_equal ['bla:blas:123'] end it 'can add missing data idempotent' do lock = subject.new( 'something' ) lock.update_unlocked( { :test => [ 'bla:blas:123' ], :runtime => [ 'huffle:puffle:321' ] } ).must_equal true lock.update_unlocked( { :test => [ 'bla:blas:123' ], :runtime => [ 'huffle:puffle:321' ] } ).must_equal true lock.coordinates.must_equal ['huffle:puffle:321'] lock.coordinates( :test ).must_equal ['bla:blas:123'] lock.update_unlocked( { :runtime => [ 'huffle:puffle:321' ] } ).must_equal true lock.coordinates.must_equal ['huffle:puffle:321'] lock.coordinates( :test ).must_equal ['bla:blas:123'] lock.update_unlocked( { :runtime => [ 'huffle:puffle2:321' ] } ).must_equal true lock.coordinates.must_equal ['huffle:puffle:321', 'huffle:puffle2:321'] lock.coordinates( :test ).must_equal ['bla:blas:123'] lock.update_unlocked( { :test => [ 'bla:blas:123' ]} ).must_equal true lock.coordinates.must_equal ['huffle:puffle:321', 'huffle:puffle2:321'] lock.coordinates( :test ).must_equal ['bla:blas:123'] lock.update_unlocked( { :test => [ 'bla:bla2:123' ]} ).must_equal true lock.coordinates.must_equal ['huffle:puffle:321', 'huffle:puffle2:321'] lock.coordinates( :test ).must_equal ['bla:blas:123', 'bla:bla2:123'] end it 'fails add data on version conflict' do lock = subject.new( 'something' ) lock.replace( { :test => [ 'bla:blas:123' ], :runtime => [ 'huffle:puffle:321' ] } ) lock.update_unlocked( { :test => [ 'bla:blas:1233' ], :runtime => [ 'huffle:puffle:3214' ] } ).must_equal false lock.coordinates.must_equal ['huffle:puffle:321'] lock.coordinates( :test ).must_equal ['bla:blas:123'] lock.update_unlocked( { :runtime => [ 'huffle:puffle:3214' ] } ).must_equal false lock.coordinates.must_equal ['huffle:puffle:321'] lock.coordinates( :test ).must_equal ['bla:blas:123'] lock.update_unlocked( { :test => [ 'bla:blas:1233' ]} ).must_equal false lock.coordinates.must_equal ['huffle:puffle:321'] lock.coordinates( :test ).must_equal ['bla:blas:123'] end end maven-tools-1.2.1/spec/dsl/gemspec_spec/0000755000175000017500000000000014506273454017466 5ustar jeromejeromemaven-tools-1.2.1/spec/dsl/gemspec_spec/maven-tools.xml0000644000175000017500000000234114506273454022454 0ustar jeromejerome 4.0.0 no_group_id_given BASEDIR 0.0.0 BASEDIR 3.0.0 2.0.0 rubygems virtus [1.0,1.99999] gem rubygems rake [10.0,10.99999] gem test rubygems minitest [5.3,5.99999] gem test org.jruby.maven gem-maven-plugin ${jruby.plugins.version} maven-tools.gemspec maven-tools-1.2.1/spec/dsl/gemspec_spec/maven-tools.gemspec0000644000175000017500000004052514506273454023305 0ustar jeromejerome--- !ruby/object:Gem::Specification name: maven-tools version: !ruby/object:Gem::Version version: 1.0.5 platform: ruby authors: - Christian Meier autorequire: bindir: bin cert_chain: [] date: 2014-09-24 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: virtus requirement: !ruby/object:Gem::Requirement requirements: - - ~> - !ruby/object:Gem::Version version: '1.0' type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ~> - !ruby/object:Gem::Version version: '1.0' - !ruby/object:Gem::Dependency name: rake requirement: !ruby/object:Gem::Requirement requirements: - - ~> - !ruby/object:Gem::Version version: '10.0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ~> - !ruby/object:Gem::Version version: '10.0' - !ruby/object:Gem::Dependency name: minitest requirement: !ruby/object:Gem::Requirement requirements: - - ~> - !ruby/object:Gem::Version version: '5.3' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - ~> - !ruby/object:Gem::Version version: '5.3' description: adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc email: - m.kristian@web.de executables: [] extensions: [] extra_rdoc_files: [] files: - maven-tools.gemspec - Rakefile - Mavenfile - Gemfile - lib/maven_tools.rb - lib/maven-tools.rb - lib/maven/tools/visitor.rb - lib/maven/tools/version.rb - lib/maven/tools/artifact.rb - lib/maven/tools/model.rb - lib/maven/tools/versions.rb - lib/maven/tools/gemspec_dependencies.rb - lib/maven/tools/gemfile_lock.rb - lib/maven/tools/dsl.rb - lib/maven/tools/jarfile.rb - lib/maven/tools/pom.rb - lib/maven/tools/coordinate.rb - lib/maven/tools/dsl/models.rb - lib/maven/tools/dsl/dependency_dsl.rb - lib/maven/tools/dsl/jarfile.rb - lib/maven/tools/dsl/jruby_dsl.rb - lib/maven/tools/dsl/exclusions_dsl.rb - lib/maven/tools/dsl/options.rb - spec/artifact_spec.rb - spec/jarfile_spec.rb - spec/coordinate_spec.rb - spec/pom_spec.rb - spec/spec_helper.rb - spec/gemspec_dependencies_spec.rb - spec/gemfile_with_source/bouncy-castle-version.rb - spec/pom_from_jarfile_with_jruby/pom.rb - spec/pom_maven_style/pom.rb - spec/gemspec_in_profile/bouncy-castle-version.rb - spec/gemfile_with_lock/bouncy-castle-version.rb - spec/pom_from_jarfile_help_only/pom.rb - spec/pom_from_jarfile/pom.rb - spec/gemfile_include_jars/bouncy-castle-version.rb - spec/gemfile/bouncy-castle-version.rb - spec/pom_with_execute/pom.rb - spec/gemspec/bouncy-castle-version.rb - spec/gemspec_with_source/bouncy-castle-version.rb - spec/pom_maven_hash_style/pom.rb - spec/gemspec_include_jars/bouncy-castle-version.rb - spec/gemspec_with_extras/bouncy-castle-version.rb - spec/gemfile_with_extras/bouncy-castle-version.rb - spec/pom_from_jarfile_with_exclusions/pom.rb - spec/pom_maven_alternative_style/pom.rb - MIT-LICENSE - README.md - spec/pom.xml - spec/gemfile_with_source/pom.xml - spec/pom_from_jarfile_with_jruby/pom.xml - spec/gemspec_in_profile/pom.xml - spec/pom_from_jarfile_with_repos/pom.xml - spec/gemfile_with_lock/pom.xml - spec/gemfile_with_test_group/pom.xml - spec/gemspec_with_prereleased_dependency_and_no_repo/pom.xml - spec/gemspec_with_custom_source_and_custom_jarname/pom.xml - spec/gemspec_prerelease_snapshot/pom.xml - spec/gemfile_with_path/pom.xml - spec/pom_from_jarfile_help_only/pom.xml - spec/gemfile_with_source_and_custom_jarname/pom.xml - spec/pom_from_jarfile/pom.xml - spec/gemspec_no_rubygems_repo/pom.xml - spec/gemfile_include_jars/pom.xml - spec/gemfile_with_source_and_no_jar/pom.xml - spec/gemspec_with_access_to_model/pom.xml - spec/gemfile/pom.xml - spec/gemspec_with_source_and_custom_jarname/pom.xml - spec/pom_with_execute/pom.xml - spec/gemspec/pom.xml - spec/gemspec_with_custom_source/pom.xml - spec/gemfile_with_platforms/pom.xml - spec/gemfile_with_access_to_model/pom.xml - spec/gemspec_with_source/pom.xml - spec/gemfile_with_groups_and_lockfile/pom.xml - spec/gemspec_prerelease/pom.xml - spec/gemfile_with_groups/pom.xml - spec/gemfile_with_custom_source/pom.xml - spec/gemspec_with_prereleased_dependency/pom.xml - spec/gemfile_without_gemspec/pom.xml - spec/gemfile_with_custom_source_and_custom_jarname/pom.xml - spec/gemspec_include_jars/pom.xml - spec/gemspec_with_extras/pom.xml - spec/gemspec_with_source_and_no_jar/pom.xml - spec/gemfile_with_extras/pom.xml - spec/pom_from_jarfile_with_exclusions/pom.xml - spec/gemfile_with_source/Mavenfile - spec/pom_from_jarfile_with_jruby/Jarfile - spec/gemspec_in_profile/Mavenfile - spec/pom_from_jarfile_with_repos/Jarfile - spec/pom_from_jarfile_with_repos/Mavenfile - spec/gemfile_with_lock/Mavenfile - spec/gemfile_with_lock/Gemfile - spec/gemfile_with_test_group/Mavenfile - spec/gemfile_with_test_group/Gemfile - spec/gemspec_with_prereleased_dependency_and_no_repo/Mavenfile - spec/gemspec_with_custom_source_and_custom_jarname/Mavenfile - spec/gemspec_prerelease_snapshot/Mavenfile - spec/gemfile_with_path/Mavenfile - spec/gemfile_with_path/Gemfile - spec/pom_from_jarfile_help_only/Jarfile - spec/gemfile_with_source_and_custom_jarname/Mavenfile - spec/gemfile_with_source_and_custom_jarname/Gemfile - spec/pom_from_jarfile/Jarfile - spec/gemspec_no_rubygems_repo/Mavenfile - spec/gemfile_include_jars/Mavenfile - spec/gemfile_include_jars/Gemfile - spec/gemfile_with_source_and_no_jar/Mavenfile - spec/gemfile_with_source_and_no_jar/Gemfile - spec/gemspec_with_access_to_model/Mavenfile - spec/gemfile/Mavenfile - spec/gemfile/Gemfile - spec/gemspec_with_source_and_custom_jarname/Mavenfile - spec/mavenfile/Mavenfile - spec/gemspec/Mavenfile - spec/gemspec_with_custom_source/Mavenfile - spec/gemfile_with_platforms/Mavenfile - spec/gemfile_with_platforms/Gemfile - spec/gemfile_with_access_to_model/Mavenfile - spec/gemfile_with_access_to_model/Gemfile - spec/gemspec_with_source/Mavenfile - spec/gemfile_with_groups_and_lockfile/Mavenfile - spec/gemfile_with_groups_and_lockfile/Gemfile - spec/gemspec_prerelease/Mavenfile - spec/gemfile_with_groups/Mavenfile - spec/gemfile_with_groups/Gemfile - spec/gemfile_with_custom_source/Mavenfile - spec/gemfile_with_custom_source/Gemfile - spec/gemspec_with_prereleased_dependency/Mavenfile - spec/gemfile_without_gemspec/Mavenfile - spec/gemfile_without_gemspec/Gemfile - spec/gemfile_with_custom_source_and_custom_jarname/Mavenfile - spec/gemfile_with_custom_source_and_custom_jarname/Gemfile - spec/gemspec_include_jars/Mavenfile - spec/gemspec_with_extras/Mavenfile - spec/gemspec_with_source_and_no_jar/Mavenfile - spec/gemfile_with_extras/Mavenfile - spec/gemfile_with_extras/Gemfile - spec/pom_from_jarfile_with_exclusions/Jarfile - spec/gemfile_with_lock/Gemfile.lock - spec/gemfile_with_test_group/Gemfile.lock - spec/gemfile_with_groups_and_lockfile/Gemfile.lock - spec/gemfile_with_source/src/main/java/.keep - spec/gemspec_with_custom_source_and_custom_jarname/src/java/.keep - spec/gemfile_with_source_and_custom_jarname/src/main/java/.keep - spec/gemfile_with_source_and_no_jar/src/main/java/.keep - spec/gemspec_with_source_and_custom_jarname/src/main/java/.keep - spec/gemspec_with_custom_source/src/java/.keep - spec/gemspec_with_source/src/main/java/.keep - spec/gemfile_with_custom_source/src/java/.keep - spec/gemfile_with_custom_source_and_custom_jarname/src/java/.keep - spec/gemspec_with_source_and_no_jar/src/main/java/.keep - spec/gemfile_with_source/bouncy-castle-java.gemspec - spec/gemspec_in_profile/bouncy-castle-java.gemspec - spec/gemfile_with_lock/bouncy-castle-java.gemspec - spec/gemspec_with_prereleased_dependency_and_no_repo/bouncy-castle-java.gemspec - spec/my/my.gemspec - spec/gemspec_with_custom_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec_prerelease_snapshot/bouncy-castle-java.gemspec - spec/gemfile_with_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec_no_rubygems_repo/bouncy-castle-java.gemspec - spec/gemfile_include_jars/bouncy-castle-java.gemspec - spec/gemfile_with_source_and_no_jar/bouncy-castle-java.gemspec - spec/gemspec_with_access_to_model/bouncy-castle-java.gemspec - spec/gemfile/bouncy-castle-java.gemspec - spec/gemspec_with_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec/bouncy-castle-java.gemspec - spec/gemspec_with_custom_source/bouncy-castle-java.gemspec - spec/gemfile_with_access_to_model/bouncy-castle-java.gemspec - spec/gemspec_with_source/bouncy-castle-java.gemspec - spec/gemspec_prerelease/bouncy-castle-java.gemspec - spec/gemfile_with_custom_source/bouncy-castle-java.gemspec - spec/gemspec_with_prereleased_dependency/bouncy-castle-java.gemspec - spec/gemfile_with_custom_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec_include_jars/bouncy-castle-java.gemspec - spec/gemspec_with_extras/bouncy-castle-java.gemspec - spec/gemspec_with_source_and_no_jar/bouncy-castle-java.gemspec - spec/gemfile_with_extras/bouncy-castle-java.gemspec homepage: http://github.com/torquebox/maven-tools licenses: - MIT metadata: {} post_install_message: rdoc_options: [] require_paths: - lib required_ruby_version: !ruby/object:Gem::Requirement requirements: - - '>=' - !ruby/object:Gem::Version version: '0' required_rubygems_version: !ruby/object:Gem::Requirement requirements: - - '>=' - !ruby/object:Gem::Version version: '0' requirements: [] rubyforge_project: rubygems_version: 2.4.2 signing_key: specification_version: 4 summary: helpers for maven related tasks test_files: - spec/artifact_spec.rb - spec/jarfile_spec.rb - spec/coordinate_spec.rb - spec/pom_spec.rb - spec/spec_helper.rb - spec/gemspec_dependencies_spec.rb - spec/gemfile_with_source/bouncy-castle-version.rb - spec/pom_from_jarfile_with_jruby/pom.rb - spec/pom_maven_style/pom.rb - spec/gemspec_in_profile/bouncy-castle-version.rb - spec/gemfile_with_lock/bouncy-castle-version.rb - spec/pom_from_jarfile_help_only/pom.rb - spec/pom_from_jarfile/pom.rb - spec/gemfile_include_jars/bouncy-castle-version.rb - spec/gemfile/bouncy-castle-version.rb - spec/pom_with_execute/pom.rb - spec/gemspec/bouncy-castle-version.rb - spec/gemspec_with_source/bouncy-castle-version.rb - spec/pom_maven_hash_style/pom.rb - spec/gemspec_include_jars/bouncy-castle-version.rb - spec/gemspec_with_extras/bouncy-castle-version.rb - spec/gemfile_with_extras/bouncy-castle-version.rb - spec/pom_from_jarfile_with_exclusions/pom.rb - spec/pom_maven_alternative_style/pom.rb - spec/pom.xml - spec/gemfile_with_source/pom.xml - spec/pom_from_jarfile_with_jruby/pom.xml - spec/gemspec_in_profile/pom.xml - spec/pom_from_jarfile_with_repos/pom.xml - spec/gemfile_with_lock/pom.xml - spec/gemfile_with_test_group/pom.xml - spec/gemspec_with_prereleased_dependency_and_no_repo/pom.xml - spec/gemspec_with_custom_source_and_custom_jarname/pom.xml - spec/gemspec_prerelease_snapshot/pom.xml - spec/gemfile_with_path/pom.xml - spec/pom_from_jarfile_help_only/pom.xml - spec/gemfile_with_source_and_custom_jarname/pom.xml - spec/pom_from_jarfile/pom.xml - spec/gemspec_no_rubygems_repo/pom.xml - spec/gemfile_include_jars/pom.xml - spec/gemfile_with_source_and_no_jar/pom.xml - spec/gemspec_with_access_to_model/pom.xml - spec/gemfile/pom.xml - spec/gemspec_with_source_and_custom_jarname/pom.xml - spec/pom_with_execute/pom.xml - spec/gemspec/pom.xml - spec/gemspec_with_custom_source/pom.xml - spec/gemfile_with_platforms/pom.xml - spec/gemfile_with_access_to_model/pom.xml - spec/gemspec_with_source/pom.xml - spec/gemfile_with_groups_and_lockfile/pom.xml - spec/gemspec_prerelease/pom.xml - spec/gemfile_with_groups/pom.xml - spec/gemfile_with_custom_source/pom.xml - spec/gemspec_with_prereleased_dependency/pom.xml - spec/gemfile_without_gemspec/pom.xml - spec/gemfile_with_custom_source_and_custom_jarname/pom.xml - spec/gemspec_include_jars/pom.xml - spec/gemspec_with_extras/pom.xml - spec/gemspec_with_source_and_no_jar/pom.xml - spec/gemfile_with_extras/pom.xml - spec/pom_from_jarfile_with_exclusions/pom.xml - spec/gemfile_with_source/Mavenfile - spec/pom_from_jarfile_with_jruby/Jarfile - spec/gemspec_in_profile/Mavenfile - spec/pom_from_jarfile_with_repos/Jarfile - spec/pom_from_jarfile_with_repos/Mavenfile - spec/gemfile_with_lock/Mavenfile - spec/gemfile_with_lock/Gemfile - spec/gemfile_with_test_group/Mavenfile - spec/gemfile_with_test_group/Gemfile - spec/gemspec_with_prereleased_dependency_and_no_repo/Mavenfile - spec/gemspec_with_custom_source_and_custom_jarname/Mavenfile - spec/gemspec_prerelease_snapshot/Mavenfile - spec/gemfile_with_path/Mavenfile - spec/gemfile_with_path/Gemfile - spec/pom_from_jarfile_help_only/Jarfile - spec/gemfile_with_source_and_custom_jarname/Mavenfile - spec/gemfile_with_source_and_custom_jarname/Gemfile - spec/pom_from_jarfile/Jarfile - spec/gemspec_no_rubygems_repo/Mavenfile - spec/gemfile_include_jars/Mavenfile - spec/gemfile_include_jars/Gemfile - spec/gemfile_with_source_and_no_jar/Mavenfile - spec/gemfile_with_source_and_no_jar/Gemfile - spec/gemspec_with_access_to_model/Mavenfile - spec/gemfile/Mavenfile - spec/gemfile/Gemfile - spec/gemspec_with_source_and_custom_jarname/Mavenfile - spec/mavenfile/Mavenfile - spec/gemspec/Mavenfile - spec/gemspec_with_custom_source/Mavenfile - spec/gemfile_with_platforms/Mavenfile - spec/gemfile_with_platforms/Gemfile - spec/gemfile_with_access_to_model/Mavenfile - spec/gemfile_with_access_to_model/Gemfile - spec/gemspec_with_source/Mavenfile - spec/gemfile_with_groups_and_lockfile/Mavenfile - spec/gemfile_with_groups_and_lockfile/Gemfile - spec/gemspec_prerelease/Mavenfile - spec/gemfile_with_groups/Mavenfile - spec/gemfile_with_groups/Gemfile - spec/gemfile_with_custom_source/Mavenfile - spec/gemfile_with_custom_source/Gemfile - spec/gemspec_with_prereleased_dependency/Mavenfile - spec/gemfile_without_gemspec/Mavenfile - spec/gemfile_without_gemspec/Gemfile - spec/gemfile_with_custom_source_and_custom_jarname/Mavenfile - spec/gemfile_with_custom_source_and_custom_jarname/Gemfile - spec/gemspec_include_jars/Mavenfile - spec/gemspec_with_extras/Mavenfile - spec/gemspec_with_source_and_no_jar/Mavenfile - spec/gemfile_with_extras/Mavenfile - spec/gemfile_with_extras/Gemfile - spec/pom_from_jarfile_with_exclusions/Jarfile - spec/gemfile_with_lock/Gemfile.lock - spec/gemfile_with_test_group/Gemfile.lock - spec/gemfile_with_groups_and_lockfile/Gemfile.lock - spec/gemfile_with_source/src/main/java/.keep - spec/gemspec_with_custom_source_and_custom_jarname/src/java/.keep - spec/gemfile_with_source_and_custom_jarname/src/main/java/.keep - spec/gemfile_with_source_and_no_jar/src/main/java/.keep - spec/gemspec_with_source_and_custom_jarname/src/main/java/.keep - spec/gemspec_with_custom_source/src/java/.keep - spec/gemspec_with_source/src/main/java/.keep - spec/gemfile_with_custom_source/src/java/.keep - spec/gemfile_with_custom_source_and_custom_jarname/src/java/.keep - spec/gemspec_with_source_and_no_jar/src/main/java/.keep - spec/gemfile_with_source/bouncy-castle-java.gemspec - spec/gemspec_in_profile/bouncy-castle-java.gemspec - spec/gemfile_with_lock/bouncy-castle-java.gemspec - spec/gemspec_with_prereleased_dependency_and_no_repo/bouncy-castle-java.gemspec - spec/my/my.gemspec - spec/gemspec_with_custom_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec_prerelease_snapshot/bouncy-castle-java.gemspec - spec/gemfile_with_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec_no_rubygems_repo/bouncy-castle-java.gemspec - spec/gemfile_include_jars/bouncy-castle-java.gemspec - spec/gemfile_with_source_and_no_jar/bouncy-castle-java.gemspec - spec/gemspec_with_access_to_model/bouncy-castle-java.gemspec - spec/gemfile/bouncy-castle-java.gemspec - spec/gemspec_with_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec/bouncy-castle-java.gemspec - spec/gemspec_with_custom_source/bouncy-castle-java.gemspec - spec/gemfile_with_access_to_model/bouncy-castle-java.gemspec - spec/gemspec_with_source/bouncy-castle-java.gemspec - spec/gemspec_prerelease/bouncy-castle-java.gemspec - spec/gemfile_with_custom_source/bouncy-castle-java.gemspec - spec/gemspec_with_prereleased_dependency/bouncy-castle-java.gemspec - spec/gemfile_with_custom_source_and_custom_jarname/bouncy-castle-java.gemspec - spec/gemspec_include_jars/bouncy-castle-java.gemspec - spec/gemspec_with_extras/bouncy-castle-java.gemspec - spec/gemspec_with_source_and_no_jar/bouncy-castle-java.gemspec - spec/gemfile_with_extras/bouncy-castle-java.gemspec has_rdoc: maven-tools-1.2.1/spec/dsl/gemspec_spec/jars_and_poms_include_jars.xml0000644000175000017500000000363714506273454025562 0ustar jeromejerome 4.0.0 no_group_id_given gemspec_spec 0.0.0 gemspec_spec 3.0.0 2.0.0 org.slf4j slf4j-simple 1.6.4 org.jruby jruby 1.7.16 pom org.jruby jruby 1.7.16 noasm org.jruby jruby-stdlib maven-dependency-plugin generate-test-resources copy-dependencies lib true org.jruby.maven gem-maven-plugin ${jruby.plugins.version} jars_and_poms.gemspec true true maven-tools-1.2.1/spec/dsl/gemspec_spec/jars_and_poms.xml0000644000175000017500000000250614506273454023032 0ustar jeromejerome 4.0.0 no_group_id_given gemspec_spec 0.0.0 gemspec_spec 3.0.0 2.0.0 org.slf4j slf4j-simple 1.6.4 org.jruby jruby 1.7.16 pom org.jruby jruby 1.7.16 noasm org.jruby jruby-stdlib org.jruby.maven gem-maven-plugin ${jruby.plugins.version} jars_and_poms.gemspec maven-tools-1.2.1/spec/dsl/gemspec_spec/jars_and_poms.gemspec0000644000175000017500000000136414506273454023656 0ustar jeromejerome# -*- mode:ruby -*- # -*- coding: utf-8 -*- Gem::Specification.new do |s| s.name = 'maven-tools' s.version = '123' s.summary = 'helpers for maven related tasks' s.description = 'adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc' s.homepage = 'http://github.com/torquebox/maven-tools' s.authors = ['Christian Meier'] s.email = ['m.kristian@web.de'] s.license = 'MIT' s.platform = 'java' s.requirements << 'jar org.slf4j:slf4j-simple, 1.6.4' s.requirements << 'pom org.jruby:jruby, 1.7.16' s.requirements << 'jar org.jruby:jruby, 1.7.16, noasm, [org.jruby:jruby-stdlib]' s.requirements << 'repo http://localhost/repo' end # vim: syntax=Ruby maven-tools-1.2.1/spec/dsl/gemspec_spec.rb0000644000175000017500000000336614506273454020023 0ustar jeromejeromerequire_relative '../spec_helper' require 'yaml' require 'maven/tools/dsl/gemspec' require 'maven/tools/project' require 'maven/tools/model' require 'maven/tools/dsl' require 'maven/tools/visitor' class Maven::Tools::Project include Maven::Tools::DSL end class GemspecFile def self.read( name, artifact_id ) xml = File.read( __FILE__.sub( /.rb$/, "/#{name}" ) ) xml.gsub!( /BASEDIR/, artifact_id ) xml end end describe Maven::Tools::DSL::Gemspec do let( :parent ) { Maven::Tools::Project.new( __FILE__.sub( /.rb$/, '/maven-tools.gemspec' ) ) } subject { Maven::Tools::DSL::Gemspec } it 'evals maven_tools.gemspec' do parent = Maven::Tools::Project.new subject.new parent xml = "" Maven::Tools::Visitor.new( xml ).accept_project( parent.model ) xml.must_equal( GemspecFile.read( 'maven-tools.xml', 'maven-tools' ) ) end it 'evals maven_tools.gemspec from yaml' do subject.new parent, 'maven-tools.gemspec' xml = "" Maven::Tools::Visitor.new( xml ).accept_project( parent.model ) xml.must_equal( GemspecFile.read( 'maven-tools.xml', 'gemspec_spec' ) ) end it 'evals gemspec with jar and pom dependencies' do subject.new parent, 'jars_and_poms.gemspec' xml = "" Maven::Tools::Visitor.new( xml ).accept_project( parent.model ) xml.must_equal( GemspecFile.read( 'jars_and_poms.xml', 'gemspec_spec' ) ) end it 'evals gemspec with jar and pom dependencies' do subject.new parent, :name => 'jars_and_poms.gemspec', :include_jars => true xml = "" Maven::Tools::Visitor.new( xml ).accept_project( parent.model ) xml.must_equal( GemspecFile.read( 'jars_and_poms_include_jars.xml', 'gemspec_spec' ) ) end end maven-tools-1.2.1/spec/coordinate_spec.rb0000644000175000017500000001111614506273454017735 0ustar jeromejeromerequire File.expand_path( 'spec_helper', File.dirname( __FILE__ ) ) require 'maven/tools/coordinate' class A include Maven::Tools::Coordinate end describe Maven::Tools::Coordinate do subject { A.new } it 'should convert ruby version to maven version ranges' do subject.to_version.must_equal "[0,)" subject.to_version('!=2.3.4').must_equal "(2.3.4,)" subject.to_version('!=2.3.4.rc').must_equal "(2.3.4.rc-SNAPSHOT,)" subject.to_version('=2.3.4').must_equal "[2.3.4,2.3.4.0.0.0.0.1)" subject.to_version('=2.3.4.alpha').must_equal "2.3.4.alpha" subject.to_version('~>1.8.2').must_equal "[1.8.2,1.8.99999]" subject.to_version('~>1.8.2.beta').must_equal "[1.8.2.beta-SNAPSHOT,1.8.99999]" subject.to_version('~>1.8.2.beta123.12').must_equal "[1.8.2.beta123.12-SNAPSHOT,1.8.99999]" subject.to_version('~>1.8.2.1beta').must_equal "[1.8.2.1beta-SNAPSHOT,1.8.99999]" subject.to_version('~>1.8').must_equal "[1.8,1.99999]" subject.to_version('~>0').must_equal "[0,99999]" subject.to_version('>1.2').must_equal "(1.2,)" subject.to_version('>1.2.GA').must_equal "(1.2.GA-SNAPSHOT,)" subject.to_version('<1.2').must_equal "[0,1.2)" subject.to_version('<1.2.dev').must_equal "[0,1.2.dev-SNAPSHOT)" subject.to_version('>=1.2').must_equal "[1.2,)" subject.to_version('>=1.2.gamma').must_equal "[1.2.gamma-SNAPSHOT,)" subject.to_version('<=1.2').must_equal "[0,1.2]" subject.to_version('<=1.2.pre').must_equal "[0,1.2.pre-SNAPSHOT]" subject.to_version('>=1.2', '<2.0').must_equal "[1.2,2.0)" subject.to_version('>=1.2', '<=2.0').must_equal "[1.2,2.0]" subject.to_version('>1.2', '<2.0').must_equal "(1.2,2.0)" subject.to_version('>1.2', '<=2.0').must_equal "(1.2,2.0]" end it 'should keep maven version and ranges as they are' do subject.to_version('1.2.3').must_equal "1.2.3" subject.to_version('(1,2)').must_equal "(1,2)" subject.to_version('[1,2)').must_equal "[1,2)" subject.to_version('(1,2]').must_equal "(1,2]" subject.to_version('[1,2]').must_equal "[1,2]" end it 'should keep maven snapshot version and ranges as they are' do subject.to_version('1.2.3-SNAPSHOT').must_equal "1.2.3-SNAPSHOT" subject.to_version('(1,2-SNAPSHOT)').must_equal "(1,2-SNAPSHOT)" subject.to_version('[1-SNAPSHOT,2)').must_equal "[1-SNAPSHOT,2)" subject.to_version('(1,2-SNAPSHOT]').must_equal "(1,2-SNAPSHOT]" subject.to_version('[1-SNAPSHOT,2]').must_equal "[1-SNAPSHOT,2]" end it 'should convert pom of jar deps to maven coordinate' do subject.to_coordinate('something "a:b"').must_be_nil subject.to_coordinate('#jar "a:b"').must_be_nil subject.to_coordinate('jar "a:b" # bla').must_equal "a:b:jar:[0,)" subject.to_coordinate("pom 'b:c', '!=2.3.4'").must_equal "b:c:pom:(2.3.4,)" subject.to_coordinate('jar "c:d", "2.3.4"').must_equal "c:d:jar:2.3.4" subject.to_coordinate("jar 'd:e', '~>1.8.2'").must_equal "d:e:jar:[1.8.2,1.8.99999]" subject.to_coordinate('pom "f:g", ">1.2", "<=2.0"').must_equal "f:g:pom:(1.2,2.0]" subject.to_coordinate('pom "e:f", "[1.8,1.9.9)"').must_equal "e:f:pom:[1.8,1.9.9)" subject.to_coordinate('pom "e:f", "(1.8,1.9.9)"').must_equal "e:f:pom:(1.8,1.9.9)" subject.to_coordinate('pom "e:f", "[1.8, 1.9.9]"').must_equal "e:f:pom:[1.8,1.9.9]" end it 'should support classifiers' do subject.to_coordinate('something "a:b:jdk15"').must_be_nil subject.to_coordinate('#jar "a:b:jdk15"').must_be_nil subject.to_coordinate('jar "a:b:jdk15" # bla').must_equal "a:b:jar:jdk15:[0,)" subject.to_coordinate("pom 'b:c:jdk15', '!=2.3.4'").must_equal "b:c:pom:jdk15:(2.3.4,)" subject.to_coordinate('jar "c:d:jdk15", "2.3.4"').must_equal "c:d:jar:jdk15:2.3.4" subject.to_coordinate("jar 'd:e:jdk15', '~>1.8.2'").must_equal "d:e:jar:jdk15:[1.8.2,1.8.99999]" subject.to_coordinate('pom "f:g:jdk15", ">1.2", "<=2.0"').must_equal "f:g:pom:jdk15:(1.2,2.0]" subject.to_coordinate('pom "e:f:jdk15", "[1.8,1.9.9)"').must_equal "e:f:pom:jdk15:[1.8,1.9.9)" subject.to_coordinate('pom "e:f:jdk15", "(1.8,1.9.9)"').must_equal "e:f:pom:jdk15:(1.8,1.9.9)" subject.to_coordinate('pom "e:f:jdk15", "[1.8, 1.9.9]"').must_equal "e:f:pom:jdk15:[1.8,1.9.9]" end it 'supports declarations with scope' do subject.to_split_coordinate_with_scope('jar rubygems:ruby-maven, ~> 3.1.1.0, :scope => :provided').must_equal [:provided, "rubygems", "ruby-maven", "jar", "[3.1.1.0,3.1.1.99999]"] subject.to_split_coordinate_with_scope("jar 'rubygems:ruby-maven', '~> 3.1.1.0', :scope => :test").must_equal [:test, "rubygems", "ruby-maven", "jar", "[3.1.1.0,3.1.1.99999]"] end end maven-tools-1.2.1/spec/artifact_spec.rb0000644000175000017500000001231114506273454017401 0ustar jeromejeromerequire File.expand_path( 'spec_helper', File.dirname( __FILE__ ) ) require 'maven/tools/artifact' describe Maven::Tools::Artifact do it 'should convert from coordinate' do Maven::Tools::Artifact.from_coordinate( 'sdas:das:jar:tes:123' ).to_s.must_equal 'sdas:das:jar:tes:123' Maven::Tools::Artifact.from_coordinate( 'sdas:das:jar:123' ).to_s.must_equal 'sdas:das:jar:123' Maven::Tools::Artifact.from_coordinate( 'sdas:das:jar:tes:[123,234]' ).to_s.must_equal 'sdas:das:jar:tes:[123,234]' Maven::Tools::Artifact.from_coordinate( 'sdas:das:jar:[123,234]' ).to_s.must_equal 'sdas:das:jar:[123,234]' Maven::Tools::Artifact.from_coordinate( 'sdas:das:jar:tes:123:[de:fr,gb:us]' ).to_s.must_equal 'sdas:das:jar:tes:123:[de:fr,gb:us]' Maven::Tools::Artifact.from_coordinate( 'sdas:das:jar:123:[de:fr,gb:us]' ).to_s.must_equal 'sdas:das:jar:123:[de:fr,gb:us]' Maven::Tools::Artifact.from_coordinate( 'sdas:das:jar:tes:[123,234]:[de:fr,gb:us]' ).to_s.must_equal 'sdas:das:jar:tes:[123,234]:[de:fr,gb:us]' Maven::Tools::Artifact.from_coordinate( 'sdas:das:jar:[123,234]:[de:fr,gb:us]' ).to_s.must_equal 'sdas:das:jar:[123,234]:[de:fr,gb:us]' end it 'should setup artifact' do Maven::Tools::Artifact.new( "sdas", "das", "jar", "123", "tes" ).to_s.must_equal 'sdas:das:jar:tes:123' Maven::Tools::Artifact.new( "sdas", "das", "jar", "123" ).to_s.must_equal 'sdas:das:jar:123' Maven::Tools::Artifact.new( "sdas.asd", "das", "jar", "123", ["fds:fre"] ).to_s.must_equal 'sdas.asd:das:jar:123:[fds:fre]' Maven::Tools::Artifact.new( "sdas.asd", "das", "jar","123", "bla", ["fds:fre", "ferf:de"] ).to_s.must_equal 'sdas.asd:das:jar:bla:123:[fds:fre,ferf:de]' Maven::Tools::Artifact.new( "sdas.asd", "das", "jar", "123", "blub", ["fds:fre", "ferf:de"] ).to_s.must_equal 'sdas.asd:das:jar:blub:123:[fds:fre,ferf:de]' end it 'should convert ruby version contraints - gems' do Maven::Tools::Artifact.from( :gem, 'rubygems:asd', '=1' ).to_s.must_equal 'rubygems:asd:gem:[1,1.0.0.0.0.1)' Maven::Tools::Artifact.from( :gem, 'rubygems:asd', '>=1' ).to_s.must_equal 'rubygems:asd:gem:[1,)' Maven::Tools::Artifact.from( :gem, 'rubygems:asd', '<=1' ).to_s.must_equal 'rubygems:asd:gem:[0,1]' Maven::Tools::Artifact.from( :gem, 'rubygems:asd', '>1' ).to_s.must_equal 'rubygems:asd:gem:(1,)' Maven::Tools::Artifact.from( :gem, 'rubygems:asd', '<1' ).to_s.must_equal 'rubygems:asd:gem:[0,1)' Maven::Tools::Artifact.from( :gem, 'rubygems:asd', '!=1' ).to_s.must_equal 'rubygems:asd:gem:(1,)' Maven::Tools::Artifact.from( :gem, 'rubygems:asd', '<2', '>1' ).to_s.must_equal 'rubygems:asd:gem:(1,2)' Maven::Tools::Artifact.from( :gem, 'rubygems:asd', '<=2', '>1' ).to_s.must_equal 'rubygems:asd:gem:(1,2]' Maven::Tools::Artifact.from( :gem, 'rubygems:asd', '<2', '>=1' ).to_s.must_equal 'rubygems:asd:gem:[1,2)' Maven::Tools::Artifact.from( :gem, 'rubygems:asd', '<=2', '>=1' ).to_s.must_equal 'rubygems:asd:gem:[1,2]' end it 'should convert ruby version contraints - jars' do Maven::Tools::Artifact.from( :jar, 'org.something:asd', '=1' ).to_s.must_equal 'org.something:asd:jar:[1,1.0.0.0.0.1)' Maven::Tools::Artifact.from( :jar, 'org.something:asd', '>=1' ).to_s.must_equal 'org.something:asd:jar:[1,)' Maven::Tools::Artifact.from( :jar, 'org.something:asd', '<=1' ).to_s.must_equal 'org.something:asd:jar:[0,1]' Maven::Tools::Artifact.from( :jar, 'org.something:asd', '>1' ).to_s.must_equal 'org.something:asd:jar:(1,)' Maven::Tools::Artifact.from( :jar, 'org.something:asd', '<1' ).to_s.must_equal 'org.something:asd:jar:[0,1)' Maven::Tools::Artifact.from( :jar, 'org.something:asd', '!=1' ).to_s.must_equal 'org.something:asd:jar:(1,)' Maven::Tools::Artifact.from( :jar, 'org.something:asd', '<2', '>1' ).to_s.must_equal 'org.something:asd:jar:(1,2)' Maven::Tools::Artifact.from( :jar, 'org.something:asd', '<=2', '>1' ).to_s.must_equal 'org.something:asd:jar:(1,2]' Maven::Tools::Artifact.from( :jar, 'org.something:asd', '<2', '>=1' ).to_s.must_equal 'org.something:asd:jar:[1,2)' Maven::Tools::Artifact.from( :jar, 'org.something:asd', '<=2', '>=1' ).to_s.must_equal 'org.something:asd:jar:[1,2]' end it 'passes in scope to artifact' do a = Maven::Tools::Artifact.from( :jar, 'org.something:asd', '1' ) a.to_s.must_equal 'org.something:asd:jar:1' a[ :scope ].must_be_nil a = Maven::Tools::Artifact.from( :jar, 'org.something:asd', '1', :scope => :provided ) a.to_s.must_equal 'org.something:asd:jar:1' a[ :scope ].must_equal :provided end it 'passes in exclusions to artifact' do a = Maven::Tools::Artifact.from( :jar, 'org.something:asd', '1' ) a.to_s.must_equal 'org.something:asd:jar:1' a[ :exclusions ].must_be_nil a = Maven::Tools::Artifact.from( :jar, 'org.something:asd', '1', :exclusions => ["org.something:dsa"] ) a.to_s.must_equal 'org.something:asd:jar:1:[org.something:dsa]' a[ :exclusions ].must_equal [ 'org.something:dsa' ] a = Maven::Tools::Artifact.from( :jar, 'org.something:asd', '1', :exclusions => ["org.something:dsa", "org.anything:qwe"] ) a.to_s.must_equal 'org.something:asd:jar:1:[org.something:dsa,org.anything:qwe]' a[ :exclusions ].must_equal [ 'org.something:dsa', 'org.anything:qwe' ] end end maven-tools-1.2.1/maven-tools.gemspec0000644000175000017500000000242714506273454017133 0ustar jeromejerome# -*- mode:ruby -*- # -*- coding: utf-8 -*- require File.expand_path('lib/maven/tools/version.rb') Gem::Specification.new do |s| s.name = 'maven-tools' s.version = Maven::Tools::VERSION.dup s.summary = 'helpers for maven related tasks' s.description = 'adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc' s.homepage = 'http://github.com/torquebox/maven-tools' s.authors = ['Christian Meier'] s.email = ['m.kristian@web.de'] s.license = 'MIT' s.files += Dir['*.gemspec'] s.files += Dir['*file'] s.files += Dir['lib/**/*rb'] s.files += Dir['spec/**/*rb'] s.files += Dir['MIT-LICENSE'] + Dir['*.md'] s.test_files += Dir['spec/**/*.rb'] s.test_files += Dir['spec/**/*.java'] s.test_files += Dir['spec/**/*.xml'] s.test_files += Dir['spec/**/*file'] s.test_files += Dir['spec/**/*.lock'] s.test_files += Dir['spec/**/.keep'] s.test_files += Dir['spec/**/*gemspec'] s.test_files += Dir['spec/**/*gem'] s.add_runtime_dependency 'virtus', '~> 1.0' # get them out from here until jruby-maven-plugin installs test gems somewhere else then runtime gems s.add_development_dependency 'rake', '~> 10.0' s.add_development_dependency 'minitest', '~> 5.3' end # vim: syntax=Ruby maven-tools-1.2.1/lib/0000755000175000017500000000000014506273454014063 5ustar jeromejeromemaven-tools-1.2.1/lib/maven_tools.rb0000644000175000017500000000214614506273454016741 0ustar jeromejerome# # Copyright (C) 2013 Christian Meier # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # require 'maven/tools/jarfile' maven-tools-1.2.1/lib/maven/0000755000175000017500000000000014506273454015171 5ustar jeromejeromemaven-tools-1.2.1/lib/maven/tools/0000755000175000017500000000000014506273454016331 5ustar jeromejeromemaven-tools-1.2.1/lib/maven/tools/visitor.rb0000644000175000017500000001024014506273454020352 0ustar jeromejeromemodule Maven module Tools class Visitor def initialize( io = STDOUT ) @io = io end def indent @indent ||= '' end def inc @indent = @indent + ' ' end def dec @indent = @indent[ 0..-3 ] end def start_raw_tag( name, attr = {} ) @io << "#{indent}<#{name}" attr.each do |k,v| @io << "\n" vv = v.gsub( /"/, '"' ) @io << "#{indent} #{k.to_s[1..-1]}=\"#{vv}\"" end @io << ">\n" inc end def end_raw_tag( name ) dec @io << "#{indent}\n" end def start_tag( name, attr = {} ) start_raw_tag( camel_case_lower( name ), attr ) end def end_tag( name ) end_raw_tag( camel_case_lower( name ) ) end def tag( name, value ) if value != nil if value.respond_to? :to_xml @io << "#{indent}#{value.to_xml}\n" else name = camel_case_lower( name ) @io << "#{indent}<#{name}>#{escape_value( value )}\n" end end end def raw_tag( name, value ) unless value.nil? @io << "#{indent}<#{name}>#{escape_value( value )}\n" end end def camel_case_lower( str ) str = str.to_s str.split( '_' ).inject([]) do |buffer, e| buffer.push( buffer.empty? ? e : e.capitalize ) end.join end def accept_project( project ) accept( 'project', project ) @io.close if @io.respond_to? :close nil end def accept( name, model ) if model start_tag( name ) visit( model ) end_tag( name ) end end def accept_array( name, array ) unless array.empty? start_tag( name ) n = name.to_s.sub( /ies$/, 'y' ).sub( /s$/, '' ) case array.first when Maven::Tools::Base array.each do |i| start_tag( n ) visit( i ) end_tag( n ) end when Hash array.each do |i| accept_hash( n, i ) end else array.each do |i| tag( n, i ) end end end_tag( name ) end end def accept_raw_hash( name, hash ) unless hash.empty? attr = hash.select do |k, v| [ k, v ] if k.to_s.match( /^@/ ) end start_tag( name, attr ) hash.each do |k, v| case v when Array accept_array( k, v ) else raw_tag( k, v ) unless k.to_s.match( /^@/ ) end end end_tag( name ) end end def accept_hash( name, hash ) unless hash.empty? attr = hash.select do |k, v| [ k, v ] if k.to_s.match( /^@/ ) end # workaround error with :configuration => :gems => { ... } method = name == :gems ? :raw_tag : :tag start_tag( name, attr ) hash.each do |k, v| case v when Array accept_array( k, v ) when Hash accept_hash( k, v ) else send( method, k, v ) unless k.to_s.match( /^@/ ) end end end_tag( name ) end end def escape_value( value ) value = value.to_s.dup value.gsub!( /&/, '&' ) # undo double quote, somehow xyz.gemspec.rz have encoded values value.gsub!( /&(amp|lt|gt);/, '&\1;' ) value.gsub!( //, '>' ) value end def visit( model ) model.attributes.each do |k, v| if k == :properties accept_raw_hash( k, v ) else case v when Base accept( k, v ) when Array accept_array( k, v ) when Hash accept_hash( k, v ) else tag( k, v ) end end end end end end end maven-tools-1.2.1/lib/maven/tools/versions.rb0000644000175000017500000000272014506273454020527 0ustar jeromejerome# # Copyright (C) 2013 Christian Meier # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # module Maven module Tools unless defined? VERSIONS VERSIONS = { :jar_plugin => "2.4", :clean_plugin => "2.4", :jruby_plugins => "3.0.0", :jruby9_plugins => "0.3.0", :bundler_version => "1.10.6", :jruby_version => "9.1.2.0", :polyglot_version => "0.1.18", :mavengem_wagon => "2.0.0" }.freeze end end end maven-tools-1.2.1/lib/maven/tools/version.rb0000644000175000017500000000221314506273454020341 0ustar jeromejerome# # Copyright (C) 2013 Christian Meier # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # module Maven module Tools VERSION = '1.2.1'.freeze end end maven-tools-1.2.1/lib/maven/tools/project.rb0000644000175000017500000000355614506273454020335 0ustar jeromejerome# # Copyright (C) 2014 Christian Meier # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # require 'maven/tools/dsl/jruby_dsl' require 'maven/tools/dsl/dependency_dsl' module Maven module Tools class Project attr_reader :model, :basedir, :current def initialize( source = nil ) @source = source if @source @basedir ||= ::File.directory?( @source ) ? @source : ::File.dirname( ::File.expand_path( @source ) ) end @basedir ||= ::File.expand_path( '.' ) @model = Model.new @model.model_version = '4.0.0' @model.name = ::File.basename( @basedir ) @model.group_id = 'no_group_id_given' @model.artifact_id = model.name @model.version = '0.0.0' @current = @model # TODO remove once legacy code is gone @context = :project end end end end maven-tools-1.2.1/lib/maven/tools/pom.rb0000644000175000017500000000671714506273454017464 0ustar jeromejerome# # Copyright (C) 2013 Christian Meier # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # require 'fileutils' require 'maven/tools/model' require 'maven/tools/dsl' require 'maven/tools/visitor' require 'rubygems/specification' module Maven module Tools class POM include Maven::Tools::DSL def eval_spec( s, snapshot ) @model = tesla do gemspec s, :snapshot => snapshot, :no_rubygems_repo => true end end def eval_file( file ) if file && ::File.directory?( file ) dir = file file = nil else dir = '.' end unless file file = pom_file( 'pom.rb', dir ) file ||= pom_file( 'Mavenfile', dir ) file ||= pom_file( 'Gemfile', dir ) #file ||= pom_file( 'Jarfile', dir ) file ||= pom_file( '*.gemspec', dir ) end if file FileUtils.cd( dir ) do @model = to_model( ::File.basename( file ) ) end end end def initialize( file = nil, snapshot = false ) if file.is_a? Gem::Specification eval_spec( file, snapshot ) else eval_file( file ) end end def pom_file( pom, dir = '.' ) files = Dir[ ::File.join( dir, pom ) ] case files.size when 0 when 1 files.first else warn 'more than one pom file found' end end def to_s if @model io = String.new v = ::Maven::Tools::Visitor.new( io ) v.accept_project( @model ) io end end def to_file( file ) if @model v = ::Maven::Tools::Visitor.new( ::File.open( file, 'w' ) ) v.accept_project( @model ) true end end def to_model( file ) if ::File.exists?( file ) case file when /pom.rb/ eval_pom( "tesla do\n#{ ::File.read( file ) }\nend", file ) when /(Maven|Gem|Jar)file/ eval_pom( "tesla do\n#{ ::File.read( file ) }\nend", file ) when /.+\.gemspec/ eval_pom( "tesla do\ngemspec( '#{ ::File.basename( file ) }' )\nend", file ) end else eval_pom( "tesla do\n#{file}\nend", nil ) end rescue ArgumentError => e warn 'fallback to old maven model' puts e.message puts e.backtrace.join("\n\t") raise 'TODO old maven model' end end end end maven-tools-1.2.1/lib/maven/tools/model.rb0000644000175000017500000002166514506273454017770 0ustar jeromejeromerequire 'virtus' # keep things in line with java collections class Array def remove( *args ) delete( *args ) end end module Maven module Tools Base = Virtus.model module GAV def self.included( base ) base.attribute :group_id, String base.attribute :artifact_id, String base.attribute :version, String end end module GA def self.included( base ) base.attribute :group_id, String base.attribute :artifact_id, String end end module SU def self.included( base ) base.attribute :system, String base.attribute :url, String end end module NU def self.included( base ) base.attribute :name, String base.attribute :url, String end end module INU def self.included( base ) base.attribute :id, String base.attribute :name, String base.attribute :url, String end end class Parent include Base include GAV attribute :relative_path, String end class Organization include Base include NU end class License include Base include NU attribute :distribution, String attribute :comments, String end class Developer include Base include INU attribute :email, String attribute :organization, String attribute :organization_url, String attribute :roles, String attribute :timezone, String attribute :properties, Hash end class Contributor include Base include NU attribute :email, String attribute :organization, String attribute :organization_url, String attribute :roles, String attribute :timezone, String attribute :properties, Hash end class MailingList include Base attribute :name, String attribute :subscribe, String attribute :unsubscribe, String attribute :post, String attribute :archive, String attribute :other_archives, Array[ String ] def archives=( archives ) self.archive = archives.shift self.other_archives = archives end end class Prerequisites include Base attribute :maven, String end class Scm include Base attribute :connection, String attribute :developer_connection, String attribute :tag, String attribute :url, String end class IssueManagement include Base include SU end class Notifier include Base attribute :type, String attribute :send_on_error, Boolean attribute :send_on_failure, Boolean attribute :send_on_success, Boolean attribute :send_on_warning, Boolean attribute :address, String attribute :configuration, Hash end class CiManagement include Base include SU attribute :notifiers, Array[ Notifier ] end class Site include Base include INU end class Relocation include Base include GAV attribute :message, String end class RepositoryPolicy include Base attribute :enabled, Boolean attribute :update_policy, String attribute :checksum_policy, String end class Repository include Base attribute :releases, RepositoryPolicy attribute :snapshots, RepositoryPolicy include INU attribute :layout, String end class PluginRepository < Repository; end class DeploymentRepository < Repository; end class DistributionManagement include Base attribute :repository, Repository attribute :snapshot_repository, Repository attribute :site, Site attribute :download_url, String attribute :status, String attribute :relocation, Relocation end class Exclusion include Base include GA end class Dependency include Base include GAV attribute :type, String attribute :classifier, String attribute :scope, String attribute :system_path, String attribute :exclusions, Array[ Exclusion ] attribute :optional, Boolean # silent default def type=( t ) if t.to_sym == :jar @type = nil else @type = t end end end class DependencyManagement include Base attribute :dependencies, Array[ Dependency ] end class Extension include Base include GAV end class Resource include Base attribute :target_path, String attribute :filtering, String attribute :directory, String attribute :includes, Array[ String ] attribute :excludes, Array[ String ] end class Execution include Base attribute :id, String attribute :phase, String attribute :goals, Array[ String ] attribute :inherited, Boolean attribute :configuration, Hash end class Plugin include Base include GAV attribute :extensions, Boolean attribute :executions, Array[ Execution ] attribute :dependencies, Array[ Dependency ] attribute :goals, Array[ String ] attribute :inherited, Boolean attribute :configuration, Hash # silent default def group_id=( v ) if v.to_s == 'org.apache.maven.plugins' @group_id = nil else @group_id = v end end end class PluginManagement include Base attribute :plugins, Array[ Plugin ] end class ReportSet include Base attribute :id, String attribute :reports, Array[ String ] attribute :inherited, Boolean attribute :configuration, Hash end class ReportPlugin include Base include GAV attribute :report_sets, Array[ ReportSet ] end class Reporting include Base attribute :exclude_defaults, Boolean attribute :output_directory, String attribute :plugins, Array[ ReportPlugin ] end class Build include Base attribute :source_directory, String attribute :script_source_directory, String attribute :test_source_directory, String attribute :output_directory, String attribute :test_output_directory, String attribute :extensions, Array[ Extension ] attribute :default_goal, String attribute :resources, Array[ Resource ] attribute :test_resources, Array[ Resource ] attribute :directory, String attribute :final_name, String attribute :filters, Array[ String ] attribute :plugin_management, PluginManagement attribute :plugins, Array[ Plugin ] end class ActivationOS include Base attribute :name, String attribute :family, String attribute :arch, String attribute :version, String end class ActivationProperty include Base attribute :name, String attribute :value, String end class ActivationFile include Base attribute :missing, String attribute :exists, String end class Activation include Base attribute :active_by_default, Boolean attribute :jdk, String attribute :os, ActivationOS attribute :property, ActivationProperty attribute :file, ActivationFile end class Profile include Base attribute :id, String attribute :activation, Activation attribute :build, Build attribute :modules, Array[ String ] attribute :distribution_management, DistributionManagement attribute :properties, Hash attribute :dependency_management, DependencyManagement attribute :dependencies, Array[ Dependency ] attribute :repositories, Array[ Repository ] attribute :plugin_repositories, Array[ PluginRepository ] attribute :reporting, Reporting end class Model include Base attribute :model_version, String attribute :parent, Parent include GAV attribute :packaging, String include NU attribute :description, String attribute :inception_year, String attribute :organization, Organization attribute :licenses, Array[ License ] attribute :developers, Array[ Developer ] attribute :contributors, Array[ Contributor ] attribute :mailing_lists, Array[ MailingList ] attribute :prerequisites, Prerequisites attribute :modules, Array[ String ] attribute :scm, Scm attribute :issue_management, IssueManagement attribute :ci_management, CiManagement attribute :distribution_management, DistributionManagement attribute :properties, Hash attribute :dependency_management, DependencyManagement attribute :dependencies, Array[ Dependency ] attribute :repositories, Array[ Repository ] attribute :plugin_repositories, Array[ PluginRepository ] attribute :build, Build attribute :reporting, Reporting attribute :profiles, Array[ Profile ] end end end maven-tools-1.2.1/lib/maven/tools/licenses.rb0000644000175000017500000002523214506273454020467 0ustar jeromejeromerequire 'ostruct' module Maven module Tools LICENSES = {} LICENSES[ "afl-3.0" ] = OpenStruct.new :short => "AFL-3.0", :name => "Academic Free License 3.0", :url => "http://opensource.org/licenses/AFL-3.0" LICENSES[ "agpl-3.0" ] = OpenStruct.new :short => "AGPL-3.0", :name => "GNU Affero General Public License 3.0", :url => "http://opensource.org/licenses/AGPL-3.0" LICENSES[ "apl-1.0" ] = OpenStruct.new :short => "APL-1.0", :name => "Adaptive Public License", :url => "http://opensource.org/licenses/APL-1.0" LICENSES[ "apache-2.0" ] = OpenStruct.new :short => "Apache-2.0", :name => "Apache License 2.0", :url => "http://opensource.org/licenses/Apache-2.0" LICENSES[ "apsl-2.0" ] = OpenStruct.new :short => "APSL-2.0", :name => "Apple Public Source License", :url => "http://opensource.org/licenses/APSL-2.0" LICENSES[ "artistic-2.0" ] = OpenStruct.new :short => "Artistic-2.0", :name => "Artistic license 2.0", :url => "http://opensource.org/licenses/Artistic-2.0" LICENSES[ "aal" ] = OpenStruct.new :short => "AAL", :name => "Attribution Assurance Licenses", :url => "http://opensource.org/licenses/AAL" LICENSES[ "bsd-3-clause" ] = OpenStruct.new :short => "BSD-3-Clause", :name => "BSD 3-Clause \"New\" or \"Revised\" License", :url => "http://opensource.org/licenses/BSD-3-Clause" LICENSES[ "bsd-2-clause" ] = OpenStruct.new :short => "BSD-2-Clause", :name => "BSD 2-Clause \"Simplified\" or \"FreeBSD\" License", :url => "http://opensource.org/licenses/BSD-2-Clause" LICENSES[ "bsl-1.0" ] = OpenStruct.new :short => "BSL-1.0", :name => "Boost Software License", :url => "http://opensource.org/licenses/BSL-1.0" LICENSES[ "cecill-2.1" ] = OpenStruct.new :short => "CECILL-2.1", :name => "CeCILL License 2.1", :url => "http://opensource.org/licenses/CECILL-2.1" LICENSES[ "catosl-1.1" ] = OpenStruct.new :short => "CATOSL-1.1", :name => "Computer Associates Trusted Open Source License 1.1", :url => "http://opensource.org/licenses/CATOSL-1.1" LICENSES[ "cddl-1.0" ] = OpenStruct.new :short => "CDDL-1.0", :name => "Common Development and Distribution License 1.0", :url => "http://opensource.org/licenses/CDDL-1.0" LICENSES[ "cpal-1.0" ] = OpenStruct.new :short => "CPAL-1.0", :name => "Common Public Attribution License 1.0", :url => "http://opensource.org/licenses/CPAL-1.0" LICENSES[ "cua-opl-1.0" ] = OpenStruct.new :short => "CUA-OPL-1.0", :name => "CUA Office Public License Version 1.0", :url => "http://opensource.org/licenses/CUA-OPL-1.0" LICENSES[ "eudatagrid" ] = OpenStruct.new :short => "EUDatagrid", :name => "EU DataGrid Software License", :url => "http://opensource.org/licenses/EUDatagrid" LICENSES[ "epl-1.0" ] = OpenStruct.new :short => "EPL-1.0", :name => "Eclipse Public License 1.0", :url => "http://opensource.org/licenses/EPL-1.0" LICENSES[ "ecl-2.0" ] = OpenStruct.new :short => "ECL-2.0", :name => "Educational Community License, Version 2.0", :url => "http://opensource.org/licenses/ECL-2.0" LICENSES[ "efl-2.0" ] = OpenStruct.new :short => "EFL-2.0", :name => "Eiffel Forum License V2.0", :url => "http://opensource.org/licenses/EFL-2.0" LICENSES[ "entessa" ] = OpenStruct.new :short => "Entessa", :name => "Entessa Public License", :url => "http://opensource.org/licenses/Entessa" LICENSES[ "eupl-1.1" ] = OpenStruct.new :short => "EUPL-1.1", :name => "European Union Public License, Version 1.1", :url => "http://opensource.org/licenses/EUPL-1.1" LICENSES[ "fair" ] = OpenStruct.new :short => "Fair", :name => "Fair License", :url => "http://opensource.org/licenses/Fair" LICENSES[ "frameworx-1.0" ] = OpenStruct.new :short => "Frameworx-1.0", :name => "Frameworx License", :url => "http://opensource.org/licenses/Frameworx-1.0" LICENSES[ "agpl-3.0" ] = OpenStruct.new :short => "AGPL-3.0", :name => "GNU Affero General Public License v3", :url => "http://opensource.org/licenses/AGPL-3.0" LICENSES[ "gpl-2.0" ] = OpenStruct.new :short => "GPL-2.0", :name => "GNU General Public License version 2.0", :url => "http://opensource.org/licenses/GPL-2.0" LICENSES[ "gpl-3.0" ] = OpenStruct.new :short => "GPL-3.0", :name => "GNU General Public License version 3.0", :url => "http://opensource.org/licenses/GPL-3.0" LICENSES[ "lgpl-2.1" ] = OpenStruct.new :short => "LGPL-2.1", :name => "GNU Library or \"Lesser\" General Public License version 2.1", :url => "http://opensource.org/licenses/LGPL-2.1" LICENSES[ "lgpl-3.0" ] = OpenStruct.new :short => "LGPL-3.0", :name => "GNU Library or \"Lesser\" General Public License version 3.0", :url => "http://opensource.org/licenses/LGPL-3.0" LICENSES[ "hpnd" ] = OpenStruct.new :short => "HPND", :name => "Historical Permission Notice and Disclaimer", :url => "http://opensource.org/licenses/HPND" LICENSES[ "ipl-1.0" ] = OpenStruct.new :short => "IPL-1.0", :name => "IBM Public License 1.0", :url => "http://opensource.org/licenses/IPL-1.0" LICENSES[ "ipa" ] = OpenStruct.new :short => "IPA", :name => "IPA Font License", :url => "http://opensource.org/licenses/IPA" LICENSES[ "isc" ] = OpenStruct.new :short => "ISC", :name => "ISC License", :url => "http://opensource.org/licenses/ISC" LICENSES[ "lppl-1.3c" ] = OpenStruct.new :short => "LPPL-1.3c", :name => "LaTeX Project Public License 1.3c", :url => "http://opensource.org/licenses/LPPL-1.3c" LICENSES[ "lpl-1.02" ] = OpenStruct.new :short => "LPL-1.02", :name => "Lucent Public License Version 1.02", :url => "http://opensource.org/licenses/LPL-1.02" LICENSES[ "miros" ] = OpenStruct.new :short => "MirOS", :name => "MirOS Licence", :url => "http://opensource.org/licenses/MirOS" LICENSES[ "ms-pl" ] = OpenStruct.new :short => "MS-PL", :name => "Microsoft Public License", :url => "http://opensource.org/licenses/MS-PL" LICENSES[ "ms-rl" ] = OpenStruct.new :short => "MS-RL", :name => "Microsoft Reciprocal License", :url => "http://opensource.org/licenses/MS-RL" LICENSES[ "mit" ] = OpenStruct.new :short => "MIT", :name => "MIT license", :url => "http://opensource.org/licenses/MIT" LICENSES[ "motosoto" ] = OpenStruct.new :short => "Motosoto", :name => "Motosoto License", :url => "http://opensource.org/licenses/Motosoto" LICENSES[ "mpl-2.0" ] = OpenStruct.new :short => "MPL-2.0", :name => "Mozilla Public License 2.0", :url => "http://opensource.org/licenses/MPL-2.0" LICENSES[ "multics" ] = OpenStruct.new :short => "Multics", :name => "Multics License", :url => "http://opensource.org/licenses/Multics" LICENSES[ "nasa-1.3" ] = OpenStruct.new :short => "NASA-1.3", :name => "NASA Open Source Agreement 1.3", :url => "http://opensource.org/licenses/NASA-1.3" LICENSES[ "ntp" ] = OpenStruct.new :short => "NTP", :name => "NTP License", :url => "http://opensource.org/licenses/NTP" LICENSES[ "naumen" ] = OpenStruct.new :short => "Naumen", :name => "Naumen Public License", :url => "http://opensource.org/licenses/Naumen" LICENSES[ "ngpl" ] = OpenStruct.new :short => "NGPL", :name => "Nethack General Public License", :url => "http://opensource.org/licenses/NGPL" LICENSES[ "nokia" ] = OpenStruct.new :short => "Nokia", :name => "Nokia Open Source License", :url => "http://opensource.org/licenses/Nokia" LICENSES[ "nposl-3.0" ] = OpenStruct.new :short => "NPOSL-3.0", :name => "Non-Profit Open Software License 3.0", :url => "http://opensource.org/licenses/NPOSL-3.0" LICENSES[ "oclc-2.0" ] = OpenStruct.new :short => "OCLC-2.0", :name => "OCLC Research Public License 2.0", :url => "http://opensource.org/licenses/OCLC-2.0" LICENSES[ "ofl-1.1" ] = OpenStruct.new :short => "OFL-1.1", :name => "Open Font License 1.1", :url => "http://opensource.org/licenses/OFL-1.1" LICENSES[ "ogtsl" ] = OpenStruct.new :short => "OGTSL", :name => "Open Group Test Suite License", :url => "http://opensource.org/licenses/OGTSL" LICENSES[ "osl-3.0" ] = OpenStruct.new :short => "OSL-3.0", :name => "Open Software License 3.0", :url => "http://opensource.org/licenses/OSL-3.0" LICENSES[ "php-3.0" ] = OpenStruct.new :short => "PHP-3.0", :name => "PHP License 3.0", :url => "http://opensource.org/licenses/PHP-3.0" LICENSES[ "postgresql" ] = OpenStruct.new :short => "PostgreSQL", :name => "The PostgreSQL License", :url => "http://opensource.org/licenses/PostgreSQL" LICENSES[ "python-2.0" ] = OpenStruct.new :short => "Python-2.0", :name => "Python License", :url => "http://opensource.org/licenses/Python-2.0" LICENSES[ "cnri-python" ] = OpenStruct.new :short => "CNRI-Python", :name => "CNRI Python license", :url => "http://opensource.org/licenses/CNRI-Python" LICENSES[ "qpl-1.0" ] = OpenStruct.new :short => "QPL-1.0", :name => "Q Public License", :url => "http://opensource.org/licenses/QPL-1.0" LICENSES[ "rpsl-1.0" ] = OpenStruct.new :short => "RPSL-1.0", :name => "RealNetworks Public Source License V1.0", :url => "http://opensource.org/licenses/RPSL-1.0" LICENSES[ "rpl-1.5" ] = OpenStruct.new :short => "RPL-1.5", :name => "Reciprocal Public License 1.5", :url => "http://opensource.org/licenses/RPL-1.5" LICENSES[ "rscpl" ] = OpenStruct.new :short => "RSCPL", :name => "Ricoh Source Code Public License", :url => "http://opensource.org/licenses/RSCPL" LICENSES[ "simpl-2.0" ] = OpenStruct.new :short => "SimPL-2.0", :name => "Simple Public License 2.0", :url => "http://opensource.org/licenses/SimPL-2.0" LICENSES[ "sleepycat" ] = OpenStruct.new :short => "Sleepycat", :name => "Sleepycat License", :url => "http://opensource.org/licenses/Sleepycat" LICENSES[ "spl-1.0" ] = OpenStruct.new :short => "SPL-1.0", :name => "Sun Public License 1.0", :url => "http://opensource.org/licenses/SPL-1.0" LICENSES[ "watcom-1.0" ] = OpenStruct.new :short => "Watcom-1.0", :name => "Sybase Open Watcom Public License 1.0", :url => "http://opensource.org/licenses/Watcom-1.0" LICENSES[ "ncsa" ] = OpenStruct.new :short => "NCSA", :name => "University of Illinois/NCSA Open Source License", :url => "http://opensource.org/licenses/NCSA" LICENSES[ "vsl-1.0" ] = OpenStruct.new :short => "VSL-1.0", :name => "Vovida Software License v. 1.0", :url => "http://opensource.org/licenses/VSL-1.0" LICENSES[ "w3c" ] = OpenStruct.new :short => "W3C", :name => "W3C License", :url => "http://opensource.org/licenses/W3C" LICENSES[ "wxwindows" ] = OpenStruct.new :short => "WXwindows", :name => "wxWindows Library License", :url => "http://opensource.org/licenses/WXwindows" LICENSES[ "xnet" ] = OpenStruct.new :short => "Xnet", :name => "X.Net License", :url => "http://opensource.org/licenses/Xnet" LICENSES[ "zpl-2.0" ] = OpenStruct.new :short => "ZPL-2.0", :name => "Zope Public License 2.0", :url => "http://opensource.org/licenses/ZPL-2.0" LICENSES[ "zlib" ] = OpenStruct.new :short => "Zlib", :name => "zlib/libpng license", :url => "http://opensource.org/licenses/Zlib" LICENSES.freeze end end maven-tools-1.2.1/lib/maven/tools/jarfile.rb0000644000175000017500000001463114506273454020277 0ustar jeromejerome# # Copyright (C) 2013 Christian Meier # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # require ::File.join(::File.dirname(__FILE__), 'coordinate.rb') require ::File.join(::File.dirname(__FILE__), 'artifact.rb') require 'fileutils' require 'delegate' require 'maven/tools/dsl/jarfile' module Maven module Tools class Jarfile include Coordinate def initialize(file = 'Jarfile') @file = file @lockfile = file + ".lock" end attr_reader :file def mtime ::File.mtime(@file) end def exists? ::File.exists?(@file) end def mtime_lock ::File.mtime(@lockfile) end def exists_lock? ::File.exists?(@lockfile) end def load_lockfile _locked = [] if exists_lock? ::File.read(@lockfile).each_line do |line| line.strip! if line.size > 0 && !(line =~ /^\s*#/) _locked << line end end end _locked end def locked @locked ||= load_lockfile end def locked?(coordinate) coord = coordinate.sub(/^([^:]+:[^:]+):.+/) { $1 } locked.detect { |l| l.sub(/^([^:]+:[^:]+):.+/) { $1 } == coord } != nil end class DSL include Coordinate def self.eval_file( file ) jarfile = self.new jarfile.eval_file( file ) end def eval_file( file ) warn "#{self.class} is deprecated" if ::File.exists?( file ) eval( ::File.read( file ), nil, file ) self end end def artifacts @artifacts ||= [] end def repositories @repositories ||= [] end def snapshot_repositories @snapshot_repositories ||= [] end def local( path ) artifacts << Artifact.new_local( ::File.expand_path( path ), :jar ) end def jar( *args ) a = Artifact.from( :jar, *args ) a[ :scope ] = @scope if @scope artifacts << a a end def pom( *args ) a = Artifact.from( :pom, *args ) a[ :scope ] = @scope if @scope artifacts << a a end def snapshot_repository( name, url = nil ) if url.nil? url = name end snapshot_repositories << { :name => name.to_s, :url => url } end def repository( name, url = nil ) if url.nil? url = name end repositories << { :name => name.to_s, :url => url } end alias :source :repository # TODO add flag to use repacked asm def jruby( version = nil, no_asm = false ) if version @jruby = version @jruby += '-no_asm' if no_asm end @scope = :provided yield if block_given? @jruby ensure @scope = nil end def scope( scope ) @scope = scope yield if block_given? ensure @scope = nil end end class LockedParent < SimpleDelegator def initialize(obj) super end def dependencies @d ||= [] end end def setup_unlocked( parent ) warn 'DEPRECATED use Maven::Tools::DSL::Jarfile instead' Maven::Tools::DSL::Jarfile.new( parent, @file ) end def setup_locked( parent ) warn 'DEPRECATED use Maven::Tools::DSL::Jarfile instead' Maven::Tools::DSL::Jarfile.new( LockedParent.new( parent ), @file ) end def populate_unlocked( container = nil, &block ) warn 'DEPRECATED use Maven::Tools::DSL::Jarfile instead' if ::File.exists?(@file) dsl = Maven::Tools::DSL::Jarfile.new( nil, @file ) if block block.call( dsl ) end # TODO all that container stuff needs to go into jbundler !!! if container dsl.artifacts.each do |a| if path = a[ :system_path ] container.add_local_jar( path ) elsif not locked?( coord = a.to_coordinate ) if exclusions = a.exclusions container.add_artifact_with_exclusions( coord, exclusions ) else container.add_artifact( coord ) end end end dsl.repositories.each do |repo| container.add_repository( repo[ :name ] || repo[ 'name' ], repo[ :url ] || repo[ 'url' ] ) end dsl.snapshot_repositories.each do |repo| container.add_snapshot_repository( repo[ :name ] || repo[ 'name' ], repo[ :url ] || repo[ 'url' ] ) end end end end def populate_locked(container) locked.each { |l| container.add_artifact(l) } end def generate_lockfile(dependency_coordinates) if dependency_coordinates.empty? FileUtils.rm_f(@lockfile) if exists_lock? else ::File.open(@lockfile, 'w') do |f| dependency_coordinates.each do |d| f.puts d.to_s unless d.to_s =~ /^ruby.bundler:/ end end end end end end end maven-tools-1.2.1/lib/maven/tools/gemspec_dependencies.rb0000644000175000017500000000327214506273454023013 0ustar jeromejeromerequire 'maven/tools/coordinate' module Maven module Tools class GemspecDependencies def initialize( gemspec ) if gemspec.is_a? String warn 'DEPRECATED use Maven::Tools::DSL::Gemspec instead' @spec = Gem::Specification.load( gemspec ) else @spec = gemspec end _setup end def java_runtime warn 'deprecated us java_dependency_artifacts instead' _deps( :java ).select { |d| d[0] == :compile }.collect { |d| d[ 1..-1] } end def java_dependencies warn 'deprecated us java_dependency_artifacts instead' _deps( :java ) end def java_dependency_artifacts _deps( :java ).collect do |d| scope = d.shift d += [nil, nil, { :scope => scope } ][ (d.size - 4 )..2 ] Maven::Tools::Artifact.new( *d ) end end def runtime _deps( :runtime ) end def development _deps( :development ) end private include Coordinate def _deps( type ) @deps ||= {} @deps[ type ] ||= [] end def _setup @spec.dependencies.each do |dep| versions = dep.requirement.requirements.collect do |req| # use this construct to get the same result in 1.8.x and 1.9.x req.collect{ |i| i.to_s }.join end _deps( dep.type ) << "rubygems:#{dep.name}:#{to_version( *versions )}" end @spec.requirements.each do |req| coord = to_split_coordinate_with_scope(req.sub(/#.*^/, '')) if coord && coord.size > 1 _deps( :java ) << coord end end end end end end maven-tools-1.2.1/lib/maven/tools/gemfile_lock.rb0000644000175000017500000000567514506273454021313 0ustar jeromejerome# # Copyright (C) 2013 Christian Meier # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # module Maven module Tools class GemfileLock < Hash class Dependency attr_accessor :name, :version, :dependencies def initialize(line, deps = {}) @name = line.sub(/\ .*/,'') @version = line.sub(/.*\(/, '').sub(/\).*/, '').sub(/-java$/, '') @dependencies = deps end def add(line) dependencies[line.sub(/\ .*/,'')] = line.sub(/.*\(/, '').sub(/\).*/, '') end end def initialize(file) super() current = nil bundler = false f = file.is_a?(File) ? file.path: file if File.exists? f File.readlines(f).each do |line| if line =~ /^BUNDLED WITH/ bundler = true elsif bundler line.strip! current = Dependency.new("bundler (#{line})") self[current.name] = current elsif line =~ /^ [^ ]/ line.strip! current = Dependency.new(line) self[current.name] = current elsif line =~ /^ [^ ]/ line.strip! current.add(line) if current end end end end def recurse(result, dep) if d = self[dep] result[dep] = d.version if !result.key?(dep) d.dependencies.each do |name, version| unless result.key? name if name != 'bundler' result[name] = self[name].nil?? version : self[name].version recurse(result, name) end end end end end def dependency_hull(deps = []) deps = deps.is_a?(Array) ? deps : [deps] result = {} deps.each do |dep| recurse(result, dep) end result end def hull dependency_hull(keys) end end end end maven-tools-1.2.1/lib/maven/tools/dsl/0000755000175000017500000000000014506273454017113 5ustar jeromejeromemaven-tools-1.2.1/lib/maven/tools/dsl/project_gemspec.rb0000644000175000017500000000634214506273454022616 0ustar jeromejerome# # Copyright (C) 2014 Christian Meier # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # require 'maven/tools/dsl/gemspec' require 'maven/tools/dsl/gem_support' require 'maven/tools/licenses' module Maven module Tools module DSL class ProjectGemspec < Gemspec include GemSupport def process( spec, name, options ) @parent.build.directory = '${basedir}/pkg' version = spec.version.to_s if spec.version.prerelease? && options[ :snapshot ] != false && ! version.end_with?( '-SNAPSHOT' ) version += '-SNAPSHOT' end @parent.id "rubygems:#{spec.name}:#{version}" @parent.name( spec.summary || spec.name ) @parent.description spec.description @parent.url spec.homepage if spec.homepage && spec.homepage.match( /github.com/ ) con = spec.homepage.sub( /http:/, 'https:' ).sub( /\/?$/, ".git" ) @parent.scm :url => spec.homepage, :connection => con end spec.licenses.flatten.each do |l| if Maven::Tools::LICENSES.include?(l.downcase) lic = Maven::Tools::LICENSES[ l.downcase ] @parent.license( :name => lic.short, :url => lic.url, :comments => lic.name ) else @parent.license( l ) end end authors = [ spec.authors || [] ].flatten emails = [ spec.email || [] ].flatten authors.zip( emails ).each do |d| @parent.developer( :name => d[0], :email => d[1] ) end @parent.packaging 'gem' @parent.extension! 'org.jruby.maven:mavengem-wagon:${mavengem.wagon.version}' if setup_gem_support( @parent, options, spec ) @parent.extension 'org.jruby.maven:gem-with-jar-extension:${jruby.plugins.version}' else @parent.extension 'org.jruby.maven:gem-extension:${jruby.plugins.version}' end super end def gem_deps( spec, options ) if options[:profile] @parent.profile! options[:profile] do super end else super end end end end end end maven-tools-1.2.1/lib/maven/tools/dsl/profile_gemspec.rb0000644000175000017500000000321614506273454022605 0ustar jeromejerome# # Copyright (C) 2014 Christian Meier # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # require 'maven/tools/dsl/gemspec' require 'maven/tools/dsl/gem_support' module Maven module Tools module DSL class ProfileGemspec < Gemspec include GemSupport def process( spec, name, options ) setup_gem_support( @parent, options, spec ) profile = @parent.current @parent.instance_variable_set :@current, @parent.model @parent.extension! 'org.jruby.maven:mavengem-wagon:${mavengem.wagon.version}' @parent.instance_variable_set :@current, profile super end end end end end maven-tools-1.2.1/lib/maven/tools/dsl/options.rb0000644000175000017500000000565214506273454021143 0ustar jeromejerome# # Copyright (C) 2014 Christian Meier # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # module Maven module Tools module DSL module Options def args_and_options( *args ) if args.last.is_a? Hash [ args[0..-2], args.last ] else [ args, {} ] end end def fill_options( receiver, options, *allow_defaults ) options.each do |k,v| if ! allow_defaults.member?( k ) && receiver.send( "#{k}".to_sym ) raise "#{receiver} has attribute #{k} already set" end receiver.send( "#{k}=".to_sym, v ) end end def help( name, *args ) args, options = args_and_options( *args ) args.each do |a| options[ a ] = a.to_s if a && !options.key?( a ) end opts = options.select{ |k,v| v } t = "\n# " + name.to_s.upcase + " #\n\n" unless opts.empty? t += "hash options: #{name} #{opts.inspect.gsub( /\"[{]/, '(' ).gsub( /[}]\"/, ')' )}\n" end t += "nested: #{name} do\n" t = append_nested_block( options, t ) t += " end\n" t end def help_block( *args ) args, options = help_args_and_options( *args ) append_nested_block( options ) end private def help_args_and_options( *args ) args, options = args_and_options( *args ) args.each do |a| options[ a ] = a.to_s if a && !options.key?( a ) end [ args, options ] end def append_nested_block( options, t = "") options.each do |k,v| if v t += " #{k} #{v.inspect.gsub( /\"[{]/, '(' ).gsub( /[}]\"/, ')' )}\n" else t += " #{k} # nested element\n" end end t end end end end end maven-tools-1.2.1/lib/maven/tools/dsl/models.rb0000644000175000017500000000325514506273454020730 0ustar jeromejerome# # Copyright (C) 2014 Christian Meier # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # module Maven module Tools module DSL module Models def model @model end def respond_to?( m ) @model.respond_to?( m ) || @model.respond_to?( m.to_s[ 0..-2 ].to_sym ) end def method_missing( m, *args ) if @model.respond_to? m meth = @model.method m if meth.arity == 0 && args.size == 1 @model.send( "#{m}=".to_sym, *args ) else @model.send( m, *args ) end else super end end end end end end maven-tools-1.2.1/lib/maven/tools/dsl/jruby_dsl.rb0000644000175000017500000000664514506273454021450 0ustar jeromejerome# # Copyright (C) 2014 Christian Meier # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # require 'maven/tools/dsl/options' require 'maven/tools/dsl/models' module Maven module Tools module DSL class RepositoryDSL extend Options include Models def self.create( parent, *args, &block ) end end class JRubyDSL extend Options def self.create( parent, scope, *args, &block ) args, options = args_and_options( *args ) j = JRubyDSL.new( parent, scope, &block ) j.version args[0] j.no_asm args[1] fill_options( j, options || {} ) j.apply j end def initialize( parent, scope, &block ) @parent = parent @data = {} self.scope scope self.instance_eval( &block ) if block end def dependency( type, artifact_id ) dep = Dependency.new dep.type = type dep.group_id = 'org.jruby' dep.artifact_id = artifact_id dep.version = version dep.scope = scope @parent.dependencies << dep end private :dependency def apply if version.nil? # nothing to do elsif( version < '1.6' ) raise 'jruby before 1.6 are not supported' elsif ( version < '1.7' ) warn 'jruby version below 1.7 uses jruby-complete' dependency :jar, 'jruby-complete' elsif ( version.sub( /1\.7\./, '').to_i < 5 ) dependency :jar, 'jruby-core' elsif no_asm dependency :pom, 'jruby-noasm' else dependency :pom, 'jruby-noasm' end end def legacy_version v = version v+= '-no_asm' if no_asm v end def help warn self.class.help( 'jruby', :scope, :version, :no_asm => true, :jar => nil ) + < File.basename(file) ) end File.read(file).each_line do |line| data = line.sub(/-\ /, '').strip.split(':') case data.size when 3 data = Hash[ [:groupId, :artifactId, :version].zip( data ) ] parent.jar data[:groupId], data[:artifactId], data[:version], :scope => :compile when 4 data = Hash[ [:groupId, :artifactId, :version, :scope].zip( data ) ] parent.jar data[:groupId], data[:artifactId], data[:version], :scope => data[:scope] when 5 data = Hash[ [:groupId, :artifactId, :classifier, :version, :scope].zip( data ) ] parent.jar data[:groupId], data[:artifactId], data[:version], :classifier => data[:classifier], :scope => data[:scope] else warn "can not parse: #{line}" end end end end end def help warn "\n# jars.lock(file) - default JArs.lock #\n" end end end end end maven-tools-1.2.1/lib/maven/tools/dsl/jarfile_lock.rb0000644000175000017500000000645114506273454022072 0ustar jeromejerome# # Copyright (C) 2014 Christian Meier # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # require 'fileutils' require 'yaml' module Maven module Tools module DSL class JarfileLock def initialize( jarfile ) @file = File.expand_path( jarfile + ".lock" ) if jarfile if @file && File.exists?( @file ) lock = YAML.load( File.read( @file ) ) case lock when Hash @data = lock when String # fallback on old format and treat them all as "runtime" data[ :runtime ] = lock.split( /\ / ) else warn "unknown format of #{@file} - skip it" end end end attr_reader :file def dump if @data and not @data.empty? File.write( @file, @data.to_yaml ) else FileUtils.rm_f( @file ) end end def coordinates( scope = :runtime ) data[ scope ] || [] end def replace( deps ) data.clear @all = nil update_unlocked( deps ) end def update_unlocked( deps ) success = true deps.each do |k,v| bucket = ( data[ k ] ||= [] ) v.each do |e| # TODO remove check and use only e.coord coord = e.respond_to?( :coord ) ? e.coord : e if exists?( coord ) # do nothing elsif locked?( coord ) # mark result as conflict success = false else # add it if not e.respond_to?( :coord ) && e.gav =~ /system$/ bucket << coord end end end end @all = nil success end def exists?( coordinate ) all.member?( coordinate ) end def locked?( coordinate ) coord = coordinate.sub(/^([^:]+:[^:]+):.+/) { $1 } all.detect do |l| l.sub(/^([^:]+:[^:]+):.+/) { $1 } == coord end != nil end private def all @all ||= coordinates( :runtime ) + coordinates( :test ) end def data @data ||= {} end end end end end maven-tools-1.2.1/lib/maven/tools/dsl/jarfile.rb0000644000175000017500000001254114506273454021057 0ustar jeromejerome# # Copyright (C) 2014 Christian Meier # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # require 'maven/tools/dsl/dependency_dsl' require 'maven/tools/dsl/jarfile_lock' module Maven module Tools module DSL class Jarfile extend Options class ParentWithLock class Guarded < SimpleDelegator def initialize(deps, lock_file) super deps @lock = lock_file end def <<( d ) unless @lock.locked?( "#{d.group_id}:#{d.artifact_id}" ) super d end end end attr_reader :lock, :parent def initialize( parent, lock_file ) @lock = lock_file @parent = parent # TODO remove case when parent is nil @deps = Guarded.new( parent ? parent.dependencies : [], lock_file ) end def dependencies @deps end def basedir # assume the lock file is inside the project dir File.dirname(@lock.file) end end def artifacts # TODO remove this part @artifacts ||= [] end def repositories # TODO remove this part @repositories ||= [] end def snapshot_repositories # TODO remove this part @snapshot_repositories ||= [] end def initialize( parent, file = 'Jarfile', skip_lock = false ) warn "DEPRECATED to have nil as parent" unless parent lockfile = JarfileLock.new( skip_lock ? nil : file ) # the dependencies are only add if they are not locked @parent = ParentWithLock.new( parent, lockfile ) # parse jarfile DSL eval( File.read( file ) ) # fill dependencies from lockfile lockfile.coordinates.each do |d| a = Maven::Tools::Artifact.from_coordinate( d ) add( a ) unless a[:systemPath] end scope( :test ) do lockfile.coordinates( :test ).each do |d| a = Maven::Tools::Artifact.from_coordinate( d ) add( a ) unless a[:systemPath] end end end def add( artifact ) dep = Dependency.new # use the fill_options to fill up the dependency self.class.fill_options( dep, artifact, :type ) # adjust the scope dep.scope = @scope if @scope # use the original parent if present (@parent.parent || @parent ).dependencies << dep end def help warn "\n# Jarfile DSL #\n" warn self.class.help_block( :local => "path-to-local-jar", :jar => nil, :pom => nil, :repository => nil, :snapshot_repository => nil, :scope => nil)[0..-2] end def local( path ) jar_path = ::File.expand_path( path ) jar_path.sub!( /#{@parent.basedir}/, '${basedir}' ) a = Artifact.new_local( jar_path, :jar ) add( a ) # TODO remove this part artifacts << a a end def jar( *args, &block ) a = DependencyDSL.create( @parent, :jar, @scope, *args, &block ) # TODO remove this part artifacts << a a end def pom( *args, &block ) a = DependencyDSL.create( @parent, :pom, @scope, *args, &block ) # TODO remove this part artifacts << a a end def snapshot_repository( name, url = nil ) if url.nil? url = name end snapshot_repositories << { :name => name.to_s, :url => url } end def repository( name, url = nil ) if url.nil? url = name end repositories << { :name => name.to_s, :url => url } end alias :source :repository def scope( scope ) @scope = scope yield if block_given? ensure @scope = nil end def jruby( *args, &block ) warn "DEPRECATED jruby declaration has no effect anymore" # if args.empty? && !block # @jruby ? @jruby.legacy_version : nil # else # @jruby = JRubyDSL.create( @parent, :provided, *args, &block ) # end end end end end end maven-tools-1.2.1/lib/maven/tools/dsl/gemspec.rb0000644000175000017500000001303414506273454021064 0ustar jeromejerome# # Copyright (C) 2014 Christian Meier # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # require 'maven/tools/coordinate' require 'maven/tools/versions' require 'maven/tools/dsl/jruby_dsl' require 'maven/tools/dsl/dependency_dsl' module Maven module Tools module DSL class Gemspec def initialize( parent, name = nil, options = {} ) @parent = parent case name when Hash options = name name = options[ 'name' ] || options[ :name ] when Gem::Specification process_gem_spec( name, options ) return end name = find_gemspec_file( name ) spec = gem_specification( name ) name ||= "#{spec.name}-#{spec.version}.gemspec" process( spec, name, options ) JarsLock.new( parent ) if parent.respond_to? :profile end attr_reader :parent def help warn "\n# gemspec(filename) - default find gemspec in current directory #\n" end def gem( scope, coord ) DependencyDSL.create( @parent.current, :gem, scope, coord ) end def jar( line ) maven_dependency( "jar #{line}" ) end def pom( line ) maven_dependency( "pom #{line}" ) end def method_missing( m, *args ) if args.size == 1 warn "unknown declaration: #{m} " + args[0] else super end end private include Maven::Tools::Coordinate def process_gem_spec( spec, options ) if spec.spec_file name = File.basename( spec.spec_file ) else name = nil end process( spec, name, options ) end def find_gemspec_file( name ) if name ::File.join( @parent.basedir, name ) else gemspecs = Dir[ ::File.join( @parent.basedir, "*.gemspec" ) ] raise "more then one gemspec file found" if gemspecs.size > 1 raise "no gemspec file found" if gemspecs.size == 0 gemspecs.first end end def gem_specification( name ) path = File.expand_path( name ) spec_file = File.read( path ) if spec_file.start_with?( '--- !ruby/object:Gem::Specification' ) Gem::Specification.from_yaml( spec_file ) else FileUtils.cd( @parent.basedir ) do return eval( spec_file, nil, path ) end end end def process( spec, name, options ) if name config = { :gemspec => name.sub( /^#{@parent.basedir}\/?/, '' ) } end if options[ :include_jars ] || options[ 'include_jars' ] config[ :includeDependencies ] = true config[ :useRepositoryLayout ] = true @parent.plugin :dependency do @parent.execute_goal( 'copy-dependencies', :phase => 'generate-test-resources', :outputDirectory => spec.require_path, :useRepositoryLayout => true ) end end @parent.jruby_plugin!( :gem, config ) gem_deps( spec, options ) unless options[ :no_gems ] other_deps( spec ) end def gem_deps( spec, options ) spec.dependencies.each do |dep| versions = dep.requirement.requirements.collect do |req| # use this construct to get the same result in 1.8.x and 1.9.x req.collect{ |i| i.to_s }.join end scope = dep.type == :development ? :test : nil gem( scope, "rubygems:#{dep.name}:#{to_version( *versions )}" ) end end def other_deps( spec ) spec.requirements.each do |req| req = req.sub( /#.*^/, '' ) method = req.sub(/\s.*$/, '' ).to_sym line = req.sub(/^[^\s]*\s/, '' ) if respond_to? method if spec.platform.to_s == 'java' send method, line else warn "jar dependency found on non-java platform gem - ignoring: #{req}" end else warn "unknown declaration: #{req}" end end end def maven_dependency( line ) coord = to_split_coordinate_with_scope( line ) if coord && coord.size > 1 DependencyDSL.create( @parent.current, nil, nil, *coord ) end end end end end end maven-tools-1.2.1/lib/maven/tools/dsl/gem_support.rb0000644000175000017500000001013014506273454021777 0ustar jeromejerome# # Copyright (C) 2014 Christian Meier # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # module Maven module Tools module DSL module GemSupport def setup_jruby_plugins_version( project ) if not @parent.properties.key?( 'jruby.plugins.version' ) and not project.properties.key?( 'jruby.plugins.version' ) @parent.properties( 'jruby.plugins.version' => VERSIONS[ :jruby_plugins ] ) @parent.properties( 'mavengem.wagon.version' => VERSIONS[ :mavengem_wagon ] ) end end def setup_gem_support( project, options, spec = nil ) unless project.properties.member?( 'project.build.sourceEncoding' ) @parent.properties( 'project.build.sourceEncoding' => 'utf-8' ) end if spec.nil? require_path = '.' name = ::File.basename( ::File.expand_path( '.' ) ) else require_path = spec.require_path name = spec.name end if ( nil == project.current.repositories.detect { |r| r.id == 'rubygems-releases' || r.id == 'mavengems' } && options[ :no_rubygems_repo ] != true && ! @parent.instance_variable_get(:@inside_gemfile)) @parent.repository( 'mavengems', 'mavengem:https://rubygems.org' ) end @parent.needs_torquebox = true setup_jruby_plugins_version( project ) if options.key?( :jar ) || options.key?( 'jar' ) jarpath = options[ :jar ] || options[ 'jar' ] if jarpath jar = ::File.basename( jarpath ).sub( /.jar$/, '' ) output = ::File.dirname( "#{require_path}/#{jarpath}" ) output.sub!( /\/$/, '' ) end else jar = "#{name}" output = "#{require_path}" end if options.key?( :source ) || options.key?( 'source' ) source = options[ :source ] || options[ 'source' ] @parent.build do @parent.source_directory source end end # TODO rename "no_rubygems_repo" to "no_jar_support" if( options[ :no_rubygems_repo ] != true && jar && ( source || File.exists?( File.join( project.basedir, 'src/main/java' ) ) ) ) unless spec.nil? || spec.platform.to_s.match( /java|jruby/ ) warn "gem is not a java platform gem but has a jar and source" end @parent.plugin( :jar, VERSIONS[ :jar_plugin ], :outputDirectory => output, :finalName => jar ) do @parent.execute_goals :jar, :phase => 'prepare-package' end @parent.plugin( :clean, VERSIONS[ :clean_plugin ], :filesets => [ { :directory => output, :includes => [ "#{jar}.jar", '*/**/*.jar' ] } ] ) true else false end end end end end end maven-tools-1.2.1/lib/maven/tools/dsl/exclusions_dsl.rb0000644000175000017500000000570114506273454022501 0ustar jeromejerome# # Copyright (C) 2014 Christian Meier # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # require 'maven/tools/dsl/options' require 'maven/tools/dsl/models' module Maven module Tools module DSL class ExclusionsDSL < Array extend Options def self.create( dep, *args, &block ) a = ExclusionsDSL.new( dep ) args.each do |arg| a << ExclusionDSL.create( dep, *arg ) end a.instance_eval( &block ) if block a end def initialize( dep ) @dep = dep end def help warn self.class.help( 'exclusions', :exclusion => nil ) + < scope } ][ (args.size - 4 )..2 ] a = DependencyDSL.new( *args ) end options = process_exclusions( a.model, a.dup ) a.instance_eval &block if block fill_options( a.model, options, :type ) parent.dependencies << a.model a end private def process_exclusions( dep, options ) exclusions = options.delete( :exclusions ) if exclusions && exclusions.size > 0# && dep.exclusions.size == 0 ExclusionsDSL.create( dep, *exclusions ) end options end end def initialize( *args ) super @model = Dependency.new end def help type = self[:type] warn self.class.help( type, :group_id, :artifact_id, :version, :classifier, :exclusions, :scope => '{:compile|:test|:provided|:runtime}', :exclusions => nil, :exclusion => nil) + <|?*]/, '_').gsub(/_+/, '_') unless url == 'https://rubygems.org' # we need to add the repo at project level if @context == :profile current = @current @current = @model end repository :id => id || 'mavengems', :url => "mavengem:#{url}" extension! 'org.jruby.maven:mavengem-wagon', '${mavengem.wagon.version}' @current = current if current block.call if block end def ruby( *args ) # ignore end def path( *args ) warn 'path block not implemented' end def git( *args ) warn 'git block not implemented' end def is_jruby_platform( *args ) args.flatten.detect { |a| :jruby == a.to_sym } end private :is_jruby_platform def platforms( *args ) if is_jruby_platform( *args ) yield end end def group( *args ) @group = args yield ensure @group = nil end def gemfile( name = 'Gemfile', options = {} ) if name.is_a? Hash options = name name = 'Gemfile' end name = ::File.join( basedir, name ) unless ::File.exists?( name ) if @context == :project build do extension! 'org.jruby.maven:mavengem-wagon', '${mavengem.wagon.version}' directory '${basedir}/pkg' end end @inside_gemfile = true # the eval might need those options for gemspec declaration lockfile = ::File.expand_path( name + '.lock' ) if File.exists? lockfile pr = profile :gemfile do activation do file( :missing => name.sub(/#{basedir}./, '') + '.lock' ) end FileUtils.cd( basedir ) do f = ::File.expand_path( name ) eval( ::File.read( f ), nil, f ) end end @inside_gemfile = :gemfile else FileUtils.cd( basedir ) do f = ::File.expand_path( name ) eval( ::File.read( f ), nil, f ) end @inside_gemfile = false end if @gemspec_args case @gemspec_args[ 0 ] when Hash gemspec( @gemspec_args[ 0 ].merge( options ) ) when NilClass gemspec( @gemspec_args[ 0 ], options ) else @gemspec_args[ 1 ].merge!( options ) gemspec( *@gemspec_args ) end else setup_gem_support( options ) jruby_plugin!( :gem ) do execute_goal :initialize, :id => 'install gems' end end if pr && pr.dependencies.empty? if @current.profiles.respond_to? :delete @current.profiles.delete( pr ) else @current.profiles.remove( pr ) end end if pr && !pr.dependencies.empty? locked = GemfileLock.new( lockfile ) has_bundler = gem?( 'bundler' ) profile :gemfile_lock do activation do file( :exists => name.sub(/#{basedir}./, '') + '.lock' ) end done = add_scoped_hull( locked, pr.dependencies ) done += add_scoped_hull( locked, pr.dependencies, done, :provided ) add_scoped_hull( locked, pr.dependencies, done, :test ) if locked['bundler'] && ! has_bundler gem( 'bundler', locked['bundler'].version ) end end end if @has_path or @has_git gem 'bundler', VERSIONS[ :bundler_version ], :scope => :provided unless gem? 'bundler' jruby_plugin! :gem do execute_goal( :exec, :id => 'bundle install', :filename => 'bundle', :args => 'install' ) end end DSL::JarsLock.new(self) ensure @inside_gemfile = nil @gemspec_args = nil @has_path = nil @has_git = nil end def add_scoped_hull( locked, deps, done = [], scope = nil ) result = {} scope ||= "compile runtime default" scope = scope.to_s names = deps.select do |d| sc = d.scope || 'default' scope.match /#{sc}/ end.collect { |d| d.artifact_id } locked.dependency_hull( names ).each do |name, version| result[ name ] = version unless done.member?( name ) end unless result.empty? scope.sub!( / .*$/, '' ) jruby_plugin!( :gem ) do execute_goal( :sets, :id => "install gem sets for #{scope}", :phase => :initialize, :scope => scope, :gems => result ) end end result.keys end private :add_scoped_hull def has_gem( name ) ( model.artifact_id == name && model.group_id == 'rubygems' ) || ( @current.dependencies.detect do |d| d.artifact_id == name && d.group_id == 'rubygems' end != nil ) end private :has_gem def setup_gem_support( options, spec = nil, config = {} ) unless model.properties.member?( 'project.build.sourceEncoding' ) properties( 'project.build.sourceEncoding' => 'utf-8' ) end if spec.nil? require_path = '.' name = ::File.basename( ::File.expand_path( '.' ) ) else require_path = spec.require_path name = spec.name end unless options[ :only_metadata ] if ( nil == model.repositories.detect { |r| r.id == 'rubygems-releases' || r.id == 'mavengems' } && options[ :no_rubygems_repo ] != true ) repository( 'mavengems', 'mavengem:https://rubygems.org' ) end @needs_torquebox = true setup_jruby_plugins_version end if options.key?( :jar ) || options.key?( 'jar' ) jarpath = options[ :jar ] || options[ 'jar' ] if jarpath jar = ::File.basename( jarpath ).sub( /.jar$/, '' ) output = ::File.dirname( "#{require_path}/#{jarpath}" ) output.sub!( /\/$/, '' ) end else jar = "#{name}" output = "#{require_path}" end if options.key?( :source ) || options.key?( 'source' ) source = options[ :source ] || options[ 'source' ] build do source_directory source end end # TODO rename "no_rubygems_repo" to "no_jar_support" if options[ :no_rubygems_repo ] != true && jar && ( source || ::File.exists?( ::File.join( basedir, 'src', 'main', 'java' ) ) ) unless spec.nil? || spec.platform.to_s.match( /java|jruby/ ) warn "gem is not a java platform gem but has a jar and source" end plugin( :jar, VERSIONS[ :jar_plugin ], :outputDirectory => output, :finalName => jar ) do execute_goals :jar, :phase => 'prepare-package' end plugin( :clean, VERSIONS[ :clean_plugin ], :filesets => [ { :directory => output, :includes => [ "#{jar}.jar", '*/**/*.jar' ] } ] ) true else false end end private :setup_gem_support def setup_jruby( jruby, jruby_scope = :provided ) warn "deprecated: use jruby DSL directly" jruby ||= VERSIONS[ :jruby_version ] # if jruby.match( /-SNAPSHOT/ ) != nil # snapshot_repository( 'http://ci.jruby.org/snapshots/maven', # :id => 'jruby-snapshots' ) # end scope( jruby_scope ) do if ( jruby < '1.6' ) raise 'jruby before 1.6 are not supported' elsif ( jruby < '1.7' ) warn 'jruby version below 1.7 uses jruby-complete' jar 'org.jruby:jruby-core', jruby elsif ( jruby.sub( /1\.7\./, '').to_i < 5 ) jar 'org.jruby:jruby-core', jruby elsif jruby =~ /-no_asm$/ pom 'org.jruby:jruby-noasm', jruby.sub( /-no_asm$/, '' ) else pom 'org.jruby:jruby', jruby end end end private :setup_jruby def jarfile( file = 'Jarfile', options = {} ) # need to do this lazy as it requires yaml and with this # jar-dependencies which will require_jars_lock require 'maven/tools/jarfile' if file.is_a? Hash options = file file = 'Jarfile' end if file.is_a?( Maven::Tools::Jarfile ) warn "DEPRECATED use filename instead" file = jfile.file end file = ::File.join( basedir, file ) unless ::File.exists?( file ) dsl = Maven::Tools::DSL::Jarfile.new( @current, file, options[ :skip_lock ] ) # TODO this setup should be part of DSL::Jarfile jarfile_dsl( dsl ) end def jarfile_dsl( dsl ) dsl.repositories.each do |r| repository r.merge( {:id => r[:name] } ) end dsl.snapshot_repositories.each do |r| snapshot_repository r.merge( {:id => r[:name] } ) end end private :jarfile_dsl def gemspec( name = nil, options = {} ) if @inside_gemfile == true @gemspec_args = [ name, options ] return end if @context == :project if @inside_gemfile.is_a? Symbol options[ :profile ] = @inside_gemfile end options[ :no_gems ] = gemspec_without_gem_dependencies? require 'maven/tools/dsl/project_gemspec' DSL::ProjectGemspec.new( self, name, options ) else require 'maven/tools/dsl/profile_gemspec' DSL::ProfileGemspec.new( self, name, options ) end end # TODO remove this hack to get jar-dependencies to work def gemspec_without_gem_dependencies? gems = GemspecDependencies.new( Gem::Specification.new ) gems.runtime << 123 deps = gems.send( :_deps, :runtime ) deps.size == 0 end def licenses yield end alias :developers :licenses alias :contributors :licenses alias :mailing_lists :licenses alias :notifiers :licenses alias :dependencies :licenses alias :repositories :licenses alias :plugin_repositories :licenses alias :resources :licenses alias :testResources :licenses alias :profiles :licenses def extensions(*args) if @context == :plugin || @context == :report_plugin @current.extensions = args[0] else yield end end def build( &block ) build = @current.build ||= Build.new nested_block( :build, build, block ) if block build end def organization( *args, &block ) if @context == :project args, options = args_and_options( *args ) org = ( @current.organization ||= Organization.new ) org.name = args[ 0 ] org.url = args[ 1 ] fill_options( org, options ) nested_block( :organization, org, block ) if block org else @current.organization = args[ 0 ] end end def license( *args, &block ) args, options = args_and_options( *args ) license = License.new license.name = args[ 0 ] license.url = args[ 1 ] fill_options( license, options ) nested_block( :license, license, block ) if block @current.licenses << license license end def project( *args, &block ) raise 'mixed up hierachy' unless @current == model args, options = args_and_options( *args ) @current.name = args[ 0 ] @current.url = args[ 1 ] fill_options( @current, options ) nested_block(:project, @current, block) if block end def id( *args ) args, options = args_and_options( *args ) if @context == :project # reset version + groupId @current.version = nil @current.group_id = nil fill_gav( @current, *args ) fill_options( @current, options ) reduce_id else @current.id = args[ 0 ] end end def site( *args, &block ) site = Site.new args, options = args_and_options( *args ) site.id = args[ 0 ] site.url = args[ 1 ] site.name = args[ 2 ] fill_options( site, options ) nested_block( :site, site, block) if block @current.site = site end def source_control( *args, &block ) scm = Scm.new args, options = args_and_options( *args ) scm.connection = args[ 0 ] scm.developer_connection = args[ 1 ] scm.url = args[ 2 ] fill_options( scm, options ) nested_block( :scm, scm, block ) if block @current.scm = scm end alias :scm :source_control def issue_management( *args, &block ) issues = IssueManagement.new args, options = args_and_options( *args ) issues.url = args[ 0 ] issues.system = args[ 1 ] fill_options( issues, options ) nested_block( :issue_management, issues, block ) if block @current.issue_management = issues end alias :issues :issue_management def ci_management( *args, &block ) ci = CiManagement.new args, options = args_and_options( *args ) ci.url = args[ 0 ] fill_options( ci, options ) nested_block( :ci_management, ci, block ) if block @current.ci_management = ci end alias :ci :ci_management def distribution_management( *args, &block ) di = DistributionManagement.new args, options = args_and_options( *args ) di.status = args[ 0 ] di.download_url = args[ 1 ] fill_options( di, options ) nested_block( :distribution_management, di, block ) if block @current.distribution_management = di end def relocation( *args, &block ) args, options = args_and_options( *args ) relocation = fill_gav( Relocation, args.join( ':' ) ) fill_options( relocation, options ) nested_block( :relocation, relocation, block ) if block @current.relocation = relocation end def system( *args ) if @current && @current.respond_to?( :system ) @current.system = args[ 0 ] else Kernel.system( *args ) end end def notifier( *args, &block ) n = Notifier.new args, options = args_and_options( *args ) n.type = args[ 0 ] n.address = args[ 1 ] fill_options( n, options ) nested_block( :notifier, n, block ) if block @current.notifiers << n n end def mailing_list( *args, &block ) list = MailingList.new args, options = args_and_options( *args ) list.name = args[ 0 ] fill_options( list, options ) nested_block( :mailing_list, list, block ) if block @current.mailing_lists << list list end def prerequisites( *args, &block ) pre = Prerequisites.new args, options = args_and_options( *args ) fill_options( pre, options ) nested_block( :prerequisites, pre, block ) if block @current.prerequisites = pre pre end def archives( *archives ) @current.archive = archives.shift @current.other_archives = archives end def other_archives( *archives ) @current.other_archives = archives end def developer( *args, &block ) dev = Developer.new args, options = args_and_options( *args ) dev.id = args[ 0 ] dev.name = args[ 1 ] dev.url = args[ 2 ] dev.email = args[ 3 ] fill_options( dev, options ) nested_block( :developer, dev, block ) if block @current.developers << dev dev end def contributor( *args, &block ) con = Contributor.new args, options = args_and_options( *args ) con.name = args[ 0 ] con.url = args[ 1 ] con.email = args[ 2 ] fill_options( con, options ) nested_block( :contributor, con, block ) if block @current.contributors << con con end def roles( *roles ) @current.roles = roles end def property( options ) prop = ActivationProperty.new prop.name = options[ :name ] || options[ 'name' ] prop.value = options[ :value ] || options[ 'value' ] @current.property = prop end def file( options ) file = ActivationFile.new file.missing = options[ :missing ] || options[ 'missing' ] file.exists = options[ :exists ] || options[ 'exists' ] @current.file = file end def os( options ) os = ActivationOS.new os.family = options[ :family ] || options[ 'family' ] os.version = options[ :version ] || options[ 'version' ] os.arch = options[ :arch ] || options[ 'arch' ] os.name = options[ :name ] || options[ 'name' ] @current.os = os end def jdk( version ) @current.jdk = version end def activation( &block ) activation = Activation.new nested_block( :activation, activation, block ) if block @current.activation = activation end def distribution( *args, &block ) if @context == :license args, options = args_and_options( *args ) @current.distribution = args[ 0 ] fill_options( @current, options ) else distribution_management( *args, &block ) end end def includes( *items ) @current.includes = items.flatten end def excludes( *items ) @current.excludes = items.flatten end def test_resource( options = {}, &block ) # strange behaviour when calling specs from Rakefile return if @current.nil? resource = Resource.new fill_options( resource, options ) nested_block( :test_resource, resource, block ) if block unless resource.directory resource.directory = '${basedir}' end if @context == :project ( @current.build ||= Build.new ).test_resources << resource else @current.test_resources << resource end end def resource( options = {}, &block ) resource = Resource.new fill_options( resource, options ) nested_block( :resource, resource, block ) if block unless resource.directory resource.directory = '${basedir}' end if @context == :project ( @current.build ||= Build.new ).resources << resource else @current.resources << resource end end def packaging( val ) @current.packaging = val if val =~ /jruby[WJ]ar/ if not @current.properties.key?( 'jruby9.plugins.version' ) and not (@context == :profile and model.properties.key?( 'jruby9.plugins.version' ) ) properties( 'jruby9.plugins.version' => VERSIONS[ :jruby9_plugins ] ) end extension 'org.jruby.maven', 'jruby9-extensions', '${jruby9.plugins.version}' build do directory '${basedir}/pkg' end end end def build_method( m, val ) m = "#{m}=".to_sym if @context == :project ( @current.build ||= Build.new ).send m, val else @current.send m, val end end private :build_method def final_name( val ) build_method( __method__, val ) end def directory( val ) build_method( __method__, val ) end def default_goal( val ) build_method( __method__, val ) end def output_directory( val ) build_method( __method__, val ) end def test_output_directory( val ) build_method( __method__, val ) end def source_directory( val ) build_method( __method__, val ) end def script_source_directory( val ) build_method( __method__, val ) end def test_source_directory( val ) build_method( __method__, val ) end def repository( *args, &block ) do_repository( :repository=, *args, &block ) end def plugin_repository( *args, &block ) do_repository( :plugin, *args, &block ) end def set_policy( key, enable, options ) return unless options if map = options[ key ] || options[ key.to_s ] map[ :enabled ] = enable else options[ key ] = enable end end private :set_policy def snapshot_repository( *args, &block ) unless @current.respond_to?( :snapshot_repository= ) args, options = args_and_options( *args ) set_policy( :releases, false, options ) set_policy( :snapshots, true, options ) args << options end do_repository( :snapshot_repository=, *args, &block ) end def releases( config = nil, &block ) @current.releases = repository_policy( @current.releases, config, &block ) end def snapshots( config = nil, &block) @current.snapshots = repository_policy( @current.snapshots, config, &block ) end def repository_policy( rp, config, &block ) rp ||= RepositoryPolicy.new case config when Hash rp.enabled = config[ :enabled ] unless config[ :enabled ].nil? rp.update_policy = config[ :update ] || config[ :update_policy ] rp.checksum_policy = config[ :checksum ] || config[ :checksum_policy ] when TrueClass rp.enabled = true when FalseClass rp.enabled = false else rp.enabled = 'true' == config unless config.nil? end nested_block( :repository_policy, rp, block ) if block rp end def enabled( value ) @current.enabled = ( value.to_s == 'true' ) end def args_and_options( *args ) if args.last.is_a? Hash [ args[0..-2], args.last ] else [ args, {} ] end end def fill_options( receiver, options ) options.each do |k,v| receiver.send( "#{k}=".to_sym, v ) end end def fill( receiver, method, args ) receiver.send( "#{method}=".to_sym, args ) rescue begin old = @current @current = receiver # assume v is an array send( method, *args ) ensure @current = old end end def inherit( *args, &block ) args, options = args_and_options( *args ) parent = ( @current.parent = fill_gav( Parent, *args ) ) fill_options( parent, options ) nested_block( :parent, parent, block ) if block reduce_id parent end alias :parent :inherit def properties(props = {}) props.each do |k,v| @current.properties[k.to_s] = v.to_s end @current.properties end def extension( *args ) ext, build = do_extension( *args ) build.extensions << ext ext end def do_extension( *args ) build = if @context == :build @current else @current.build ||= Build.new end args, options = args_and_options( *args ) ext = fill_gav( Extension, args.join( ':' ) ) fill_options( ext, options ) [ ext, build ] end def extension!( *args ) ext, build = do_extension( *args ) old = build.extensions.detect { |e| e.group_id == ext.group_id && e.artifact_id == ext.artifact_id } build.extensions.remove( old ) if old build.extensions << ext ext end def exclusion( *gav ) gav = gav.join( ':' ) ex = fill_gav( Exclusion, gav ) @current.exclusions << ex ex end def setup_jruby_plugins_version if not @current.properties.key?( 'jruby.plugins.version' ) and not (@context == :profile and model.properties.key?( 'jruby.plugins.version' ) ) properties( 'jruby.plugins.version' => VERSIONS[ :jruby_plugins ] ) properties( 'mavengem.wagon.version' => VERSIONS[ :mavengem_wagon ] ) end end def do_jruby_plugin( method, *gav, &block ) gav[ 0 ] = "org.jruby.maven:#{gav[ 0 ]}-maven-plugin" if gav.size == 1 || gav[ 1 ].is_a?( Hash ) setup_jruby_plugins_version gav.insert( 1, '${jruby.plugins.version}' ) end send( method, *gav, &block ) end def jruby_plugin( *gav, &block ) do_jruby_plugin( :plugin, *gav, &block ) end def jruby_plugin!( *gav, &block ) do_jruby_plugin( :plugin!, *gav, &block ) end def plugin!( *gav, &block ) gav, options = plugin_gav( *gav ) ga = gav.sub( /:[^:]*$/, '' ) pl = plugins.detect do |p| "#{p.group_id}:#{p.artifact_id}" == ga end if pl do_plugin( false, pl, options, &block ) else plugin = fill_gav( @context == :reporting ? ReportPlugin : Plugin, gav) do_plugin( true, plugin, options, &block ) end end def plugin_gav( *gav ) if gav.last.is_a? Hash options = gav.last gav = gav[ 0..-2 ] else options = {} end unless gav.first.match( /:/ ) gav[ 0 ] = "org.apache.maven.plugins:maven-#{gav.first}-plugin" end [ gav.join( ':' ), options ] end private :plugin_gav def plugins(&block) if block block.call else if @current.respond_to? :build @current.build ||= Build.new if @context == :overrides @current.build.plugin_management ||= PluginManagement.new @current.build.plugin_management.plugins else @current.build.plugins end else if @context == :overrides @current.plugin_management ||= PluginManagement.new @current.plugin_management.plugins else @current.plugins end end end end private :plugins def plugin( *gav, &block ) gav, options = plugin_gav( *gav ) plugin = fill_gav( @context == :reporting ? ReportPlugin : Plugin, gav) do_plugin( true, plugin, options, &block ) end def do_plugin( add_plugin, plugin, options, &block ) set_config( plugin, options ) plugins << plugin if add_plugin nested_block(:plugin, plugin, block) if block plugin end private :do_plugin def overrides(&block) nested_block(:overrides, @current, block) if block end alias :plugin_management :overrides alias :dependency_management :overrides def execute( id = nil, phase = nil, options = {}, &block ) if block raise 'can not be inside a plugin' if @current == :plugin if phase.is_a? Hash options = phase else options[ :phase ] = phase end if id.is_a? Hash options = id else options[ :id ] = id end options[ :taskId ] = options[ :id ] || options[ 'id' ] if @source options[ :nativePom ] = ::File.expand_path( @source ).sub( /#{basedir}./, '' ) end add_execute_task( options, &block ) else # just act like execute_goals execute_goals( id ) end end # hook for polyglot maven to register those tasks def add_execute_task( options, &block ) version = VERSIONS[ :polyglot_version ] plugin!( 'io.takari.polyglot:polyglot-maven-plugin', version ) do execute_goal( :execute, options ) jar!( 'io.takari.polyglot:polyglot-ruby', version ) end end def retrieve_phase( options ) if @phase if options[ :phase ] || options[ 'phase' ] raise 'inside phase block and phase option given' end @phase else options.delete( :phase ) || options.delete( 'phase' ) end end private :retrieve_phase def execute_goal( goal, options = {}, &block ) if goal.is_a? Hash execute_goals( goal, &block ) else execute_goals( goal, options, &block ) end end def execute_goals( *goals, &block ) if goals.last.is_a? Hash options = goals.last goals = goals[ 0..-2 ] else options = {} end exec = Execution.new # keep the original default of id id = options.delete( :id ) || options.delete( 'id' ) exec.id = id if id exec.phase = retrieve_phase( options ) exec.goals = goals.collect { |g| g.to_s } set_config( exec, options ) @current.executions << exec nested_block(:execution, exec, block) if block exec end def _dependency( type, *args, &block ) do_dependency( false, type, *args, &block ) end alias :dependency_artifact :_dependency def _dependency!( type, *args, &block ) do_dependency( true, type, *args, &block ) end alias :dependency_artifact! :_dependency! def _dependency?( type, *args ) find_dependency( dependency_container, retrieve_dependency( type, *args ) ) != nil end def find_dependency( container, dep ) container.detect do |d| dep.group_id == d.group_id && dep.artifact_id == d.artifact_id && dep.classifier == d.classifier end end def dependency_set( bang, container, dep ) if bang dd = do_dependency?( container, dep ) if index = container.index( dd ) container[ index ] = dep else container << dep end else container << dep end end def retrieve_dependency( type, *args ) if args.empty? a = type type = a[ :type ] options = a elsif args[ 0 ].is_a?( ::Maven::Tools::Artifact ) a = args[ 0 ] type = a[ :type ] options = a else args, options = args_and_options( *args ) a = ::Maven::Tools::Artifact.from( type, *args ) end options ||= {} d = fill_gav( Dependency, a ? a.gav : args.join( ':' ) ) d.type = type.to_s # TODO maybe copy everything from options ? d.scope = options[ :scope ] if options[ :scope ] d.system_path = options[ :system_path ] if options[ :system_path ] d end def dependency_container if @context == :overrides @current.dependency_management ||= DependencyManagement.new @current.dependency_management.dependencies #elsif @context == :build # @current. else @current.dependencies end end def do_dependency( bang, type, *args, &block ) d = retrieve_dependency( type, *args ) container = dependency_container if bang dd = find_dependency( container, d ) if index = container.index( dd ) container[ index ] = d else container << d end else container << d end args, options = args_and_options( *args ) if options || @scope options ||= {} if @scope if options[ :scope ] || options[ 'scope' ] raise "scope block and scope option given" end options[ :scope ] = @scope end exclusions = options.delete( :exclusions ) || options.delete( "exclusions" ) case exclusions when Array exclusions.each do |v| v, opts = args_and_options( v ) ex = fill_gav( Exclusion, *v ) fill_options( ex, opts ) d.exclusions << ex end when String d.exclusions << fill_gav( Exclusion, exclusions ) end options.each do |k,v| d.send( "#{k}=".to_sym, v ) unless d.send( k.to_sym ) end end nested_block( :dependency, d, block ) if block d end def scope( name ) if @context == :dependency @current.scope = name else @scope = name yield @scope = nil end end def phase( name, &block ) if @context != :plugin && block @phase = name yield @phase = nil else @current.phase = name end end def profile!( id, &block ) profile = @current.profiles.detect { |p| p.id.to_s == id.to_s } if profile nested_block( :profile, profile, block ) if block profile else profile( id, &block ) end end def profile( *args, &block ) profile = Profile.new args, options = args_and_options( *args ) profile.id = args[ 0 ] fill_options( profile, options ) @current.profiles << profile nested_block( :profile, profile, block ) if block profile end def dependency( *args, &block ) dep = Dependency.new args, options = args_and_options( *args ) dep.group_id = args[ 0 ] dep.artifact_id = args[ 1 ] dep.version = args[ 2 ] dep.type = :jar fill_options( dep, options ) nested_block( :dependency, dep, block ) if block dependency_container << dep dep end def report_set( *reports, &block ) set = ReportSet.new case reports.last when Hash options = reports.last reports = reports[ 0..-2 ] id = options.delete( :id ) || options.delete( 'id' ) set.id = id if id inherited = options.delete( :inherited ) inherited = options.delete( 'inherited' ) if inherited.nil? set.inherited = inherited unless inherited.nil? extensions = options.delete( :extensions ) extensions = options.delete( 'extensions' ) if extensions.nil? set.extensions = extensions unless extensions.nil? end set_config( set, options ) set.reports = reports#.to_java @current.report_sets << set end def reporting( &block ) reporting = Reporting.new @current.reporting = reporting nested_block( :reporting, reporting, block ) if block end def gem?( name ) @current.dependencies.detect do |d| d.group_id == 'rubygems' && d.artifact_id == name && d.type == :gem end end def jar!( *args ) _dependency!( :jar, *args ) end def gem( *args ) do_gem( false, *args ) end # TODO useful ? def gem!( *args ) do_gem( true, *args ) end def do_gem( bang, *args ) # in some setup that gem could overload the Kernel gem return if @current.nil? unless args[ 0 ].match( /:/ ) args[ 0 ] = "rubygems:#{args[ 0 ] }" end if args.last.is_a?(Hash) options = args.last elsif @group options = {} args << options end if options # on ruby-maven side we ignore the require option options.delete( :require ) options.delete( 'require' ) if options.key?( :git ) @has_git = true elsif options.key?( :path ) @has_path = true else platform = options.delete( :platform ) || options.delete( 'platform' ) || options.delete( :platforms ) || options.delete( 'platforms' ) group = options.delete( :groups ) || options.delete( 'groups' ) || options.delete( :group ) || options.delete( 'group' ) || @group if group group = [ group ].flatten.each { |g| g.to_sym } if group.member? :development options[ :scope ] = :provided elsif group.member? :test options[ :scope ] = :test end end if platform.nil? || is_jruby_platform( platform ) options[ :version ] = '[0,)' if args.size == 2 && options[ :version ].nil? && options[ 'version' ].nil? do_dependency( bang, :gem, *args ) end end else args << { :version => '[0,)' } if args.size == 1 do_dependency( bang, :gem, *args ) end end def local( path, options = {} ) path = ::File.expand_path( path ) _dependency( :jar, Maven::Tools::Artifact.new_local( path, :jar, options ) ) end def method_missing( method, *args, &block ) if @context m = "#{method}=".to_sym if @current.respond_to? m if method == :properties && defined? JRUBY_VERSION return @current.properties = java.util.Properties.new end #p @context #p m #p args begin if defined?(JRUBY_VERSION) and not RUBY_VERSION =~ /1.8/ and args.size > 1 @current.send( m, args, &block ) else @current.send( m, *args, &block ) end rescue TypeError # assume single argument @current.send( m, args[0].to_s, &block ) rescue ArgumentError begin @current.send( m, args ) rescue ArgumentError => e if @current.respond_to? method @current.send( method, *args ) end end end @current else begin # if ( args.size > 0 && # args[0].is_a?( String ) && # args[0] =~ /^[${}0-9a-zA-Z._-]+(:[${}0-9a-zA-Z._-]+)+$/ ) || # ( args.size == 1 && args[0].is_a?( Hash ) ) case method.to_s[ -1 ] when '?' _dependency?( method.to_s[0..-2].to_sym, *args, &block ) when '!' _dependency!( method.to_s[0..-2].to_sym, *args, &block ) else _dependency( method, *args, &block ) end # elsif @current.respond_to? method # @current.send( method, *args ) # @current # else rescue => e p @context p m p args raise e end end else super end end def xml( xml ) def xml.to_xml self end xml end def prepare_config( receiver, options ) return unless options inh = options.delete( 'inherited' ) inh = options.delete( :inherited ) if inh.nil? receiver.inherited = inh unless inh.nil? ext = options.delete( 'extensions' ) ext = options.delete( :extensions ) if ext.nil? receiver.extensions = ext unless ext.nil? end def set_config( receiver, options ) prepare_config( receiver, options ) receiver.configuration = options end def configuration( v ) if @context == :notifier @current.configuration = v else set_config( @current, v ) end end private def do_repository( method, *args, &block ) args, options = args_and_options( *args ) if @current.respond_to?( method ) r = DeploymentRepository.new else r = Repository.new c = options.delete( :snapshots ) c = options.delete( 'snapshots' ) if c.nil? unless c.nil? r.snapshots = repository_policy( r.snapshots, c ) end c = options.delete( :releases ) c = options.delete( 'releases' ) if c.nil? unless c.nil? r.releases = repository_policy( r.releases, c ) end end if options.size == 1 && args.size == 1 warn "deprecated repository, use :url => '...'" # allow old method signature r.url = args[ 0 ] else r.id = args[ 0 ] r.url = args[ 1 ] r.name = args[ 2 ] end fill_options( r, options ) nested_block( :repository, r, block ) if block case method when :plugin @current.plugin_repositories << r else if @current.respond_to?( method ) @current.send method, r else @current.repositories << r end end end def reduce_id if parent = @current.parent @current.version = nil if parent.version == @current.version @current.group_id = nil if parent.group_id == @current.group_id end end def nested_block(context, receiver, block) old_ctx = @context old = @current @context = context @current = receiver block.call @current = old @context = old_ctx end def fill_gav(receiver, *gav) if receiver.is_a? Class receiver = receiver.new end if gav.size > 0 gav = gav[0].split(':') if gav.size == 1 case gav.size when 0 # do nothing - will be filled later when 1 receiver.artifact_id = gav[0] when 2 if gav[ 0 ] =~ /:/ receiver.group_id, receiver.artifact_id = gav[ 0 ].split /:/ receiver.version = gav[ 1 ] else receiver.group_id, receiver.artifact_id = gav end when 3 receiver.group_id, receiver.artifact_id, receiver.version = gav when 4 receiver.group_id, receiver.artifact_id, receiver.version, receiver.classifier = gav else raise "can not assign such an array #{gav.inspect}" end end receiver end end end end maven-tools-1.2.1/lib/maven/tools/coordinate.rb0000644000175000017500000001353514506273454021014 0ustar jeromejerome# # Copyright (C) 2013 Christian Meier # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # module Maven module Tools module Coordinate def to_split_coordinate_with_scope( line ) line = line.sub( /#.*^/, '' ) scope = :compile line.sub!( /,\s+:scope\s+=>\s(:provided|:runtime|:compile|:test)/ ) do |part| scope = part.sub( /.*:/, '' ).to_sym '' end coord = to_split_coordinate( line ) [ scope ] + coord if coord end def to_split_coordinate( line ) if line =~ /^\s*(jar|pom)\s/ packaging = line.strip.sub(/\s+.*/, '') # Remove packaging, comments and whitespaces sanitized_line = line.sub(/\s*[a-z]+\s+/, '').sub(/#.*/,'').gsub(/\s+/,'') exclusions = nil sanitized_line.gsub!( /[,:](\[.+:.+\]|'\[.+:.+\]'|"\[.+:.+\]")/ ) do |match| exclusions = match.gsub( /['"]/, '' )[2..-2].split( /,\s*/ ) nil end # split to compartments parts = sanitized_line.split( /[,]/ ).collect{|o| o.gsub( /['"]/, '' ) } # fix no version on one argument if parts.size == 1 parts << '[0,)' end # split first argument parts[ 0 ] = parts[ 0 ].split( /:/ ) parts.flatten! # convert ruby version to maven version versions = parts.select { |i| i.match( /[~><=!]/ ) } if ! versions.empty? version = to_version( *versions ) parts = parts - versions parts << version else # concat maven version ranges versions = parts.select { |i| i.match( /[\[\]()]/ ) } if ! versions.empty? version = versions.join( ',' ) parts = parts - versions parts << version end end # insert packing and exclusion parts.insert( 2, packaging ) parts << exclusions # make sure there are no nils parts.compact end end def to_coordinate( line ) result = to_split_coordinate( line ) if result exclusion = result.last.inspect.gsub( /[" ]/, '' ) ( result[0..-2] + [ exclusion ] ).join( ':' ) end end def group_artifact(*args) case args.size when 1 name = args[0] if name =~ /:/ [name.sub(/:[^:]+$/, ''), name.sub(/.*:/, '')] else ["rubygems", name] end else [args[0], args[1]] end end def gav(*args) if args[0] =~ /:/ [args[0].sub(/:[^:]+$/, ''), args[0].sub(/.*:/, ''), maven_version(*args[1, 2])] else [args[0], args[1], maven_version(*args[2,3])] end end def to_version(*args) maven_version(*args) || "[0,)" end private def maven_version(*args) if args.size == 0 || (args.size == 1 && args[0].nil?) nil else low, high = convert(args[0]) low, high = convert(args[1], low, high) if args[1] =~ /[=~><]/ if low == high low else "#{low || '[0'},#{high || ')'}" end end end def snapshot_version( val ) if val.match(/[a-z]|[A-Z]/) && !val.match(/-SNAPSHOT|[${}]/) val + '-SNAPSHOT' else val end end def convert(arg, low = nil, high = nil) if arg =~ /~>/ val = arg.sub(/~>\s*/, '') last = val=~/\./ ? val.sub(/\.[0-9]*[a-z]+.*$/, '').sub(/\.[^.]+$/, '.99999') : '99999' ["[#{snapshot_version(val)}", "#{snapshot_version(last)}]"] elsif arg =~ />=/ val = arg.sub(/>=\s*/, '') ["[#{snapshot_version(val)}", (nil || high)] elsif arg =~ /<=/ val = arg.sub(/<=\s*/, '') [(nil || low), "#{snapshot_version(val)}]"] # treat '!=' the same way as '>' until proper mapping is implemented # see https://maven.apache.org/enforcer/enforcer-rules/versionRanges.html elsif arg =~ /!=/ val = arg.sub(/!=\s*/, '') ["(#{snapshot_version(val)}", (nil || high)] elsif arg =~ /[>]/ val = arg.sub(/[>]\s*/, '') ["(#{snapshot_version(val)}", (nil || high)] elsif arg =~ / path, :scope => :system } ) ) end def self.from( type, *args ) if args.last.is_a? Hash options = args.last.dup args = args[0..-2] end helper = Helper.new case args.size when 1 # jar "asd:Asd:123 # jar "asd:Asd:123:test" # jar "asd:Asd:123:[dsa:rew,fe:fer]" # jar "asd:Asd:123:test:[dsa:rew,fe:fer]" group_id, artifact_id, version, classifier, exclusions = args[0].split( /:/ ) self.new( group_id, artifact_id, type, version, classifier, exclusions, options ) when 2 # jar "asd:Asd", 123 # jar "asd:Asd:test", 123 # jar "asd:Asd:[dsa:rew,fe:fer]", 123 # jar "asd:Asd:test:[dsa:rew,fe:fer]", 123 group_id, artifact_id, classifier, exclusions = args[0].split( /:/ ) self.new( group_id, artifact_id, type, helper.to_version( args[ 1 ] ), classifier, exclusions, options ) when 3 # jar "asd:Asd",'>123', '<345' # jar "asd:Asd:test",'>123', '<345' # jar "asd:Asd:[dsa:rew,fe:fer]",'>123', '<345' # jar "asd:Asd:test:[dsa:rew,fe:fer]",'>123', '<345' # jar "asd:Asd:test:[dsa:rew,fe:fer]", '123', 'source' if args[ 0 ].match /:/ v = helper.to_version( *args[1..-1] ) case v when String group_id, artifact_id, classifier, exclusions = args[0].split( /:/ ) self.new( group_id, artifact_id, type, v, classifier, exclusions, options ) else group_id, artifact_id = args[0].split( /:/ ) self.new( group_id, artifact_id, type, args[1], args[2], nil, options ) end else self.new( args[ 0 ], args[ 1 ], type, args[ 2 ], nil, nil, options ) end else nil end end def self.from_coordinate( coord ) exclusions = nil coord.sub!(/:\[([^:]+:[^:]+)+\]/) do |s| exclusions = s[1..-1] '' end args = coord.split( /:/ ) # maven coordinates differ :( if args.size == 5 classifier = args[ 4 ] args[ 4 ] = args[ 3 ] args[ 3 ] = classifier end if exclusions args[ 4 ] ||= nil args << exclusions end new( *args ) end def initialize( group_id, artifact_id, type, version = nil, classifier = nil, exclusions = nil, options = {} ) if exclusions.nil? if version.nil? and !classifier.nil? version = classifier classifier = nil elsif classifier.is_a?( Array ) exclusions = classifier#version #version = classifier classifier = nil end end self[ :type ] = type self[ :group_id ] = group_id self[ :artifact_id ] = artifact_id self[ :version ] = version self[ :classifier ] = classifier if classifier self[ :exclusions ] = exclusions if exclusions if options self[ :group_id ] ||= options[ :group_id ] self[ :artifact_id ] ||= options[ :artifact_id ] self[ :version ] ||= options[ :version ] self[ :classifier ] ||= options[ :classifier ] if options[ :classifier ] self[ :exclusions ] ||= prepare( options[ :exclusions ] ) if options[ :exclusions ] options.delete( :group_id ) options.delete( :artifact_id ) options.delete( :version ) options.delete( :classifier ) options.delete( :exclusions ) options.delete( :scope ) if options[ :scope ] == :compile self.merge!( options ) end end def prepare( excl ) excl.collect do |e| case e when String e when Array e.join ':' else raise 'only String and Array allowed' end end end private :prepare unless defined? ATTRS ATTRS = :type=, :group_id=, :artifact_id=, :version=, :classifier=, :exclusions=, :scope= end def method_missing( m, arg = nil ) if ATTRS.member? m # setter self[ m.to_s[ 0..-2].to_sym ] = arg elsif ATTRS.member?( "#{m}=".to_sym ) if arg.nil? # getter self[ m ] else # setter self[ m ] = arg end else super end end def respond_to?( m ) ATTRS.member? m end def gav [ self[:group_id], self[:artifact_id], self[:version], self[:classifier] ].select { |o| o }.join( ':' ) end def key @key ||= [ self[:group_id], self[:artifact_id], self[:classifier] ].select { |o| o }.join( ':' ) end def exclusions if key?( :exclusions ) self[:exclusions].inspect.gsub( /[\[\]" ]/, '' ).split( /,/ ) end end def to_coordinate [ self[:group_id], self[:artifact_id], self[:type], self[:classifier], self[:version] ].select { |o| o }.join( ':' ) end def to_s [ self[:group_id], self[:artifact_id], self[:type], self[:classifier], self[:version], key?( :exclusions )? self[:exclusions].inspect.gsub( /[" ]/, '' ) : nil ].select { |o| o }.join( ':' ) end end end end maven-tools-1.2.1/lib/maven-tools.rb0000644000175000017500000000213614506273454016656 0ustar jeromejerome# # Copyright (C) 2013 Christian Meier # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation the rights to # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of # the Software, and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # require 'maven_tools' maven-tools-1.2.1/Rakefile0000644000175000017500000000325214506273454014764 0ustar jeromejerome#-*- mode: ruby -*- task :default => [ :specs ] desc 'generate licenses data from internet' task :licenses do require 'open-uri' require 'ostruct' File.open( 'lib/maven/tools/licenses.rb', 'w' ) do |f| url = 'http://opensource.org' f.puts "require 'ostruct'" f.puts 'module Maven' f.puts ' module Tools' f.puts ' LICENSES = {}' open( url + '/licenses/alphabetical' ).each_line do |line| if line =~ /.*"\/licenses\// and line =~ /
  • / l = OpenStruct.new line.sub!( /.*"(\/licenses\/([^"]*))">/ ) do l.url = "http://opensource.org#{$1}" l.short = $1.sub( /\/licenses\//, '' ) '' end line.sub!( /\ \(.*$/, '' ) f.puts " LICENSES[ #{l.short.downcase.inspect} ] = OpenStruct.new :short => #{l.short.inspect}, :name => #{line.strip.inspect}, :url => #{l.url.inspect}" end end f.puts ' LICENSES.freeze' f.puts ' end' f.puts 'end' end end desc 'run minispecs' task :specs do begin require 'minitest' rescue LoadError end require 'minitest/autorun' $LOAD_PATH << "spec" $LOAD_PATH << "lib" Dir['spec/**/*_spec.rb'].each { |f| require f.sub(/spec\//, '') } end task :headers do require 'copyright_header' s = Gem::Specification.load( Dir["*gemspec"].first ) args = { :license => s.license, :copyright_software => s.name, :copyright_software_description => s.description, :copyright_holders => s.authors, :copyright_years => [Time.now.year], :add_path => "lib:src", :output_dir => './' } command_line = CopyrightHeader::CommandLine.new( args ) command_line.execute end # vim: syntax=Ruby maven-tools-1.2.1/README.md0000644000175000017500000000177314506273454014604 0ustar jeromejeromemaven tools =========== * [![Build Status](https://github.com/torquebox/maven-tools/actions/workflows/ci.yml/badge.svg)](https://github.com/torquebox/maven-tools/actions/workflows/ci.yml) * [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/torquebox/maven-tools) Note on Ruby-1.8 ---------------- ordering is important within the pom.xml since it carry info on the sequence of execution. jruby and ruby-1.9 do iterate in same order as the keys gets included, that helps to copy the order of declaration from the ruby DSL over to pom.xml. with ruby-1.8 the hash behaviour is different and since ruby-1.8 is end of life there is no support for ruby-1.8. though it might just works fine on simple setup. Contributing ------------ 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Added some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request meta-fu ------- enjoy :) maven-tools-1.2.1/MIT-LICENSE0000644000175000017500000000204214506273454014747 0ustar jeromejeromeCopyright (c) 2012 Kristian Meier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. maven-tools-1.2.1/Gemfile0000644000175000017500000000023114506273454014604 0ustar jeromejerome#-*- mode: ruby -*- source 'https://rubygems.org' gemspec gem "copyright-header", "1.0.8", :platform => :mri, :group => :copyright # vim: syntax=Ruby