These are chat archives for jruby-gradle/jruby-gradle-plugin

27th
Aug 2014
Schalk W. Cronjé
@ysb33r
Aug 27 2014 07:59
We you wake up look at this asciidoctor issue - asciidoctor/asciidoctorj#193
R. Tyler Croy
@rtyler
Aug 27 2014 15:05
@ysb33r oh yeah, the jruby-gradle-jar-plugin should solve that easy peasy
rtyler @rtyler yawns
Schalk W. Cronjé
@ysb33r
Aug 27 2014 16:04
How’s your refactoring coming on?
R. Tyler Croy
@rtyler
Aug 27 2014 16:07
yesterday ended up quite meeting-ful so I didn't get to any of it
Schalk W. Cronjé
@ysb33r
Aug 27 2014 16:30
I can do a bit this evening
will result in 3 PRs
R. Tyler Croy
@rtyler
Aug 27 2014 16:32
if you'd like to, I'm okay with that
I've got a new manager on my team this week, which is making things very unpredictable
Schalk W. Cronjé
@ysb33r
Aug 27 2014 16:33
Nice. If your org ever needs a Agile Coach on a 3 week consultation, pass my details on to them :)
ysb33r @ysb33r self-promotion
R. Tyler Croy
@rtyler
Aug 27 2014 16:37
heh
@ysb33r how about this, if you want to pull out the Jar stuff, I can pull out the War stuff
since asciidoctor needs the jar, and I need the war :P
Schalk W. Cronjé
@ysb33r
Aug 27 2014 16:38
Give me 30min to see what I can come up with
Oh and the other bit was just shameless self-promotion
R. Tyler Croy
@rtyler
Aug 27 2014 16:40
I'm okay with that :D
Schalk W. Cronjé
@ysb33r
Aug 27 2014 17:09
making good progress. war & jar will compile, but base will. I think that is a good enough start
I pulled all of the war & jar code across to respective repos
and added JRubyXXXPlugin files as well. Will need need to have the properties files created in META-INF
R. Tyler Croy
@rtyler
Aug 27 2014 17:12
okay, are you passing this over to me now?
rtyler @rtyler looks at the clock
Schalk W. Cronjé
@ysb33r
Aug 27 2014 17:13
yip, PR on it’s way
you can hit WAR big time after that
R. Tyler Croy
@rtyler
Aug 27 2014 17:18
heh, okay
Schalk W. Cronjé
@ysb33r
Aug 27 2014 17:20
there is one integration test for jrubywar - I am not moving that yet. WIll disable it and think about a better way of executing the test
Schalk W. Cronjé
@ysb33r
Aug 27 2014 17:26
DONE
R. Tyler Croy
@rtyler
Aug 27 2014 17:30
\o/
@ysb33r these pull requests to the jar and war plugins
should I just pick those up and start working?
Schalk W. Cronjé
@ysb33r
Aug 27 2014 17:32
Yip
I just did the dirty work
R. Tyler Croy
@rtyler
Aug 27 2014 17:33
heh, okie doke
Schalk W. Cronjé
@ysb33r
Aug 27 2014 17:33
I’ll spend some time in the Jar plugin - I have an idea - Reading the JavaBasePlugin & JavaPLugin source code atm
I know the jar & war pR builds failed, but it was to be expected
rtyler @rtyler nods
R. Tyler Croy
@rtyler
Aug 27 2014 17:37
@ysb33r for versions of these plugins, I'm thinking this will work best: major.minor.patch where major is shared across plugins, but minor and patch are specific to the plugin
e.g. war 1.1 and jar 1.1.2 would work with base 1.x
Schalk W. Cronjé
@ysb33r
Aug 27 2014 17:38
good by me
Schalk W. Cronjé
@ysb33r
Aug 27 2014 17:53
I want to see if it is possible to extend the standard Jar task with a convention object rather than creating a derived JRubyJar task
R. Tyler Croy
@rtyler
Aug 27 2014 17:56
convention object?
Schalk W. Cronjé
@ysb33r
Aug 27 2014 17:56
the idea is that if when the o.g.j.jar plugin is applied all JARs can automatically add jruby stuff
but I have not tried it before, so a bit of researc is needed
R. Tyler Croy
@rtyler
Aug 27 2014 17:57
we'd still need a JRubyAppJar task I think
but I don't know much about what a convention object buys us
Schalk W. Cronjé
@ysb33r
Aug 27 2014 17:57
possibly
I don’t know whether it buys something yet ...
Schalk W. Cronjé
@ysb33r
Aug 27 2014 18:32
stuff that, decided against it
R. Tyler Croy
@rtyler
Aug 27 2014 18:33
heh
okied oke
rtyler @rtyler makes progress on jruby-gradle-war-plugin
Schalk W. Cronjé
@ysb33r
Aug 27 2014 19:33
For a Jruby-based jar, is the only extra stuff we need?
1 the gems
[2] optional executability
rtyler @rtyler nods
R. Tyler Croy
@rtyler
Aug 27 2014 19:58
I'm almost ready to push up a PR for my work on the war plugin if you want to look
it requires some changes in base too though
Schalk W. Cronjé
@ysb33r
Aug 27 2014 19:58
Like?
R. Tyler Croy
@rtyler
Aug 27 2014 20:03
plz hold
@ysb33r I just went ahead and pushed my changes into upstream/master of both base and war
R. Tyler Croy
@rtyler
Aug 27 2014 20:08
I still need to make jrubyPrepare depend on jrubyCacheJars in the war plugin
Schalk W. Cronjé
@ysb33r
Aug 27 2014 20:10
is it in rtyler or jruby-gradle?
R. Tyler Croy
@rtyler
Aug 27 2014 20:12
jruby-gradle
"upstream"
R. Tyler Croy
@rtyler
Aug 27 2014 20:17
@ysb33r do you happen to know how to generate Groovydocs for gradle plugins?
Schalk W. Cronjé
@ysb33r
Aug 27 2014 20:18
I know how to do javadocs, I never really bothered doing groovydoc
    task javadocJar(type: Jar) {
        description "An archive of the JavaDocs for Maven Central"
        classifier "javadoc"
        from javadoc
    }

    artifacts {
        archives javadocJar
    }
