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

Commits on May 13, 2015

  1. adds maven-wrapper

    mkristian committed May 13, 2015
    Copy the full SHA
    a0b8c74 View commit details
  2. Copy the full SHA
    20396fd View commit details
  3. Copy the full SHA
    01a2709 View commit details
  4. Copy the full SHA
    54e28cd View commit details
Showing with 463 additions and 929 deletions.
  1. +1 −0 .gitignore
  2. +8 −0 .mvn/extensions.xml
  3. BIN .mvn/wrapper/maven-wrapper.jar
  4. +1 −0 .mvn/wrapper/maven-wrapper.properties
  5. +1 −1 .travis.yml
  6. +25 −49 BUILDING.md
  7. +2 −2 core/pom.rb
  8. +2 −3 lib/pom.rb
  9. +2 −2 maven/jruby-complete/pom.rb
  10. +0 −210 maven/jruby-complete/pom.xml
  11. +0 −230 maven/jruby-dist/pom.xml
  12. +0 −155 maven/jruby-jars/pom.xml
  13. +0 −155 maven/jruby/pom.xml
  14. +0 −111 maven/pom.xml
  15. +234 −0 mvnw
  16. +177 −0 mvnw.bat
  17. +2 −3 pom.rb
  18. +6 −6 test/check_versions.sh
  19. +2 −2 truffle/pom.rb
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -85,6 +85,7 @@ install/updates.xml
maven/jruby/src/it/osgi_*
maven/jruby/src/it/j2ee_wlp
maven/jruby-complete/src/it/osgi*
maven/jruby-complete/pom.xml

# IntelliJ project files
.idea
8 changes: 8 additions & 0 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<extensions>
<extension>
<groupId>io.takari.polyglot</groupId>
<artifactId>polyglot-ruby</artifactId>
<version>0.1.9</version>
</extension>
</extensions>
Binary file added .mvn/wrapper/maven-wrapper.jar
Binary file not shown.
1 change: 1 addition & 0 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.1/apache-maven-3.3.1-bin.zip
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -85,7 +85,7 @@ branches:
- /^test-.*$/
- /^ha-feature/

script: if [[ -v COMMAND ]]; then $COMMAND; else travis_retry mvn -Pbootstrap clean install -Dinvoker.skip=false $PHASE | egrep -v 'Download|\\[exec\\] [[:digit:]]+/[[:digit:]]+|^[[:space:]]*\\[exec\\][[:space:]]*$' ; [ ${PIPESTATUS[0]} == 0 ]; fi
script: if [[ -v COMMAND ]]; then $COMMAND; else travis_retry ./mvnw -Pbootstrap clean install -Dinvoker.skip=false $PHASE | egrep -v 'Download|\\[exec\\] [[:digit:]]+/[[:digit:]]+|^[[:space:]]*\\[exec\\][[:space:]]*$' ; [ ${PIPESTATUS[0]} == 0 ]; fi
install: /bin/true
notifications:
irc:
74 changes: 25 additions & 49 deletions BUILDING.md
Original file line number Diff line number Diff line change
@@ -20,16 +20,15 @@ from a git clone), you need to build the lib/jruby.jar. The
command to execute is:

```
mvn
./mvnw
```

This will run the default "install" goal (```mvn install```) and will do all of the following:

* Compile JRuby
* Compile JRuby-Truffle
* Compile JRuby-Truffle and place it in `lib/jruby-truffle.jar`
* Build `lib/jruby.jar`, needed for running at command line
* It will install the default gems specifications `lib/ruby/gems/shared/specifications/default/` and the ruby files of
those gems in `lib/ruby/stdlib/`.
* It will install the default gems specifications `lib/ruby/gems/shared/specifications/default/` and the ruby files of those gems in `lib/ruby/stdlib/`.

The environment is now suitable for running Ruby applications.

@@ -63,6 +62,12 @@ Developing and Testing
JRuby employs a large suite of tests, so there are many ways you can
verify that JRuby is still fully functional.

### Hacking the Build System

For this only the ***pom.rb*** needs to edited. using mvn-3.3.x or the maven wrapper `./mvnw` will generate the pom.xml file where needed. For the jar files of the build those pom.xml will be generated for some use-cases, i.e. some IDEs need them.

To regenerate the pom.xml just run `./mvnw` which will create them.

### Setup Testing

In order to prepare JRuby for testing, you must bootstrap the dev
@@ -86,12 +91,15 @@ one of the gems to a newer version or clean out all installed gems.

### Incremental compiling

After changing Java code, you can recompile quickly by running:
After changing Java code, you can recompile quickly by running one of the
jar files by

```
mvn
mvn -pl core
mvn -pl truffle
```


### Day to Day Testing

