mevenide

Error runing maven project from netbeans

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: NB_2.3
  • Fix Version/s: NB_3.0
  • Component/s: mevenide2-netbeans
  • Labels:
    None
  • Environment:
    Windows XP
    java 1.6
    netbeans 5.5 or netbeans 6.0 M6
  • Number of attachments :
    0

Description

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

Activity

Hide
Ryan added a comment -

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

Show
Ryan added a comment - 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
Hide
Milos Kleint added a comment -

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

Show
Milos Kleint added a comment - that's strange. Can you check that the 2 projects have the same content of "netbeans-public" profile in pom.xml?
Hide
Eric Barboni added a comment -

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

Show
Eric Barboni added a comment - 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
Hide
James Megquier added a comment -

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>

Show
James Megquier added a comment - 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>
Hide
Milos Kleint added a comment -

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

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

People

Vote (1)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: