-
Notifications
You must be signed in to change notification settings - Fork 24
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
add a way to use system jars for building packages #49
Comments
Wait, how is this done with other Java packages in Debian? AFAIK building is/should be done separate from any arbitrary Linux package management software. This is also described here and possible, for example, by overwriting the classpath in a startup script:
So, I don't see no need for modifying the Gradle build file. |
@abika we should be using the packaged jar files during build as well, so we need a way to do this using gradle. All java packages in debian use packaged jar files during build. All binary files in debian should have their corresponding source and built on debian. |
see an example http://pkg-java.alioth.debian.org/examples/program/ debian/rules sets CLASSPATH to a system jar during build. For Kontalk, since we are using gradle, setting a CLASSPATH is not enough. So we need to edit gradle.build |
ok, and how is this usually done in Gradle / can you find some reference Gradle project? Cause I really have no idea and see a bunch of problems:
|
I am a member of pkg-java team, and I have some experience on packaging projects that use Gradle. Typically I will replace the default repository to You can read some examples from our bintray-client-java and gradle. Currently only a few number of packages use Gradle, so there's no documentation on this kind of issues yet. |
@abika , with @seamlik 's solution, we can avoid adding dependencies twice. For now, we can just patch gradle.build in debian, but if that can be added a separate task upstream that would be good. If we can detect a debian, fedora or arch system and use system jar directories accordingly that will be good. |
@abika see this sample patch |
Note that with |
@abika, jdeb was suggested as tool for building deb packages by upstream in debian-java discussion list While we work on a proper deb package in debian, you could try jdeb to create a deb and host it yourself. |
ok, thanks for your help! But as jdeb does only support Mave/Ant and cant be used with Gradle it would mean to setup another build manager, correct? Not a solution... |
@abika you could request jdeb folks to support gradle by opening an issue. |
there is already an issue: tcurdt/jdeb#132 And another project is mentioned: https://github.com/nebula-plugins/gradle-ospackage-plugin |
As discussed in #48 we need a way to use system jars when building a package. I found a way to mention this in build.gradle. Can we make another target linke SystemJar or something that will use system jars instead of downloading from maven?
Such jars need not be copied to dist/lib and their path should be set to system path in final jar classpath
The text was updated successfully, but these errors were encountered: