Issue Details (XML | Word | Printable)

Key: MNGECLIPSE-1173
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Dirk Pitt
Votes: 8
Watchers: 8
Operations

If you were logged in you would be able to see more operations.
Maven Integration for Eclipse

[mng] maven install from runAs menu from the Eclipse giving an Exception while mvn install from command line functions without any problem

Created: 27/Jan/09 09:58 AM   Updated: 12/Mar/09 11:08 AM
Return to search
Component/s: Maven Embedder
Affects Version/s: dev
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. File burnout3.rar (92 kB)

Environment: Eclipse Ganymede, JDK5, m2eclipse (from SVN trunk), jbosstools (from SVN trunk)


 Description  « Hide

I am trying to make it work a Jboss Seam, Maven, m2eclipse, jboss tools project to work in eclipse...

With the colleagues from JBoss Tools, we made lots of progress but we are having one final problem and I think it has to do with m2eclipse.

When I am running against Ear Project in eclipse a maven install(from RunAs), I am getting the following exception but if I execute mvn install from the commandline there is no problem...

One interesting side effect both environments are creating different application.xml (maven-ear-project was configured to create the application.xml dynamically only to get the difference otherwise application.xml is in src/main/application)...

So if I execute mvn install from command line I got this in application xml...

<module>
<web>
<web-uri>burnout-web-1.0-SNAPSHOT.war</web-uri>
<context-root>burnout-web</context-root>
</web>
</module>

but if I build from eclipse with run - maven - install, I got this

<module>
<web>
<web-uri>classes</web-uri>
<context-root>/burnout</context-root>
</web>
</module>

this is astonishingly similar to exception 'Cannot copy a directory: C:\DEV\wss\runtimejbt_configuration\burnout-web\target\classes; Did you package/install org.lotr.agile.burnout:burnout-web:war:1.0-SNAPSHOT:compile?'

Any ideas...

Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Cannot copy a directory: C:\DEV\wss\runtimejbt_configuration\burnout-web\target\classes; Did you package/install org.lotr.agile.burnout:burnout-web:war:1.0-SNAPSHOT:compile?
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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.plugin.MojoExecutionException: Cannot copy a directory: C:\DEV\wss\runtimejbt_configuration\burnout-web\target\classes; Did you package/install org.lotr.agile.burnout:burnout-web:war:1.0-SNAPSHOT:compile?
at org.apache.maven.plugin.ear.EarMojo.execute(EarMojo.java:200)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
... 16 more



Dirk Pitt added a comment - 27/Jan/09 09:59 AM

Sample project that is demonstrating the problem


Dirk Pitt added a comment - 27/Jan/09 10:01 AM

If you are interested with the start of discussion you can look this bug in JBoss Tools JIRA

https://jira.jboss.org/jira/browse/JBIDE-3456


Eugene Kuleshov added a comment - 27/Jan/09 10:15 AM

Dirk Pitt added a comment - 27/Jan/09 12:33 PM

Thx for the tips I would furhter investigate the problem...

I forgot to mention but I am not using the maven 2.0.9 and it is configured at installed runtimes....I don't know this is a factor or not...

If you explode the archive you would see that it also contains a war and 2 ejb projects and they have no problem with RunAs-maven-install, only the ear project.....


Will Hoover added a comment - 09/Feb/09 12:29 PM

I'm having the same issue. Tried to use a newer maven installation (2.0.9) instead of embedded as suggested by Eugene, but I still get "Cannot copy a directory" when performing "package" using m2e (works using command line).


Leopoldo Muller added a comment - 24/Feb/09 03:08 PM

I removed the flag 'Resolve Workspace artifcats' in Run configurations and it worked fine.


Riccardo Serafin added a comment - 09/Mar/09 06:26 AM

Hi.

I have the same problem (exactly as described here, with the same workaround working), but only with the latest version of the 0.9.7 eclipse plugin (0.9.7.200902090947). When using a previous version (0.9.7.200811301806) the error was not present and everything worked fine. With this version everything works as it is supposed to work (using maven 2.0.9 instead of the embedded one). So i guess this is a regression from a previous solved problem.

Hope this will help maintainers in solving this issue, cos it is quite a show stopper.

Best,
Riccardo.


John Frey added a comment - 12/Mar/09 11:08 AM

I also have the same exact problem. This is a show stopper for us as well.