Issue Details (XML | Word | Printable)

Key: MEVENIDE-485
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Milos Kleint
Reporter: Eric Barboni
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
mevenide

Error runing maven project from netbeans

Created: 19/Jan/07 09:44 AM   Updated: 04/May/07 07:22 AM   Resolved: 04/May/07 07:22 AM
Return to search
Component/s: mevenide2-netbeans
Affects Version/s: NB_2.3
Fix Version/s: NB_3.0

Time Tracking:
Not Specified

Environment:
Windows XP
java 1.6
netbeans 5.5 or netbeans 6.0 M6


 Description  « Hide

Hi I have a build error when trying to run from netbeans a maven 2 projects with mevenide. It seems that working directory in assembly is not the same that for runing.

If have no plugin settings in my pom.xml on assembly stuff.

I attached some debug info concerning assembly and run.

I will be pleased to complete informations on demand (not very pro in maven2)

Best Regards

Eric

----------------

[DEBUG]Configuring mojo 'org.apache.maven.plugins:maven-assembly-plugin:2.1:directory' -->
[DEBUG] (f) appendAssemblyId = true
[DEBUG] (f) basedir = C:\trunk\prj-kernel
[DEBUG] (f) descriptor = C:\trunk\prj\src\main\assemblies\netbeans-run.xml
[DEBUG] (f) executedProject = org.apache.maven.project.MavenProject@63e0615
[DEBUG] (f) filters = []
[DEBUG] (f) finalName = executable
[DEBUG] (f) includeSite = false
[DEBUG] (f) localRepository = [local] -> file://C:\Documents and Settings\....\.m2\repository
[DEBUG] (f) outputDirectory = C:\trunk\prj-kernel\target
[DEBUG] (f) project = org.apache.maven.project.MavenProject@63e0615
[DEBUG] (f) reactorProjects = [org.apache.maven.project.MavenProject@63e0615]
[DEBUG] (f) siteDirectory = C:\trunk\prj-kernel\target\site
[DEBUG] (f) tarLongFileMode = warn
[DEBUG] (f) tempRoot = C:\trunk\prj-kernel\target\archive-tmp
[DEBUG] (f) workDirectory = C:\trunk\prj-kernel\target\assembly\work
[DEBUG]-- end configuration –
[assembly:directory {execution: nb}]

[DEBUG]Configuring mojo 'org.codehaus.mevenide:netbeans-run-plugin:1.1.2:run-jar' -->
[DEBUG] (f) executable = java
[DEBUG] (f) finalName = prj-kernel-2.0
[DEBUG] (f) jarLocation = C:\trunk\prj-kernel\target\executable-netbeans
[DEBUG] (f) project = org.apache.maven.project.MavenProject@63e0615
[DEBUG] (f) workDirectory = C:\trunk\prj-kernel\target\executable-netbeans
[DEBUG]-- end configuration –

[netbeans-run:run-jar]
[INFO]------------------------------------------------------------------------
[ERROR]BUILD ERROR
[INFO]------------------------------------------------------------------------
[INFO]Badly configured, need existing jar at C:\trunk\prj-kernel\target\executable-netbeans\prj-kernel-2.0.jar
[INFO]------------------------------------------------------------------------
[DEBUG]Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Badly configured, need existing jar at C:\trunk\prj-kernel\target\executable-netbeans\prj-kernel-2.0.jar

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:635)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:564)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:534)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:309)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:276)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.codehaus.mevenide.netbeans.embedder.exec.MyLifecycleExecutor.execute(MyLifecycleExecutor.java:94)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:393)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:182)
at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:760)
at org.codehaus.mevenide.netbeans.execute.MavenJavaExecutor.run(MavenJavaExecutor.java:263)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:129)
Caused by: org.apache.maven.plugin.MojoExecutionException: Badly configured, need existing jar at C:\trunk\prj-kernel\target\executable-netbeans\prj-kernel-2.0.jar
at org.codehaus.mevenide.netbeans.runjar.MavenRunJarImpl.runJarProject(MavenRunJarImpl.java:50)
at org.codehaus.mevenide.plugin.run.RunJarMojo.execute(RunJarMojo.java:41)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:417)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:610)
... 11 more



Ryan added a comment - 22/Jan/07 01:02 PM

I get the same BUILD ERROR.

From this:
[INFO]Copying 8 files to ...../target/executable-netbeans.dir
and this:
[INFO]Badly configured, need existing jar at ...../target/executable-netbeans/foobar-0.1-SNAPSHOT.jar
and the existence of "target/executable-netbeans.dir" i would say something is wrong in the copy phase.

Also, I setup a fresh new project, and it works fine, so it's something to do with pre-existing projects.
[INFO]Copying 2 files to ...../mavenproject/target/executable-netbeans
[INFO]Executing "java -jar mavenproject-1.0-SNAPSHOT.jar " in directory ...../mavenproject/target/executable-netbeans


Milos Kleint made changes - 23/Jan/07 12:34 AM
Field Original Value New Value
Fix Version/s NB_2.4 [ 12966 ]
Milos Kleint added a comment - 28/Feb/07 12:12 PM

that's strange. Can you check that the 2 projects have the same content of "netbeans-public" profile in pom.xml?


Eric Barboni added a comment - 01/Mar/07 06:44 AM

I was working in text mode.

I try and retry to add remove the netbeans profile and now it works.

I cannot give you a trace of what was before

It works well but I cannot reproduce the bug now


James Megquier added a comment - 18/Apr/07 03:12 PM

MEVENIDE-523 provides a workaround: specify version 2.1 for maven-assembly-plugin in the pom. Copied from 523:

<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>

Should be:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>


Milos Kleint added a comment - 04/May/07 07:22 AM

closing as fixed, possibly duplicate of MEVENIDE-523. Please reopen when you encounter the issue again (preferably with a sample project attached)


Milos Kleint made changes - 04/May/07 07:22 AM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s NB_3.0 [ 13163 ]
Fix Version/s NB_2.4 [ 12966 ]