Hi,

I don't know what your usecases are, but here are some ideas:

Obfuscated jars are usually only needed for binary distributions (assemblies).
A simple solution would be to have a distribution assembly project that directly
depends on all obfuscated jars.

Second solution is to obfuscate the jars in the assembly. This has the advantage
that the obfuscator can obfuscate more since less public api's have to be
exposed in order to have inter-jar operability.

The last solution i can think of is to specify 
<classifier>${obfuscate}</classifier>
on all deps (in project A and B ) that can have an obfuscated attachment.
You could use a profile or -Dobfuscate=obfuscated. You just have to make sure
that not specifying to obfuscate will set the obfuscate property to the empty 
string,
and that maven can handle empty classifier strings (like it does null 
classifiers).

HTH,

-- Kenney


Stephane Nicoll wrote:
Hi,

I already discussed this with brett and Dan and I would like to see if
anyone here has more insight about how to handle obfuscated jars.

The basic use case I have is to be able to specify whether I want the
standard jars or the obfuscated jars for a particular project.
Obfuscated jars are handled as attached artifacts w/ the "obfuscated"
classifier.

If a particular project does not rely on any other lib that needs to
be obfuscated, everything is ok, we just depend on it with the
obfuscated classifier. The harder part is when a particular project
depends on other components that need to be obfuscated. In dev phase
it might be easier to use non obfuscated jars (as stacktraces are a
bit complex to read when something goes wrong :)

Let's say we have 3 components A, B, C. A depends on B and B depends
on C. I would like to find a way to specify "bring me everything
obfuscated" for A  (something like intelligent classifier).

Is there anything we can do about this? The other solution is to have
a separate project for each component with the obfuscated dep, which
sounds not good at all.

Thanks,
Stéphane

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to