maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Hammar <and...@hammar.net>
Subject Re: Ear packaging plugin acting different when run from different levels of project
Date Thu, 01 Sep 2011 08:44:13 GMT
The reason is that when you only build earPack Maven tries to fetch
the deps for the repository. But you don't have web and ejbs there as
you haven't executed "mvn install".
But when you build the entire multimodule build, Maven looks in the
"reactor" (the current build context sort of) and can find the
artifacts as they are built in the same build.

/Anders
2011/8/31 Kristjan Slomšek <kristjan.slomsek@gmail.com>:
> Hi,
>
> I have upgraded my enterprise project from ant recently and is now built by
> Maven 3.0.3 on eclipse 3.7, using m2e 1.0.
> By consulting some available helping points I came to the nearly same result
> as ant did previously - that is an Ear package comprising one war, one ejb
> jar and ejb-client.jar.
>
> I have 3 modules in the project web, ejbs and earPack, where ejbs also
> produces ejb-client.jar.
>
> Now the mysterious problem I encounter is the following - if I run 'package'
> from parent pom, earPack is build more or less correctly (only flaw is that
> ejb-client should be in the \lib folder but is in the \ instead, but this
> issue is not so important).
>
> But if I do run 'package' in the packEar pom the following ERROR pops:
>
> [ERROR] Failed to execute goal on project mp-packEar: Could not resolve
> dependencies for project org.ks:mp-packEar:ear:4.0.0.0: The following
> artifacts could not be resolved: org.ks:mp-ejbs:jar:client:4.0.0.0,
> org.ks:mp-web:war:4.0.0.0, org.jboss.javaee:jboss-transaction-api:jar:
> 1.0.1.GA: Failure to find org.ks:mp-ejbs:jar:client:4.0.0.0 in
> http://repo1.maven.org/maven2 was cached in the local repository, resolution
> will not be reattempted until the update interval of central has elapsed or
> updates are forced -> [Help 1]
>
> What gives me an headache for the whole day today is why in the first case
> build succeeds, but the other case fails with unsuccesful artifacts seek on
> the remote repository.
> Anybody has an idea where to look and if there is a simple solution I have
> overlooked?
>
> Thank you in advance,
> K
>

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


Mime
View raw message