Mvn builds ( was Re: RHQ initial server startup error: NoClassDefFoundError: org/jboss/wsf/spi/deployment/UnifiedVirtualFile ( RHQ_3_0_0_EmbJopr2 tag ))

Lukas Krejci lkrejci at redhat.com
Fri Oct 15 12:36:07 UTC 2010


On Friday, October 15, 2010 14:13:38 John Mazzitelli wrote:
> On 10/15/2010 08:00 AM, Heiko W.Rupp wrote:
>  > It looks like if you have M2Eclipse installed, you can also launch
>  > mvn builds from there, which seems to have different (classloader ?)
>  > semantics.
>  > 
>  > So when in doubt, use command like mvn.
> 
> I would not use M2Eclipse. I've always had problems with that. I've not
> tried it in a while, but every time I've tried in the past, it just
> didn't work nicely for me. I would say if you are using that, do not
> expect RHQ to build successfully (or at minimum do not be surprised if
> it fails to build).
> 

I've been using it for quite some time now mainly because I like its eclipse 
project per maven project approach as opposed to the everything-crammed-
together eclipse project defined in our repo. It's much easier to make sense 
of library visibility, etc.

I can't say it's totally stable and it requires to occassionally (once in a 
month approx) reimport the project but otherwise it seems to be working quite 
well.

I don't use it for building stuff though because of the very problem that's 
being discussed here - and I know no other solution to it.

> However, you can always use our Eclipse External Tool definitions - they
> will always work the same as if you launched directly from a command
> line console using the same arguments the external tool definitions pass
> in. (btw: you will get these RHQ external tool definitions in Eclipse
> automatically as soon as you import the RHQ project into Eclipse - you
> just have to set that M2 variable as described in that wiki page I
> linked to earlier).
> 
> Those external tool configurations will launch mvn builds externally and
> thus there are no issues with Eclipse messing with classloaders and
> things like that - using these Eclipse tools are just as if you launched
> them from the command line - except you can see its output in the
> Eclipse Console view.
> 
> Note: most of those Eclipse tool definitions pass in "-o" to maven
> because 90% of the time, using it in offline mode doesn't hurt and it
> makes the build go faster. However, if new dependencies were added to
> the project poms, you'll need to run a mvn build without -o so it knows
> to download new deps - in fact we have an Eclipse External Tool
> configuration that you can use to ask it to download dependencies - "RHQ
> Maven Build - Download Dependencies".
> _______________________________________________
> rhq-devel mailing list
> rhq-devel at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/rhq-devel


More information about the rhq-devel mailing list