Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 09f09129003c
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 69147e553552
Choose a head ref
  • 2 commits
  • 6 files changed
  • 1 contributor

Commits on May 11, 2015

  1. [build] build jruby-core artifact only when needed

    triggered by any of the distribution artifact's profile: dist,
    jruby-jars, main, etc
    
    do not include the jffi-native.jar in lib/jruby.jar as they
    are already unpacked in lib/jni
    mkristian committed May 11, 2015
    Copy the full SHA
    841fe3e View commit details
  2. [build] make sure we do not have org.objectasm.* in jruby-complete.jar

    when packing the osgi bundle we need to make sure things are excluded properly.
    adjusted the test for this as well a bit.
    
    fixes #2887
    mkristian committed May 11, 2015
    Copy the full SHA
    69147e5 View commit details
Showing with 305 additions and 37 deletions.
  1. +19 −11 core/pom.rb
  2. +270 −20 core/pom.xml
  3. +6 −2 maven/jruby-complete/pom.rb
  4. +7 −1 maven/jruby-complete/pom.xml
  5. +2 −2 maven/jruby-complete/src/it/integrity/pom.xml
  6. +1 −1 maven/pom.rb
30 changes: 19 additions & 11 deletions core/pom.rb
Original file line number Diff line number Diff line change
@@ -252,16 +252,24 @@
'shadedPattern' => 'org.jruby.org.objectweb' } ],
'outputFile' => '${jruby.basedir}/lib/jruby.jar',
'transformers' => [ { '@implementation' => 'org.apache.maven.plugins.shade.resource.ManifestResourceTransformer',
'mainClass' => 'org.jruby.Main' } ] )
execute_goals( 'shade',
:id => 'shade the asm classes',
:phase => 'package',
'artifactSet' => {
'includes' => [ 'com.github.jnr:jnr-ffi',
'org.ow2.asm:*' ]
},
'relocations' => [ { 'pattern' => 'org.objectweb',
'shadedPattern' => 'org.jruby.org.objectweb' } ] )
'mainClass' => 'org.jruby.Main' } ],
:artifactSet => { :excludes => ['com.github.jnr:jffi:native'] } )
end

[:release, :main, :osgi, :j2ee, :complete, :dist, :'jruby_complete_jar_extended', :'jruby-jars' ].each do |name|
profile name do
plugin :shade do
execute_goals( 'shade',
:id => 'shade the asm classes',
:phase => 'package',
'artifactSet' => {
'includes' => [ 'com.github.jnr:jnr-ffi',
'org.ow2.asm:*' ]
},
'relocations' => [ { 'pattern' => 'org.objectweb',
'shadedPattern' => 'org.jruby.org.objectweb' } ] )
end
end
end

profile 'jruby.bash' do
@@ -322,7 +330,7 @@
profile 'build.properties' do

activation do
file( :exits => '../build.properties' )
file( :exists => '../build.properties' )
end

plugin 'org.codehaus.mojo:properties-maven-plugin:1.0-alpha-2' do
290 changes: 270 additions & 20 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -544,34 +544,282 @@
<mainClass>org.jruby.Main</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
<execution>
<id>shade the asm classes</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>com.github.jnr:jnr-ffi</include>
<include>org.ow2.asm:*</include>
</includes>
<excludes>
<exclude>com.github.jnr:jffi:native</exclude>
</excludes>
</artifactSet>
<relocations>
<relocation>
<pattern>org.objectweb</pattern>
<shadedPattern>org.jruby.org.objectweb</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>shade the asm classes</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<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>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>main</id>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>shade the asm classes</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<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>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>osgi</id>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>shade the asm classes</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<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>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>j2ee</id>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>shade the asm classes</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<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>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>complete</id>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>shade the asm classes</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<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>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>dist</id>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>shade the asm classes</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<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>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jruby_complete_jar_extended</id>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>shade the asm classes</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<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>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jruby-jars</id>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>shade the asm classes</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<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>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jruby.bash</id>
<activation>
@@ -651,7 +899,9 @@
<profile>
<id>build.properties</id>
<activation>
<file />
<file>
<exists>../build.properties</exists>
</file>
</activation>
<build>
<plugins>
8 changes: 6 additions & 2 deletions maven/jruby-complete/pom.rb
Original file line number Diff line number Diff line change
@@ -15,7 +15,10 @@
'jruby.complete.home' => '${project.build.outputDirectory}/META-INF/jruby.home' )

scope :provided do
jar 'org.jruby:jruby-core:${project.version}'
jar 'org.jruby:jruby-core:${project.version}' do
# this needs to match the Embed-Dependency on the maven-bundle-plugin
exclusion 'com.github.jnr:jnr-ffi'
end
jar 'org.jruby:jruby-stdlib:${project.version}'
end

@@ -33,7 +36,8 @@
'Bundle-Name' => 'JRuby ${project.version}',
'Bundle-Description' => 'JRuby ${project.version} OSGi bundle',
'Bundle-SymbolicName' => 'org.jruby.jruby',
'Embed-Dependency' => '*;type=jar;scope=provided;inline=true',
# the artifactId exclusion needs to match the jruby-core from above
'Embed-Dependency' => '*;type=jar;scope=provided;inline=true;artifactId=!jnr-ffi',
'Embed-Transitive' => true
} ) do
# TODO fix DSL
8 changes: 7 additions & 1 deletion maven/jruby-complete/pom.xml
Original file line number Diff line number Diff line change
@@ -23,6 +23,12 @@
<artifactId>jruby-core</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>jnr-ffi</artifactId>
<groupId>com.github.jnr</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jruby</groupId>
@@ -51,7 +57,7 @@
<Bundle-Name>JRuby ${project.version}</Bundle-Name>
<Bundle-Description>JRuby ${project.version} OSGi bundle</Bundle-Description>
<Bundle-SymbolicName>org.jruby.jruby</Bundle-SymbolicName>
<Embed-Dependency>*;type=jar;scope=provided;inline=true</Embed-Dependency>
<Embed-Dependency>*;type=jar;scope=provided;inline=true;artifactId=!jnr-ffi</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive>
</instructions>
</configuration>
4 changes: 2 additions & 2 deletions maven/jruby-complete/src/it/integrity/pom.xml
Original file line number Diff line number Diff line change
@@ -148,8 +148,8 @@
<!-- make sure openssl loads -->
<argument>
begin
import_java "org.objectweb.asm.ClassWriter"
raise "error there is org.objectweb.asm.ClassWriter on the classpath"
a = org.objectweb.asm.ClassWriter
raise "error there is org.objectweb.asm.ClassWriter on the classpath: #{a}"
rescue NameError => e
puts "there is NO org.objectweb.asm.ClassWriter on the classpath"
end
2 changes: 1 addition & 1 deletion maven/pom.rb
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@
# module to profile map
map = { 'jruby' => [ :release, :main, :osgi, :j2ee ],
'jruby-complete' => [ :release, :complete, :osgi, :'jruby_complete_jar_extended'],
'jruby-jars' => [ :release, 'jruby-jars' ],
'jruby-jars' => [ :release, :'jruby-jars' ],
'jruby-dist' => [ :release, :dist ]
}