Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'jruby-1_7'
Conflicts:
	.travis.yml
	build.xml
	core/pom.xml
	lib/pom.rb
	maven/jruby-complete/src/it/app_using_classpath_uri/osgi_app/src/test/java/org/jruby/embed/osgi/test/JRubyOsgiEmbedTest.java
	maven/jruby-noasm/src/it/helloworld/pom.xml
	maven/jruby/pom.rb
	maven/jruby/src/it/integrity/verify.bsh
	maven/pom.rb
	maven/pom.xml
	pom.xml
  • Loading branch information
mkristian committed Oct 7, 2014
2 parents 84df0ad + 3c02893 commit 26152a6
Show file tree
Hide file tree
Showing 62 changed files with 396 additions and 742 deletions.
6 changes: 2 additions & 4 deletions .gitignore
Expand Up @@ -79,11 +79,9 @@ dependency-reduced-pom.xml
install/updates.xml

# generated ITs
maven/jruby/src/it/osgi_*equinox*
maven/jruby/src/it/osgi_*felix-3*
maven/jruby/src/it/osgi_*knoplerfish
maven/jruby/src/it/osgi_*
maven/jruby/src/it/j2ee_wlp
maven/jruby-complete/src/it/osgi_many_bundles_with_embedded_gems_*
maven/jruby-complete/src/it/osgi*

# IntelliJ project files
.idea
Expand Down
4 changes: 4 additions & 0 deletions .travis.yml
Expand Up @@ -42,6 +42,10 @@ matrix:
jdk: oraclejdk7
- env: TARGET='-Pcomplete'
jdk: oraclejdk8
- env: TARGET='-Posgi'
jdk: openjdk7
- env: TARGET='-Pj2ee'
jdk: oraclejdk7
fast_finish: true
allow_failures:
- env: TARGET='-Prake -Dtask=spec:compiler'
Expand Down
2 changes: 1 addition & 1 deletion core/pom.rb
Expand Up @@ -259,7 +259,7 @@
end


[ :dist, :'jruby-jars', :main, :all, :complete, :release, :snapshots ].each do |name|
[ :osgi, :dist, :'jruby-jars', :main, :all, :complete, :release, :snapshots ].each do |name|
profile name do
plugin :shade do
execute_goals( 'shade',
Expand Down
57 changes: 57 additions & 0 deletions core/pom.xml
Expand Up @@ -555,6 +555,63 @@
</plugins>
</build>
<profiles>
<profile>
<id>osgi</id>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>pack jruby-core-noasm.jar</id>
<phase>verify</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>noasm</shadedClassifierName>
<artifactSet>
<includes>
<include>com.github.jnr:jnr-ffi</include>
<include>org.ow2.asm:*</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>org.objectweb</pattern>
<shadedPattern>org.jruby.org.objectweb</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
<execution>
<id>pack jruby-core-complete.jar</id>
<phase>verify</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>complete</shadedClassifierName>
<relocations>
<relocation>
<pattern>org.objectweb</pattern>
<shadedPattern>org.jruby.org.objectweb</shadedPattern>
</relocation>
</relocations>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.jruby.Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>dist</id>
<build>
Expand Down
6 changes: 4 additions & 2 deletions lib/pom.rb
Expand Up @@ -22,7 +22,7 @@ def version
# the versions are declared in ../pom.xml
default_gems =
[
ImportedGem.new( 'jruby-openssl', '0.9.6.dev-SNAPSHOT', true ),
ImportedGem.new( 'jruby-openssl', '0.9.5', true ),
ImportedGem.new( 'jruby-readline', '1.0.dev-SNAPSHOT', false ),
ImportedGem.new( 'jruby-ripper', '2.1.0.dev-SNAPSHOT', false, '2.1' ),
ImportedGem.new( 'rake', 'rake.version', true ),
Expand Down Expand Up @@ -75,7 +75,9 @@ def to_pathname

plugin( :clean,
:filesets => [ { :directory => '${basedir}/ruby/gems/shared/specifications/default',
:includes => [ '*' ] } ] )
:includes => [ '*' ] },
{ :directory => '${basedir}/ruby/shared',
:includes => [ '**/bouncycastle/**/*.jar' ] } ] )

# tell maven to download the respective gem artifacts
default_gems.each do |g|
Expand Down
8 changes: 7 additions & 1 deletion lib/pom.xml
Expand Up @@ -26,7 +26,7 @@
<dependency>
<groupId>rubygems</groupId>
<artifactId>jruby-openssl</artifactId>
<version>0.9.6.dev-SNAPSHOT</version>
<version>0.9.5</version>
<type>gem</type>
</dependency>
<dependency>
Expand Down Expand Up @@ -115,6 +115,12 @@
<include>*</include>
</includes>
</fileset>
<fileset>
<directory>${basedir}/ruby/shared</directory>
<includes>
<include>**/bouncycastle/**/*.jar</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
Expand Down
17 changes: 13 additions & 4 deletions maven/jruby-complete/pom.rb
Expand Up @@ -49,16 +49,25 @@

