Skip to content

Commit

Permalink
[build] include ext/ in the bootstrap profile
Browse files Browse the repository at this point in the history
the gem build in ext/ are only used to be included into the stdlib
and is only a way to "modularize" the codebase. these ext/ gems are not
published any more to sonatype.org repo. so everything needs to build
locally - travis, development machine, etc
  • Loading branch information
mkristian committed Jan 17, 2015
1 parent 2e489f2 commit e792e98
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 22 deletions.
1 change: 1 addition & 0 deletions ext/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pkg
*.jar
*gemspec.xml
2 changes: 1 addition & 1 deletion ext/readline/Mavenfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jar 'org.jruby:jruby:1.7.11', :scope => :provided

properties( 'gem.home' => '${basedir}/../target/rubygems',
'gem.path' => '${gem.home}',
'jruby.plugins.version' => '1.0.5',
'jruby.plugins.version' => '1.0.7',
'tesla.dump.pom' => 'pom.xml',
'tesla.dump.readonly' => true )

Expand Down
2 changes: 1 addition & 1 deletion ext/readline/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<tesla.dump.readonly>true</tesla.dump.readonly>
<gem.path>${gem.home}</gem.path>
<gem.home>${basedir}/../target/rubygems</gem.home>
<jruby.plugins.version>1.0.5</jruby.plugins.version>
<jruby.plugins.version>1.0.7</jruby.plugins.version>
<tesla.dump.pom>pom.xml</tesla.dump.pom>
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion ext/ripper/Mavenfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jar 'org.jruby:jruby:1.7.11', :scope => :provided

properties( 'gem.home' => '${basedir}/../target/rubygems',
'gem.path' => '${gem.home}',
'jruby.plugins.version' => '1.0.5',
'jruby.plugins.version' => '1.0.7',
'tesla.dump.pom' => 'pom.xml',
'tesla.dump.readonly' => true )

Expand Down
2 changes: 1 addition & 1 deletion ext/ripper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<tesla.dump.readonly>true</tesla.dump.readonly>
<gem.path>${gem.home}</gem.path>
<gem.home>${basedir}/../target/rubygems</gem.home>
<jruby.plugins.version>1.0.5</jruby.plugins.version>
<jruby.plugins.version>1.0.7</jruby.plugins.version>
<tesla.dump.pom>pom.xml</tesla.dump.pom>
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
</properties>
Expand Down
16 changes: 8 additions & 8 deletions maven/jruby-jars/Mavenfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ gemspec

version = File.read( File.join( basedir, '..', '..', 'VERSION' ) ).strip

inherit "org.jruby:jruby-artifacts:#{version}"

ruby_version = model.version
# maven does treats prereleased version as snapshot - undo it here
ruby_version = model.version.sub( /-SNAPSHOT/, '' )
self.version nil

model.version = nil
inherit "org.jruby:jruby-artifacts:#{version}"

name "JRuby Jars Gem"

Expand Down Expand Up @@ -38,10 +38,10 @@ properties( 'tesla.dump.pom' => 'pom.xml',
end

execute 'copy jruby.jar', 'prepare-package' do |ctx|
FileUtils.cp( File.join( ctx.project.properties[ 'jruby_home' ],
'lib',
'jruby.jar' ),
File.join( ctx.project.basedir.to_s,
source = File.expand_path( ctx.project.properties[ 'jruby_home' ].to_pathname )
# TODO somehow the lib/jruby.jar gets moved away to avoid conflicts
FileUtils.cp( Dir[ File.join( source, 'lib/jruby*.jar' ) ].first,
File.join( ctx.project.basedir.to_pathname,
'lib',
"jruby-core-#{ctx.project.version}.jar" ) )
end
Expand Down
23 changes: 15 additions & 8 deletions pom.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
[ 'bootstrap', 'bootstrap-no-launcher' ].each do |name|
profile name do

modules [ 'test' ]
modules [ 'ext', 'test' ]

end
end
Expand Down Expand Up @@ -241,16 +241,23 @@
end
end

all_modules = [ 'test', 'maven' ]
profile 'jruby_complete_jar_extended' do

[ 'all', 'jruby_complete_jar_extended' ].each do |name|
profile name do
modules [ 'test', 'maven' ]

modules all_modules
build do
default_goal 'install'
end
end

build do
default_goal 'install'
end
all_modules = [ 'ext', 'test', 'maven' ]

profile 'all' do

modules all_modules

build do
default_goal 'install'
end
end

Expand Down
8 changes: 6 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -601,12 +601,14 @@
<profile>
<id>bootstrap</id>
<modules>
<module>ext</module>
<module>test</module>
</modules>
</profile>
<profile>
<id>bootstrap-no-launcher</id>
<modules>
<module>ext</module>
<module>test</module>
</modules>
</profile>
Expand Down Expand Up @@ -737,7 +739,7 @@
</properties>
</profile>
<profile>
<id>all</id>
<id>jruby_complete_jar_extended</id>
<build>
<defaultGoal>install</defaultGoal>
</build>
Expand All @@ -747,11 +749,12 @@
</modules>
</profile>
<profile>
<id>jruby_complete_jar_extended</id>
<id>all</id>
<build>
<defaultGoal>install</defaultGoal>
</build>
<modules>
<module>ext</module>
<module>test</module>
<module>maven</module>
</modules>
Expand All @@ -762,6 +765,7 @@
<defaultGoal>clean</defaultGoal>
</build>
<modules>
<module>ext</module>
<module>test</module>
<module>maven</module>
</modules>
Expand Down

0 comments on commit e792e98

Please sign in to comment.