You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mohan SR <mo...@gmail.com> on 2010/11/17 18:38:41 UTC

How to verify a jar in Maven after it is packaged?

I have a scenario, where in I need to sanity check the generate jar for
duplicate entries. I have a seperate implementaion that does the sanity
check, but how do I use that class to verify the jar? It would be nice if I
can run a test to verify the jar's integrity but the "test" phase occurs
before the package phase. 

Can this be done using the "verify" phase in default life cycle? How?
-- 
View this message in context: http://maven.40175.n5.nabble.com/How-to-verify-a-jar-in-Maven-after-it-is-packaged-tp3269471p3269471.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: How to verify a jar in Maven after it is packaged?

Posted by Justin Edelson <ju...@justinedelson.com>.
Ideally, you would write a plugin goal and bind it to the verify
phase. But if you don't want to do that, you can use the exec plugin
to execute some arbitrary Java class (again, in the verify phase). See
http://mojo.codehaus.org/exec-maven-plugin/ for details on the exec
plugin.

Justin

On Wed, Nov 17, 2010 at 12:38 PM, Mohan SR <mo...@gmail.com> wrote:
>
> I have a scenario, where in I need to sanity check the generate jar for
> duplicate entries. I have a seperate implementaion that does the sanity
> check, but how do I use that class to verify the jar? It would be nice if I
> can run a test to verify the jar's integrity but the "test" phase occurs
> before the package phase.
>
> Can this be done using the "verify" phase in default life cycle? How?
> --
> View this message in context: http://maven.40175.n5.nabble.com/How-to-verify-a-jar-in-Maven-after-it-is-packaged-tp3269471p3269471.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org