Hopefully I describe this situation correctly, because I'm constantly
getting burned on it at work it seems and the non-maven co-workers always
end up going "sheesh this stuff seems to happen all the time with maven."

Here's a situation:

I run an archetype command to create a project setup (happens in this case
to be a flex archetype.)
My first mvn install command works perfect and I go along my way building
the start of my app.
As I'm building I'm often doing mvn clean install along the way and things
are going just fine.
Now I have a co-worker check out the project a few weeks later.

He runs mvn clean install and boom an issue
(in this case it was: [INFO] Trace
java.lang.NoClassDefFoundError: org/jdom/input/SAXBuilder
        at
org.sonatype.flexmojos.utilities.FDKConfigResolver.getConfig(FDKConfigResolver.java:95)
        at
org.sonatype.flexmojos.utilities.FDKConfigResolver.getFontManagers(FDKConfigResolver.java:118)
) .... )

So I'm pissed because it was fine for me locally.

I then go and backup my local repo and try the mvn clean install...

bam. blows up with the same error.

So my question is:

1) How do I prevent this from happening? In other words, when I do a 'mvn
clean install' I don't want to check an enormous dependency graph, but I'd
certainly like to know that the jars needed to build my project or to run it
are REALLY there in the repo and not just in my local repo. Shouldn't there
be a way to enforce this? My app might only require (as an example) 5
runtime jars and maybe 10 compile time jars - that should be easy to check.

2) What happens that causes my initial build to work but then later not work
if I start with a cleaned out local repository? Does it mean some dependency
repository got borked somehow? (Again, it would sure be nice to know about
this when building locally.. I'd prefer knowing there is a real issue that
happened and force me to run mvn in offline mode if need be. I'd prefer that
over doing a checkin and telling someone to go ahead and build the project
and have it fail on them.)

Thanks for any help in understanding the situation.

Reply via email to