Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle 2.4 support #21

Open
youribonnaffe opened this issue May 6, 2015 · 3 comments
Open

Gradle 2.4 support #21

youribonnaffe opened this issue May 6, 2015 · 3 comments

Comments

@youribonnaffe
Copy link

Hi,

When trying to use the plugin with Gradle 2.4, I'm facing two issues:

Caused by: java.lang.StackOverflowError
at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
at com.github.rholder.gradle.task.OneJar.super$8$manifest(OneJar.groovy)
at org.gradle.api.tasks.bundling.Jar.manifest(Jar.groovy:29)
at com.github.rholder.gradle.task.OneJar.super$8$manifest(OneJar.groovy)

Unfortunately for now, I haven't find what could be the problem for both (could it be related to the fact that the Jar class changed from Groovy to Java? for the second issue)

@PGossek
Copy link

PGossek commented Jul 1, 2015

Hi,
I resolved this problem with moving manifest to external block:

ext.sharedManifest = manifest {
attributes 'One-Jar-URL-Factory': 'com.simontuffs.onejar.JarClassLoader$OneJarURLFactory'
}

task myJar(type: OneJar) {
[...]
manifest = project.manifest {
from sharedManifest
}
[...]
}

My inspiration was chapter 22.14. Jar from:
https://docs.gradle.org/current/userguide/java_plugin.html

@youribonnaffe
Copy link
Author

Thanks! It works for me as well, I just defined the manifest outside the task.

youribonnaffe pushed a commit to ow2-proactive/scheduling that referenced this issue Jul 3, 2015
youribonnaffe pushed a commit to ow2-proactive/scheduling that referenced this issue Jul 10, 2015
youribonnaffe pushed a commit to ow2-proactive/scheduling that referenced this issue Jul 10, 2015
@Giszmo
Copy link

Giszmo commented Jan 24, 2016

I'm new to the issue and this solution that worked for others, doesn't seam to work here. As suggested by a colleague, I'm looking into ShadowJar now.

(Bumping the issue as it's not resolved and didn't get much attention it seams.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants