I think you have the right approach, but there are two missing bits:

  - make sure the assembly plugin doesn't "attach" its result.
  - make sure the last step does attach its result.

An attached file is one that maven considers an artifact and will upload
when you run install/deploy/etc. By default, the assembly plugin tells maven
that its outputs are attached. Probably if you read the assembly
documentation you can turn this off.

The last step of your build should attach the final artifact. I guess
preverification doesn't actually produce a new jar, so the final artifact
would be the result of obfuscating?

There is no way in the pom to attach an artifact; it requires plugin code.
An obfuscator plugin should know how to do this, unless you're just running
some command line tool or an ant task.

I've been meaning to write a plugin that just attaches things, but I haven't
even started yet. Maybe you'd like to do it? :-) It would be very simple,
and I think a lot of people would find it useful. If maven supports it,
maybe it should also have an unattach feature.

Paul



Mikko wrote:
> 
> Hi,
> 
> First the environment: 
> 
> 1. Multimodule midp2.0 application - must have (OK)
> 2. Assembly is required - must have (OK)
> 3. Assembled code jar obfuscation - optinal (NOK)
> 3. Assembled code jar preverification - must have (NOK)
> 
> What I'm trying to do is to write a plugin(s) for our MIDP project so that
> above steps are accomplished. My problem is that after the assembly is
> complete some jar is constructed and once either the obfuscation or the
> preverification needs to take place the plugin does not know the name of
> the jar that was produced by the maven-assembly-plugin.
> 
> It might be that I'm approaching this the wrong way, but could someone
> point me to the right direction, either by suggesting another approach or
> whatever... ;) Basically once the assembly is complete I need to do the
> obfuscation and preverification with the result.
> 
> thanks in advance,
> Mikko
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Maven-plugin-interaction-tf2628577s177.html#a7364650
Sent from the Maven - Users mailing list archive at Nabble.com.


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

Reply via email to