Skip to content

Commit

Permalink
added osgi test without inlining the dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mkristian committed Oct 27, 2014
1 parent 7d857a7 commit 1bc0673
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
19 changes: 13 additions & 6 deletions maven/jruby/pom.rb
Expand Up @@ -36,12 +36,19 @@

execute 'setup other osgi frameworks', :phase => 'pre-integration-test' do |ctx|
source = File.join( ctx.basedir.to_pathname, 'src', 'templates', 'osgi_all_inclusive' )
[ 'knoplerfish', 'equinox-3.6', 'equinox-3.7', 'felix-3.2', 'felix-4.4'].each do |m|
target = File.join( ctx.basedir.to_pathname, 'src', 'it', 'osgi_all_inclusive_' + m )
FileUtils.rm_rf( target )
FileUtils.cp_r( source, target )
File.open( File.join( target, 'invoker.properties' ), 'w' ) do |f|
f.puts 'invoker.profiles = ' + m
[ true, false ].each do |inline|
prefix = 'first_'
[ 'knoplerfish', 'equinox-3.6', 'equinox-3.7', 'felix-3.2', 'felix-4.4'].each do |m|
target = File.join( ctx.basedir.to_pathname, 'src', 'it', "osgi_#{prefix}all_inclusive_#{inline ? 'inline' : 'jars' }_#{m}" )
prefix = ''
FileUtils.rm_rf( target )
FileUtils.cp_r( source, target )
File.open( File.join( target, 'invoker.properties' ), 'w' ) do |f|
f.puts "invoker.profiles = #{m}"
end
File.open( File.join( target, 'test.properties' ), 'w' ) do |f|
f.puts "inline = #{inline}"
end
end
end
end
Expand Down
5 changes: 3 additions & 2 deletions maven/jruby/src/templates/osgi_all_inclusive/pom.rb
Expand Up @@ -14,7 +14,8 @@

# ruby-maven will dump an equivalent pom.xml
properties( 'tesla.dump.pom' => 'pom.xml',
'jruby.home' => '../../../../../' )
'jruby.home' => '../../../../../',
'inline' => true )

execute 'jrubydir', 'process-resources' do |ctx|
require 'jruby/commands'
Expand All @@ -32,7 +33,7 @@
'DynamicImport-Package' => '*',
'Include-Resource' => '{maven-resources}',
'Import-Package' => '!org.jruby.*,*;resolution:=optional',
'Embed-Dependency' => '*;type=jar;scope=compile|runtime;inline=true',
'Embed-Dependency' => '*;type=jar;scope=compile|runtime;inline=${inline}',
'Embed-Transitive' => true
} ) do
# pack the bundle before the test phase
Expand Down
3 changes: 2 additions & 1 deletion maven/jruby/src/templates/osgi_all_inclusive/pom.xml
Expand Up @@ -13,6 +13,7 @@
<jruby.version>@project.version@</jruby.version>
<url.version>1.5.2</url.version>
<exam.version>3.0.3</exam.version>
<inline>true</inline>
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
<logback.version>1.0.13</logback.version>
<tesla.dump.pom>pom.xml</tesla.dump.pom>
Expand Down Expand Up @@ -129,7 +130,7 @@
<DynamicImport-Package>*</DynamicImport-Package>
<Include-Resource>{maven-resources}</Include-Resource>
<Import-Package>!org.jruby.*,*;resolution:=optional</Import-Package>
<Embed-Dependency>*;type=jar;scope=compile|runtime;inline=true</Embed-Dependency>
<Embed-Dependency>*;type=jar;scope=compile|runtime;inline=${inline}</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive>
</instructions>
</configuration>
Expand Down
@@ -0,0 +1 @@
inline=false

0 comments on commit 1bc0673

Please sign in to comment.