That’s how to add javadocs to gradle
rtyler @rtyler nods
Schalk W. Cronjé
@ysb33r
Aug 27 2014 20:23
those are minor changes in base
R. Tyler Croy
@rtyler
Aug 27 2014 20:24
yeah, I know
I still need to delete some code
ysb33r @ysb33r likes deleting code
R. Tyler Croy
@rtyler
Aug 27 2014 20:25
ditto, I was going to wait until I felt like I had things working properly in the war plugin
R. Tyler Croy
@rtyler
Aug 27 2014 20:50
releasing 0.1.1 of base
and JRuby 1.7.14 released, so I'm going to bump the default version when I get a chance
Schalk W. Cronjé
@ysb33r
Aug 27 2014 21:08
okey dokey
are you leaving the main classes in the ‘com.lookout’ namespace?
R. Tyler Croy
@rtyler
Aug 27 2014 21:15
no, I haven't changed those in warbler-bootstrap yet
just haven't gotten around to it
went ahead and sent the requests to have the 1war` plugin included in gradle-plugins and jcenter
R. Tyler Croy
@rtyler
Aug 27 2014 21:32
hrm, getting integration test failures on 1.7.14 but not sure why
```
```
derp
org.gradle.process.internal.ExecException: Process 'command '/usr/local/openjdk8/bin/java'' finished with non-zero exit value 1 at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:365) at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:31) at org.gradle.api.internal.file.DefaultFileOperations.javaexec(DefaultFileOperations.java:159) at org.gradle.api.internal.project.AbstractProject.javaexec(AbstractProject.java:749) at com.github.jrubygradle.GemUtils.extractGems(GemUtils.groovy:80) at com.github.jrubygradle.GemUtils.extractGems(GemUtils.groovy:110) at com.github.jrubygradle.internal.JRubyExecDelegate._clinit__closure2(JRubyExecDelegate.groovy:124) at groovy.lang.Closure.call(Closure.java:423) at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:156) at com.github.jrubygradle.JRubyExecExtensionIntegrationSpec.Running a script that requires a gem, a separate jRuby and a separate configuration_closure7(JRubyExecExtensionIntegrationSpec.groovy:84) at groovy.lang.Closure.call(Closure.java:423) at groovy.lang.Closure.call(Closure.java:439) at com.github.jrubygradle.JRubyExecExtensionIntegrationSpec.Running a script that requires a gem, a separate jRuby and a separate configuration(JRubyExecExtensionIntegrationSpec.groovy:80)
Schalk W. Cronjé
@ysb33r
Aug 27 2014 21:33
have you done a gradle clean ?
R. Tyler Croy
@rtyler
Aug 27 2014 21:33
./gradlew clean check
Schalk W. Cronjé
@ysb33r
Aug 27 2014 21:34
mmm...
R. Tyler Croy
@rtyler
Aug 27 2014 21:35
this is with openjdk8 fwiw
Schalk W. Cronjé
@ysb33r
Aug 27 2014 21:37
It is failing in extractGems. If might be worth checking the test report for the standard output
gah, fucking gittr
R. Tyler Croy
@rtyler
Aug 27 2014 21:44
@ysb33r I'm giong to push this change and see if buildhive likes it
er, actually
I pushed it already
silly me
rtyler @rtyler boggles
Schalk W. Cronjé
@ysb33r
Aug 27 2014 21:46
If you run the command line, in the 2nd to last line from the log you pasted, does it pass?
if seems to be failing whilst unpacking the gem
R. Tyler Croy
@rtyler
Aug 27 2014 22:05
ruhr roh
this might be a problem with the 1.7.14 release
[15:04:48] tyler:~ $ (cd /tmp/gradle7468542493140908025projectDir && /usr/local/openjdk8/bin/java -Dfile.encoding=UTF-8 -cp /tmp/gradle7468542493140908025projectDir/userHome/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.14/ad70c18834a143afa6686ebcda27351ebfef7385/jruby-complete-1.7.14.jar org.jruby.Main -S gem install /tmp/gradle7468542493140908025projectDir/userHome/caches/modules-2/files-2.1/rubygems/credit_card_validator/1.1.0/4a3be270d8d28ca49b30ccd2c8ac0ceb2d17a986/credit_card_validator-1.1.0.gem --ignore-dependencies --install-dir=/usr/home/tyler/source/github/jruby-gradle/jruby-gradle-plugin/build/tmp/integrationTest/root/jreeis/vendor -N) LoadError: libraryjava' could not be loaded: java.lang.RuntimeException: native error calling lstat: No such file or directory /tmp/gradle7468542493140908025projectDir/userHome/caches/modules-2/files-2.1/org.jruby/jruby-complete/1.7.14/ad70c18834a143afa6686ebcda27351ebfef7385/jruby-complete-1.7.14.jar!/META-INF/jruby.home/lib/ruby/1.9/site_ruby/jruby/java.rb
[15:05:07] tyler:~ $ `
asking in the #jruby channel now
Schalk W. Cronjé
@ysb33r
Aug 27 2014 22:16
OK
I have made progress on Jar class