execute 'setup other osgi frameworks', :phase => 'pre-integration-test' do |ctx|
require 'fileutils'
felix = File.join( ctx.basedir.to_pathname, 'src', 'it', 'osgi_many_bundles_with_embedded_gems' )
[ 'equinox-3.6', 'equinox-3.7', 'felix-3.2' ].each do |m|
source = File.join( ctx.basedir.to_pathname, 'src', 'templates', 'osgi_many_bundles_with_embedded_gems' )
[ '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_many_bundles_with_embedded_gems_' + m )
FileUtils.cp_r( felix, target )
FileUtils.cp_r( source, target )
File.open( File.join( target, 'invoker.properties' ), 'w' ) do |f|
f.puts 'invoker.profiles = ' + m
end
end
end

plugin( :clean ) do
execute_goals( :clean,
:phase => :clean,
:id => 'clean-extra-osgi-ITs',
:filesets => [ { :directory => '${basedir}/src/it',
:includes => ['osgi*/**'] } ],
:failOnError => false )
end

profile 'sonatype-oss-release' do

# use the javadocs and sources from jruby-core !!!
Expand Down Expand Up @@ -92,6 +101,6 @@
activation do
jdk '1.8'
end
plugin :invoker, :pomExcludes => ['osgi_many_bundles_with_embedded_gems_felix-3.2/pom.xml']
plugin :invoker, :pomExcludes => ['osgi_many_bundles_with_embedded_gems_felix-3.2/pom.xml', '${its.j2ee}', '${its.osgi}']
end
end
25 changes: 25 additions & 0 deletions maven/jruby-complete/pom.xml
Expand Up @@ -66,6 +66,29 @@
<skipSource>true</skipSource>
</configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>clean-extra-osgi-ITs</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/src/it</directory>
<includes>
<include>osgi*/**</include>
</includes>
</fileset>
</filesets>
<failOnError>false</failOnError>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.tesla.polyglot</groupId>
<artifactId>tesla-polyglot-maven-plugin</artifactId>
Expand Down Expand Up @@ -170,6 +193,8 @@
<configuration>
<pomExcludes>
<pomExclude>osgi_many_bundles_with_embedded_gems_felix-3.2/pom.xml</pomExclude>
<pomExclude>${its.j2ee}</pomExclude>
<pomExclude>${its.osgi}</pomExclude>
</pomExcludes>
</configuration>
</plugin>
Expand Down
@@ -1,5 +1,5 @@
JAVA=`which java`
# jirb_swing does not work in those test environments
for i in irb jirb ; do
echo "puts 'hello $i'" | PATH= $JAVA -jar jruby-complete-1.7.16-SNAPSHOT.jar -S $i
echo "puts 'hello $i'" | PATH= $JAVA -jar jruby-complete-${1}.jar -S $i
done
Expand Up @@ -8,15 +8,15 @@
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-complete</artifactId>
<version>1.7.16-SNAPSHOT</version>
<version>@project.version@</version>
<type>jar</type>
</dependency>
</dependencies>

<build>
<resources>
<resource>
<directory>../../local-repo/org/jruby/jruby-complete/1.7.16-SNAPSHOT</directory>
<directory>../../local-repo/org/jruby/jruby-complete/@project.version@</directory>
<includes>
<include>jruby-complete-*.jar</include>
</includes>
Expand All @@ -36,6 +36,7 @@
<executable>sh</executable>
<arguments>
<argument>irb.sh</argument>
<argument>@project.version@</argument>
</arguments>
</configuration>
</execution>
Expand Down
3 changes: 0 additions & 3 deletions maven/jruby-complete/src/it/helloworld/invoker.properties

This file was deleted.

45 changes: 0 additions & 45 deletions maven/jruby-complete/src/it/helloworld/pom.xml

This file was deleted.

20 changes: 0 additions & 20 deletions maven/jruby-complete/src/it/helloworld/verify.bsh

This file was deleted.

25 changes: 25 additions & 0 deletions maven/jruby-complete/src/it/integrity/pom.xml
Expand Up @@ -106,6 +106,31 @@
</arguments>
</configuration>
</execution>
<execution>
<id>load default gems</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<!-- automatically creates the classpath using all project dependencies,
also adding the project build directory -->
<classpath/>
<argument>org.jruby.Main</argument>
<argument>-e</argument>
<!-- make sure openssl loads -->
<argument>
require 'jar-dependencies'
require 'openssl'
require 'krypt'
puts Gem.loaded_specs.keys.sort.join(',')
</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand Down
5 changes: 5 additions & 0 deletions maven/jruby-complete/src/it/integrity/verify.bsh
Expand Up @@ -33,3 +33,8 @@ if ( !log.contains( expected ) )
{
throw new RuntimeException( "log file does not contain '" + expected + "'" );
}
expected = "ffi,jar-dependencies,jruby-openssl,krypt,krypt-core,krypt-provider-jdk";
if ( !log.contains( expected ) )
{
throw new RuntimeException( "log file does not contain '" + expected + "'" );
}

0 comments on commit 26152a6

Please sign in to comment.