For normal day-to-day testing, we recommend running the Ruby (MRI) tests
@@ -228,100 +236,68 @@ mvn -Pclean
Distribution Packages
---------------------

all distribution packages need maven-3.3.x or the use of supplied maven wrapper. all examples below will show the use of the maven wrapper.

###the tar.gz and zip distribution packages###

```
mvn -Pdist
./mvnw -Pdist
```

the files will be found in ./maven/jruby-dist/target

###jruby-complete.jar###

```
mvn -Pcomplete
./mvnw -Pcomplete
```

the file will be in ./maven/jruby-complete/target

###jruby maven artifacts###

```
mvn -Pmain
./mvnw -Pmain
```

and those files will be installed in you maven local-repository ready to use with maven, ivy, buildr, etc

###jruby jars gem###

```
mvn -Pjruby-jars
./mvnw -Pjruby-jars
```

the gem will be in ./maven/jruby-jars/pkg

### building ALL packages ###

```
mvn -Pall
./mvnw -Pall
```

### cleaning the build ###

this will also clean the **ext** directories, i.e. a new build will then use the latest code from there for **lib/ruby**

```
jruby -S rmvn -Pclean
./mvnw -Pclean
```

## release ##

first set the new version in the file *VERSION* inside the root directory and then

```
rake maven:dump_poms
```
or
```
rmvn installe -Pall
```

Now deploy the maven
artifact to sonatype oss.
first set the new version in the file *VERSION* inside the root directory and then to deploy the maven artifact to sonatype oss execute:

```
mvn clean deploy -Psonatype-oss-release
./mvnw clean deploy -Psonatype-oss-release
```

go to oss.sonatype.org and close the deployment which will check if all 'required' files are in place and then finally push the release to maven central and . . .

hacking the build system
------------------------

the build system uses the **ruby-maven** gem and with this the build files are **pom.rb** and **Mavenfile**. the **Mavenfile** are used whenever the module produces a gem and uses the gemspec file for the gem for setting up the POM. otherwise **pom.rb** are used. so any change in the build-system is done in those files !!!!

instead of ```mvn``` the ```rmvn``` command is used. this command will also generate **pom.xml** files which can be used by regular maven.

to (re)generate all pom.xml use
```
rake maven:dump_poms
```
(which is basically ```rmvn validate -Pall```)

about the ruby DSL for those poms just look in the existing pom.rb/Mavenfile files - there are plenty of examples for all kind of situations. (more documentation to come).

regular maven uses the the jruby from the installation, i.e. 9.0.0.0. this also means that a regular maven run does not depend under the hood on any other jruby versions from maven central.

at some parts there are **inline** plugins in **pom.rb** or **Mavenfile** which will work directly with regular maven where there is a special plugin running those ruby parts. see **./lib/pom.rb**.

### Start a new version

After the release set the new development version in *VERSION* and generate the pom.xml files

```
rake maven:dump_poms
```
or
```
rmvn install -Pall
./mvnw
```
4 changes: 2 additions & 2 deletions core/pom.rb
Original file line number Diff line number Diff line change
@@ -5,8 +5,8 @@
inherit 'org.jruby:jruby-parent', version
id 'org.jruby:jruby-core'

properties( 'tesla.dump.pom' => 'pom.xml',
'tesla.dump.readonly' => true,
properties( 'polyglot.dump.pom' => 'pom.xml',
'polyglot.dump.readonly' => true,

'tzdata.version' => '2013d',
'tzdata.scope' => 'provided',
5 changes: 2 additions & 3 deletions lib/pom.rb
Original file line number Diff line number Diff line change
@@ -57,9 +57,8 @@ def to_pathname
id 'jruby-stdlib'
inherit "org.jruby:jruby-parent", version

properties( 'tesla.dump.pom' => 'pom.xml',
'tesla.dump.readonly' => true,
'tesla.version' => '0.1.1',
properties( 'polyglot.dump.pom' => 'pom.xml',
'polyglot.dump.readonly' => true,
'jruby.plugins.version' => '1.0.9',
'gem.home' => '${basedir}/ruby/gems/shared',
# we copy everything into the target/classes/META-INF
4 changes: 2 additions & 2 deletions maven/jruby-complete/pom.rb
Original file line number Diff line number Diff line change
@@ -9,8 +9,8 @@
inherit "org.jruby:jruby-artifacts:#{version}"
packaging 'bundle'

properties( 'tesla.dump.pom' => 'pom.xml',
'tesla.dump.readonly' => true,
properties( 'polyglot.dump.pom' => 'pom.xml',
'polyglot.dump.readonly' => true,
'main.basedir' => '${project.parent.parent.basedir}',
'jruby.complete.home' => '${project.build.outputDirectory}/META-INF/jruby.home' )

Loading