Questions tagged [jarjar]

Jar Jar Links is a utility that makes it easy to repackage Java libraries and embed them into your own distribution.

Jar Jar Links is a utility that makes it easy to repackage Java libraries and embed them into your own distribution. This is useful for two reasons:

You can easily ship a single jar file with no external dependencies. You can avoid problems where your library depends on a specific version of a library, which may conflict with the dependencies of another library. How does it work?

Jar Jar Links includes an Ant task that extends the built-in jar task. The normal zipfileset element is used to embed jar files. A new rule element is added which uses wildcards patterns to rename the embedded class files. Bytecode transformation (via ASM) is used to change references to the renamed classes, and special handling is provided for moving resource files and transforming string literals.

28 questions
1
vote
1 answer

How to avoid library conflicts when someone uses my android library

I'm developing a library for android that will be used in many applications. The library depends on some other libraries. For example, it uses Dagger 1.2, so if an app that will include my library will useDagger 2.0, the project won't build because…
1
vote
1 answer

Aspectj throws "org.aspectj.weaver.BCException: malformed org.aspectj.weaver.PointcutDeclaration attribute" exception after Class Relocation

I'm using AspectJ on a project I'm working on. As part of the project I was trying to use the "maven-shade-plugin" and the "jarjar-maven-plugin" in order to relocate classes from one jar to another. In both cases, when I was trying to use the…
nadavy
  • 1,755
  • 1
  • 18
  • 33
1
vote
2 answers

How do I use only file based dependencies in gradle instead of specifying groupId:artifactId:versionId

I have the following entry in my gradle file dependencies { compile 'org.A:A:1.0' } which downloads 'org.B:B:1.0' because that's it's dependency.(not mentioned explicitly in gradle) What I want to use in my project is A* and B* which are…
sykik
  • 333
  • 2
  • 4
  • 12
1
vote
0 answers

wrong jarjar maven plugin configuration

This is the jarjar plugin configuration.I need to add this plugin to replace java.beans by harmony.beans because in android we can't use java.Beans. org.sonatype.plugins
Inès Belhouchet
  • 491
  • 4
  • 8
  • 23
1
vote
1 answer

GSON + HTC Desire: Conflict. Possible solution jarjar.jar causes error

I am trying to use GSON in Android app but it causes a crash. After some reading it seems that HTC have included GSON and that causes a conflict. One propoused solution was to use jarjar.jar to rename gson classes to solve the conflict. When I try…
Alex
  • 63
  • 6
0
votes
1 answer

Bazel build failing on Apple Mac M1

Facing below issue when running bazel run //api/deployment:mynamespace.apply Please let me know if anyone also faced same issue. Bazel Version:- 4.2.1 Processor:- Apple Mac M1 ERROR:…
akki_java
  • 605
  • 7
  • 17
0
votes
1 answer

JarJar - Unable to JarJar/Embedded error: ZIP file must have at least one entry

I'm having the strangest error with JarJar right now in my Maven project. It keeps spitting out the following error: [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO]…
Naftuli Kay
  • 87,710
  • 93
  • 269
  • 411
0
votes
1 answer

Maven JarJar Plugin: Exclude 'provided' scope?

Is there a way to have the Maven JarJar plugin exclude items in the 'provided' scope? This seems pretty straightforward... if something is provided, why would I want to include it in my megajar?
Naftuli Kay
  • 87,710
  • 93
  • 269
  • 411
0
votes
1 answer

Using Maven-JarJar plugin

I'm trying to use the Maven JarJar plugin but I'm having problems. What I'm trying to do is include the Jackson library as part of my "jar-with-dependcies". Since I couldn't find a help I'm trying to guess the configuration. Can you please have a…
nadavy
  • 1,755
  • 1
  • 18
  • 33
0
votes
0 answers

How to merge two jar files with same name but with different version in a project?

I'm using two jar files like httpclient-4.2.3.jar and httpcore-4.2.jar but now I want to use another two files with same name but different version httpclient-4.3.4.jar and httpcore-4.3.jar. How can I use all four files in a same project? Please…
atul
  • 1
0
votes
0 answers

Nullpointer when using jarjajr in maven

When building by maven I'm getting: Failed to execute goal org.sonatype.plugins:jarjar-maven-plugin:1.9:jarjar (default) on project myproject: Unable to JarJar: null cause: null: NullPointerException Fragment of my pom.xml file:
pixel
  • 24,905
  • 36
  • 149
  • 251
0
votes
1 answer

How to assembly maven project using jarjar format?

I tried some assembly plugins like maven-assembly-plugin , maven-shading-plugin but none of them support jarjar file format. So is there a maven plugin to assembly Uber-Jar by jarjar file format? It's helpful to avoid resources conflicts like…
jackalope
  • 1,554
  • 3
  • 17
  • 37
0
votes
2 answers

JAIN-SIP 1.2 for Android: Missing javax.sip.STACK_NAME property

I'm trying to run JAIN-SIP Stack on an Android-Device (4.0.2). I was able to repackage the jar-files which were needed (jain-sip-api-1.2-src.jar, jain-sip-src-1.2.1111.jar, concurrent.jar, log4j-1.2.8.jar). This is my build.xml file which I used: …
1
2