Hi,

I'm trying to build a EAR containing one or more RAR Components, I created
a Project File Structure as the following:

RootProject
|  ( pom.xml as aggregator projects )
|
+-dispatch-rar-jar
|  ( pom.xml which type is jar )
|
+-xmpp-adapter-dispatacher
|  ( pom.xml which type is rar and depends on dispatch-rar-jar )
|
+-ns-ear
| ( pom.xml which type is ear and depends on xmpp-adapter-dispatcher )

If I exclude "ns-ear" project I can build xmpp-adapter-dispatcher.rar
without
problem. Also, I should say that, if I exclude my RAR project, I can also
build
ns.ear without problem.

But, when I add "ns-ear" project trying to create my EAR File,
Ear Plugin always reports the following error message:
====================================================
[INFO] Building ns-EAR-Project
[INFO]    task-segment: [compile]
[INFO]
----------------------------------------------------------------------------
Downloading:
http://jianwu-pc.us.oracle.com/maven2repository/repositoryroot/orac
le/ias/messaging/ns/xmpp-adapter-dispatcher/1.0-SNAPSHOT/xmpp-adapter-dispatcher
-1.0-SNAPSHOT.rar
[WARNING] Unable to get resource from repository http-repository
(http://jianwu-
pc.us.oracle.com/maven2repository/repositoryroot)
[INFO]
----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
----------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

required artifacts missing:
 oracle.ias.messaging.ns:xmpp-adapter-dispatcher:rar:1.0-SNAPSHOT

for the artifact:
 oracle.ias.messaging.ns:ns-ear:ear:1.0-SNAPSHOT

from the specified remote repositories:
 central (http://repo1.maven.org/maven2),
 http-repository
(http://jianwu-pc.us.oracle.com/maven2repository/repositoryroo
t)

[INFO]
----------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: required artifacts
missi
ng:
 oracle.ias.messaging.ns:xmpp-adapter-dispatcher:rar:1.0-SNAPSHOT

for the artifact:
 oracle.ias.messaging.ns:ns-ear:ear:1.0-SNAPSHOT

from the specified remote repositories:
 central (http://repo1.maven.org/maven2),
 http-repository
(http://jianwu-pc.us.oracle.com/maven2repository/repositoryroo
t)

       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:548)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:472)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:451)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:303)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:270)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:139)
       at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
       at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
       at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
       at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
       at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

       at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.artifact.resolver.ArtifactResolutionException:
requi
red artifacts missing:
 oracle.ias.messaging.ns:xmpp-adapter-dispatcher:rar:1.0-SNAPSHOT

for the artifact:
 oracle.ias.messaging.ns:ns-ear:ear:1.0-SNAPSHOT

from the specified remote repositories:
 central (http://repo1.maven.org/maven2),
 http-repository
(http://jianwu-pc.us.oracle.com/maven2repository/repositoryroo
t)

       at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
nsitively(DefaultArtifactResolver.java:251)
       at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
nsitively(DefaultArtifactResolver.java:211)
       at
org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTra
nsitively(DefaultArtifactResolver.java:182)
       at
org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDepende
ncies(DefaultPluginManager.java:1120)
       at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:369)
       at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:531)
       ... 16 more
[INFO]
----------------------------------------------------------------------------
[INFO] Total time: 11 seconds
[INFO] Finished at: Wed Mar 22 15:16:17 PST 2006
[INFO] Final Memory: 5M/17M
[INFO]
----------------------------------------------------------------------------
====================================================

What I found is that this problem can be temporarily fixed by manually
creating "target/classes" directory under RAR Project, my guess is that
Ear Plugin is checking this directory as part of validation. But, I think
that
should be a bad practice by altering Rar Plugin to work around this problem.

Should I file a bug against Ear Plugin for this issue?

Thanks a lot!

Jian
--
View this message in context: 
http://www.nabble.com/-M2-Maven-Ear-Plugin-did-not-recognize-the-RAR-Sub-Project-t1327696.html#a3544394
Sent from the Maven - Users forum at Nabble.com.


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

Reply via email to