I have actually managed to get it to rather do something like

jar {
    jruby {
     defaults ‘gem, ‘mainClass'
    }
}

Which will add default gemInstallDir and default bootstrap-warbler
mainClass to the JAR

R. Tyler Croy
@rtyler
Aug 27 2014 22:19
O_O
Schalk W. Cronjé
@ysb33r
Aug 27 2014 22:19
Or you can do
jar {
  jruby {
    gemDir ‘/path/to/my/dir1'
    gemDir ‘/path/to/my/dir2'
  }
}
R. Tyler Croy
@rtyler
Aug 27 2014 22:20
fancy
and what about my jruby webapp code?
Schalk W. Cronjé
@ysb33r
Aug 27 2014 22:20
Still have to add that bit now.
For that I have a question: How does jarMain know to bootstrap a specific ruby app?
R. Tyler Croy
@rtyler
Aug 27 2014 22:24
warbler grabs the first file in $[projectDir}/bin
but I don't remember off the top of my head how that's glued into JarMain
Schalk W. Cronjé
@ysb33r
Aug 27 2014 22:25
so if one writes that one will need to have bin directory on your project
or do you mean a bin directory inside the jar?
R. Tyler Croy
@rtyler
Aug 27 2014 22:25
first one
Schalk W. Cronjé
@ysb33r
Aug 27 2014 22:26
Ah, at that is usually ar .rb file?
two down!
yes, it is usually a .rb file
Schalk W. Cronjé
@ysb33r
Aug 27 2014 22:28
I’ll get the PR through to you tomorrow for when you wake up
R. Tyler Croy
@rtyler
Aug 27 2014 22:37
cool beans