roc112008 / jarjar

Automatically exported from code.google.com/p/jarjar
0 stars 0 forks source link

Feature request: apply rules to textual matches #26

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Use a JAR file that has textual class references in it, via an embedded
Spring context (like Spring DM), an Ant task definition properties file, etc.

What is the expected output? What do you see instead?
If I map class a.b.c.MyTask to x.y.z.MyTask, the textual references in
my-tasks.properties would also be changed.  I currently see that they are
unaffected, and when I peruse the task definition in the source, I don't
see an option for turning on such a feature.

What version of the product are you using? On what operating system?
1.0-rc8

Please provide any additional information below.
I think this would be very handy to make jarjar even more compatible. 
Optionally and additionally, it would be nice if String variables that
point to fully qualified class names would be changed.  Some libraries
(unfortunately) use this technique rather than MyClass.class.getName().

Original issue reported on code.google.com by van...@gmail.com on 8 Dec 2008 at 8:04

GoogleCodeExporter commented 8 years ago
I've also fallen foul of this.  I have lots of Spring XML files with class 
string
literals. The packages have been renamed by jarjar but not these config files. I
would suggest this is a fairly high priority request?

Original comment by craftedb...@gmail.com on 10 Feb 2009 at 5:07

GoogleCodeExporter commented 8 years ago
I'm voting for it.

My use case is that I'd like to have java source files also string-replaced 
based on
the rule. This way sources correspond to compiled classes and IDEs don't have
problems with browsing source code / javadocs.

Original comment by szcze...@gmail.com on 13 May 2009 at 12:00

GoogleCodeExporter commented 8 years ago
Another good one is JAR files that implement Sun's Service Provider mechanism.  
It used 
to be a sun.misc. API, but now it's been officially standardized into 
java.util.ServiceLoader in Java 6 and beyond.  These JAR files have textual 
references 
to FQCNs in the META-INF directory tree.

Original comment by van...@gmail.com on 13 May 2009 at 2:17

GoogleCodeExporter commented 8 years ago
Not much happening with this issue. Do maintainers want one of us to take a 
stab at
the source code and contribute a patch?

Original comment by szcze...@gmail.com on 13 May 2009 at 2:43

GoogleCodeExporter commented 8 years ago
I've done a basic implementation of this feature here: 
https://github.com/szczepiq/jarjar/commits/master

Feel free to pull :)

Original comment by szcze...@gradle.biz on 11 Sep 2012 at 1:50