Skip to content

Commit

Permalink
Merge pull request #17 from monkstone/patch-2
Browse files Browse the repository at this point in the history
Patch 2
  • Loading branch information
headius authored Oct 7, 2021
2 parents 5908547 + ebda489 commit 5cef741
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 7 deletions.
28 changes: 27 additions & 1 deletion extensions/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,39 @@ This project aims to demo small and easy concepts around jruby extensions, this
Or for the impatient

```bash
mvn # builds basic.jar
mvn # builds basic.jar in target folder
```

```bash
mvn javadoc:javadoc # javadoc
```

For jdk-11+ replace

```ruby
source: '${maven.compiler.source}',
target: '${maven.compiler.target}'
```

with

```ruby
release: '${maven.compiler.release}'
```
You may also wish to replace insertion of a manual Manifest, with an automatic module viz:

```ruby
plugin(:jar, '3.2.0',
'archive' => {
'manifestEntries' => {
'Automatic-Module-Name' => '${my.module}'
}
})
```




[polyglot maven]:https://github.com/takari/polyglot-maven
[wiki]:https://github.com/jruby/jruby/wiki/Method-Signatures-and-Annotations-in-JRuby-extensions
[guide]:https://github.com/jruby/jruby/wiki/Java-extensions-for-JRuby-using-polyglot-maven
7 changes: 4 additions & 3 deletions extensions/basic/jruby-ext/pom.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project 'jruby-ext' do

model_version '4.0.0'
id 'com.purbon:jruby-ext:1.2.2'
id 'com.purbon:jruby-ext:1.3.0'
packaging 'jar'

description 'example JRuby extension'
Expand All @@ -26,10 +26,11 @@
'source.directory' => 'src/main/java', # poxy Eclipse folders
'project.build.sourceEncoding' => 'utf-8',
'polyglot.dump.pom' => 'pom.xml',
'jruby.version' => '9.3.0.0',
'jruby.api' => 'http://jruby.org/apidocs/',
)

jar 'org.jruby:jruby:9.2.19.0'
jar 'org.jruby:jruby-base:${jruby.version}'

plugin_management do
plugin :resources, '3.1.0'
Expand All @@ -45,7 +46,7 @@
links: ['${jruby.api}']
)
plugin(
:jar, '3.1.1',
:jar, '3.2.0',
archive: {
manifestFile: 'MANIFEST.MF' # camel case reqd
}
Expand Down
6 changes: 3 additions & 3 deletions extensions/basic/jruby-ext/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ DO NOT MODIFY - GENERATED CODE
<modelVersion>4.0.0</modelVersion>
<groupId>com.purbon</groupId>
<artifactId>jruby-ext</artifactId>
<version>1.2.2</version>
<version>1.3.0</version>
<name>jruby-ext</name>
<description>example JRuby extension</description>
<developers>
Expand Down Expand Up @@ -44,8 +44,8 @@ DO NOT MODIFY - GENERATED CODE
<dependencies>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby</artifactId>
<version>9.2.19.0</version>
<artifactId>jruby-base</artifactId>
<version>9.3.0.0</version>
</dependency>
</dependencies>
<build>
Expand Down

0 comments on commit 5cef741

Please sign in to comment.