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: a96e0c0d9e50
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a6b2f37e1e42
Choose a head ref
  • 3 commits
  • 3 files changed
  • 1 contributor

Commits on Oct 4, 2016

  1. Copy the full SHA
    63269bb View commit details
  2. Copy the full SHA
    3bfe9ee View commit details
  3. Copy the full SHA
    a6b2f37 View commit details
Showing with 52 additions and 5 deletions.
  1. +17 −2 core/pom.rb
  2. +27 −0 core/pom.xml
  3. +8 −3 mx.jruby/mx_jruby.py
19 changes: 17 additions & 2 deletions core/pom.rb
Original file line number Diff line number Diff line change
@@ -26,7 +26,9 @@
'jruby.basedir' => '${basedir}/..',
'jruby.test.memory' => '3G',
'jruby.test.memory.permgen' => '2G',
'jruby.compile.memory' => '2G' )
'jruby.compile.memory' => '2G',

'create.sources.jar' => false )

IO.foreach(File.join(basedir, '..', 'default.build.properties')) do |line|
line.chomp!
@@ -270,7 +272,8 @@
'shadedPattern' => 'org.jruby.org.objectweb' } ],
'outputFile' => '${jruby.basedir}/lib/jruby.jar',
'transformers' => [ { '@implementation' => 'org.apache.maven.plugins.shade.resource.ManifestResourceTransformer',
'mainClass' => 'org.jruby.Main' } ] )
'mainClass' => 'org.jruby.Main' } ],
'createSourcesJar' => '${create.sources.jar}' )
end

[:all, :release, :main, :osgi, :j2ee, :complete, :dist, :'jruby_complete_jar_extended', :'jruby-jars' ].each do |name|
@@ -387,4 +390,16 @@
'tzdata.scope' => 'runtime' )

end

profile 'generate sources jar' do
activation do
property( :name => 'create.sources.jar', :value => 'true' )
end

plugin :source do
execute_goals( 'jar-no-fork',
:id => 'pack core sources',
:phase => 'prepare-package' ) # Needs to run before the shade plugin
end
end
end
27 changes: 27 additions & 0 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -43,6 +43,7 @@ DO NOT MODIFIY - GENERATED CODE
<version.ruby.major>2.3</version.ruby.major>
<unsafe.version>8.92.1</unsafe.version>
<release.dir>release</release.dir>
<create.sources.jar>false</create.sources.jar>
<lib.dir>lib</lib.dir>
<rails.dir>${test.dir}/rails</rails.dir>
<parser.dir>core/src/main/java/org/jruby/parser</parser.dir>
@@ -623,6 +624,7 @@ DO NOT MODIFIY - GENERATED CODE
<mainClass>org.jruby.Main</mainClass>
</transformer>
</transformers>
<createSourcesJar>${create.sources.jar}</createSourcesJar>
</configuration>
</execution>
</executions>
@@ -1102,5 +1104,30 @@ DO NOT MODIFIY - GENERATED CODE
<tzdata.scope>runtime</tzdata.scope>
</properties>
</profile>
<profile>
<id>generate sources jar</id>
<activation>
<property>
<name>create.sources.jar</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>pack core sources</id>
<phase>prepare-package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
11 changes: 8 additions & 3 deletions mx.jruby/mx_jruby.py
Original file line number Diff line number Diff line change
@@ -124,12 +124,17 @@ def mavenSetup():

class JRubyCoreMavenProject(mx.MavenProject):
def getBuildTask(self, args):
return MavenBuildTask(self, args, 1)
return JRubyCoreBuildTask(self, args, 1)

def getResults(self):
return None

class MavenBuildTask(mx.BuildTask):
def get_source_path(self, resolve):
with open(join(_suite.dir, 'VERSION')) as f:
version = f.readline().strip()
return join(_suite.dir, 'core/target/jruby-core-' + version + '-shaded-sources.jar')

class JRubyCoreBuildTask(mx.BuildTask):
def __str__(self):
return 'Building {} with Maven'.format(self.subject)

@@ -173,7 +178,7 @@ def build(self):
cwd = _suite.dir
maven_repo_arg, env = mavenSetup()
mx.log("Building jruby-core with Maven")
mx.run_maven(['-q', '-DskipTests', maven_repo_arg, '-pl', 'core,lib'], cwd=cwd, env=env)
mx.run_maven(['-q', '-DskipTests', maven_repo_arg, '-Dcreate.sources.jar', '-pl', 'core,lib'], cwd=cwd, env=env)
# Install Bundler
gem_home = join(_suite.dir, 'lib', 'ruby', 'gems', 'shared')
env['GEM_HOME'] = gem_home