You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Attila Szegedi <sz...@gmail.com> on 2008/03/28 15:05:35 UTC

"Cannot execute mojo: eclipse."

Hi folks,

I'm trying to use Maven to build a project that uses it (fwiw, it's  
the calendar plugin for JIRA: <http://svn.atlassian.com/svn/public/contrib/jira/jira-calendar-plugin/tags/1.8/ 
 >). I just can't seem to be able to get anything to run, let me  
elaborate further:

I downloaded and installed Maven 2.0.8, on Mac OS X. I put it in /usr/ 
local/apache-maven-2.0.8 and symlinked it to /usr/local/apache-maven.  
M2_HOME points to /usr/local/apache-maven, M2 to $M2_HOME/bin. M2/mvn  
is also symlinked into /usr/local/bin (so it's on path - I don't like  
putting new items into my path).

The version info is as:

$mvn --version
Maven version: 2.0.8
Java version: 1.5.0_13
OS name: "mac os x" version: "10.5.2" arch: "i386" Family: "unix"

As suggested by Atlassian on their "How to build an Atlassian plugin"  
page at <http://confluence.atlassian.com/display/DEVNET/How+to+Build+an+Atlassian+Plugin 
 >, I also added their settings.xml to the ~/.m2/ directory, see <http://confluence.atlassian.com/display/DEVNET/Example+settings.xml 
 >.

The problem is: I can't get "mvn eclipse:eclipse" to run. Here's an  
attempt from the same directory where the pom.xml and maven.xml for  
the project are:

$ mvn -e eclipse:eclipse
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'eclipse'.
[INFO]  
------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [eclipse:eclipse]
[INFO]  
------------------------------------------------------------------------
[INFO] Preparing eclipse:eclipse
[INFO] No goals needed for project - skipping
[INFO]  
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]  
------------------------------------------------------------------------
[INFO] Cannot execute mojo: eclipse. It requires a project with an  
existing pom.xml, but the build is not using one.
[INFO]  
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Cannot execute  
mojo: eclipse. It requires a project with an existing pom.xml, but the  
build is not using one.
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java: 
564)
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor 
.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor 
.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor 
.executeTaskSegments(DefaultLifecycleExecutor.java:278)
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
	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  
execute mojo: eclipse. It requires a project with an existing pom.xml,  
but the build is not using one.
	at  
org 
.apache 
.maven 
.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:373)
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java: 
539)
	... 16 more
[INFO]  
------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Fri Mar 28 15:03:02 CET 2008
[INFO] Final Memory: 2M/4M
[INFO]  
------------------------------------------------------------------------

Any help appreciated.

Attila.

--
home: http://www.szegedi.org
weblog: http://constc.blogspot.com

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


Re: "Cannot execute mojo: eclipse."

Posted by Attila Szegedi <sz...@gmail.com>.
I can't exactly se how can that help me with my customization of the  
plugin's code :-)

Attila.


On 2008.03.28., at 15:27, <ni...@planet.nl> wrote:
> Otherwise, you could try the distribution of the plugin ;)
>
> http://svn.atlassian.com/svn/public/contrib/jira/jira-calendar-plugin/distributions/
>
> Hth,
>
> Nick S.







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


Re: "Cannot execute mojo: eclipse."

Posted by Wayne Fay <wa...@gmail.com>.
On 3/28/08, Attila Szegedi <sz...@gmail.com> wrote:
>
> Again, the conclusion I reached based on the observed symptoms was
> that this is a Maven issue. Actually, it *is* a Maven issue; why would
> Maven2 be allowed to break in such an ugly manner when facing a Maven1-
> compliant project? Some sort of version mismatch detection and a clean
> fail-fast behavior with an explanatory error message would be in
> order, methinks... Would certainly reduce the kind of mailing list
> traffic that you'd like to avoid :-)

Maven expects that users realize this is a M2 (or M1) project they are
dealing with, and that they are using the proper M2/M1 binaries etc.
Perhaps that is a poor assumption.

Feel free to file this in JIRA, perhaps someone will add code to
support the "when mvn runs, if pom.xml not there but project.xml is,
warn user they probably should be using Maven1 binaries instead" use
case you're proposing.

Wayne

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


Re: "Cannot execute mojo: eclipse."

Posted by Attila Szegedi <sz...@gmail.com>.
On 2008.03.28., at 15:35, Wayne Fay wrote:
> In the future, you might just go right to the source and ask the
> originating team responsible for the code why it doesn't compile. So
> in this case, ask Atlassian directly.

Not being able to run "mvn eclipse:eclipse" (and several other fairly  
straightforward mvn tasks) seemed generic enough to me that I assumed  
it is a problem with my Maven setup and not in the project I tried to  
work with.
The Maven's error message was less than helpful in explaining what's  
going on, and digging the web with Google for the error message also  
didn't yield satisfactory results.

>
>
> (IMO the Maven users list cannot possibly hope to support every single
> developer who stumbles across an open-source project that uses Maven
> as their build tool and then has a problem building the code. So most
> questions like these should be sent to the responsible development
> team first, then if they can't help you can forrward it here. You may
> be doing them a favor by notifying them of a problem they didn't even
> know they had! )

I agree - I often end up saying the same to Struts 2 users when  
they're seeking help on the FreeMarker list :-)

Again, the conclusion I reached based on the observed symptoms was  
that this is a Maven issue. Actually, it *is* a Maven issue; why would  
Maven2 be allowed to break in such an ugly manner when facing a Maven1- 
compliant project? Some sort of version mismatch detection and a clean  
fail-fast behavior with an explanatory error message would be in  
order, methinks... Would certainly reduce the kind of mailing list  
traffic that you'd like to avoid :-)

Thanks to Nick for help,
   Attila.

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


Re: "Cannot execute mojo: eclipse."

Posted by Wayne Fay <wa...@gmail.com>.
In the future, you might just go right to the source and ask the
originating team responsible for the code why it doesn't compile. So
in this case, ask Atlassian directly.

(IMO the Maven users list cannot possibly hope to support every single
developer who stumbles across an open-source project that uses Maven
as their build tool and then has a problem building the code. So most
questions like these should be sent to the responsible development
team first, then if they can't help you can forrward it here. You may
be doing them a favor by notifying them of a problem they didn't even
know they had! )

Wayne

On 3/28/08, nicklist@planet.nl <ni...@planet.nl> wrote:
> Otherwise, you could try the distribution of the plugin ;)
>
> http://svn.atlassian.com/svn/public/contrib/jira/jira-calendar-plugin/distributions/
>
> Hth,
>
> Nick S.
>
>

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


RE: "Cannot execute mojo: eclipse."

Posted by ni...@planet.nl.
Otherwise, you could try the distribution of the plugin ;)

http://svn.atlassian.com/svn/public/contrib/jira/jira-calendar-plugin/distributions/

Hth,

Nick S.


-----Original Message-----
From: nicklist@planet.nl [mailto:nicklist@planet.nl]
Sent: Fri 3/28/2008 15:23
To: Maven Users List
Subject: RE: "Cannot execute mojo: eclipse."
 
It seems that version of the jira-plugin still uses maven 1 (You've got a project.xml file, not a pom.xml file), so maven 2 will not work on that plugin.

The trunk of the plugin is using m2 instead of m1, so you could try that one (I don't know how stable the trunk is) or you could try using maven 1.

Hth,

Nick S.


-----Original Message-----
From: Attila Szegedi [mailto:szegedia@gmail.com]
Sent: Fri 3/28/2008 15:05
To: users@maven.apache.org
Subject: "Cannot execute mojo: eclipse."
 
Hi folks,

I'm trying to use Maven to build a project that uses it (fwiw, it's  
the calendar plugin for JIRA: <http://svn.atlassian.com/svn/public/contrib/jira/jira-calendar-plugin/tags/1.8/ 
 >). I just can't seem to be able to get anything to run, let me  
elaborate further:

I downloaded and installed Maven 2.0.8, on Mac OS X. I put it in /usr/ 
local/apache-maven-2.0.8 and symlinked it to /usr/local/apache-maven.  
M2_HOME points to /usr/local/apache-maven, M2 to $M2_HOME/bin. M2/mvn  
is also symlinked into /usr/local/bin (so it's on path - I don't like  
putting new items into my path).

The version info is as:

$mvn --version
Maven version: 2.0.8
Java version: 1.5.0_13
OS name: "mac os x" version: "10.5.2" arch: "i386" Family: "unix"

As suggested by Atlassian on their "How to build an Atlassian plugin"  
page at <http://confluence.atlassian.com/display/DEVNET/How+to+Build+an+Atlassian+Plugin 
 >, I also added their settings.xml to the ~/.m2/ directory, see <http://confluence.atlassian.com/display/DEVNET/Example+settings.xml 
 >.

The problem is: I can't get "mvn eclipse:eclipse" to run. Here's an  
attempt from the same directory where the pom.xml and maven.xml for  
the project are:

$ mvn -e eclipse:eclipse
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'eclipse'.
[INFO]  
------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [eclipse:eclipse]
[INFO]  
------------------------------------------------------------------------
[INFO] Preparing eclipse:eclipse
[INFO] No goals needed for project - skipping
[INFO]  
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]  
------------------------------------------------------------------------
[INFO] Cannot execute mojo: eclipse. It requires a project with an  
existing pom.xml, but the build is not using one.
[INFO]  
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Cannot execute  
mojo: eclipse. It requires a project with an existing pom.xml, but the  
build is not using one.
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java: 
564)
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor 
.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor 
.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor 
.executeTaskSegments(DefaultLifecycleExecutor.java:278)
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
	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  
execute mojo: eclipse. It requires a project with an existing pom.xml,  
but the build is not using one.
	at  
org 
.apache 
.maven 
.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:373)
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java: 
539)
	... 16 more
[INFO]  
------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Fri Mar 28 15:03:02 CET 2008
[INFO] Final Memory: 2M/4M
[INFO]  
------------------------------------------------------------------------

Any help appreciated.

Attila.

--
home: http://www.szegedi.org
weblog: http://constc.blogspot.com

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




RE: "Cannot execute mojo: eclipse."

Posted by ni...@planet.nl.
It seems that version of the jira-plugin still uses maven 1 (You've got a project.xml file, not a pom.xml file), so maven 2 will not work on that plugin.

The trunk of the plugin is using m2 instead of m1, so you could try that one (I don't know how stable the trunk is) or you could try using maven 1.

Hth,

Nick S.


-----Original Message-----
From: Attila Szegedi [mailto:szegedia@gmail.com]
Sent: Fri 3/28/2008 15:05
To: users@maven.apache.org
Subject: "Cannot execute mojo: eclipse."
 
Hi folks,

I'm trying to use Maven to build a project that uses it (fwiw, it's  
the calendar plugin for JIRA: <http://svn.atlassian.com/svn/public/contrib/jira/jira-calendar-plugin/tags/1.8/ 
 >). I just can't seem to be able to get anything to run, let me  
elaborate further:

I downloaded and installed Maven 2.0.8, on Mac OS X. I put it in /usr/ 
local/apache-maven-2.0.8 and symlinked it to /usr/local/apache-maven.  
M2_HOME points to /usr/local/apache-maven, M2 to $M2_HOME/bin. M2/mvn  
is also symlinked into /usr/local/bin (so it's on path - I don't like  
putting new items into my path).

The version info is as:

$mvn --version
Maven version: 2.0.8
Java version: 1.5.0_13
OS name: "mac os x" version: "10.5.2" arch: "i386" Family: "unix"

As suggested by Atlassian on their "How to build an Atlassian plugin"  
page at <http://confluence.atlassian.com/display/DEVNET/How+to+Build+an+Atlassian+Plugin 
 >, I also added their settings.xml to the ~/.m2/ directory, see <http://confluence.atlassian.com/display/DEVNET/Example+settings.xml 
 >.

The problem is: I can't get "mvn eclipse:eclipse" to run. Here's an  
attempt from the same directory where the pom.xml and maven.xml for  
the project are:

$ mvn -e eclipse:eclipse
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'eclipse'.
[INFO]  
------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [eclipse:eclipse]
[INFO]  
------------------------------------------------------------------------
[INFO] Preparing eclipse:eclipse
[INFO] No goals needed for project - skipping
[INFO]  
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]  
------------------------------------------------------------------------
[INFO] Cannot execute mojo: eclipse. It requires a project with an  
existing pom.xml, but the build is not using one.
[INFO]  
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Cannot execute  
mojo: eclipse. It requires a project with an existing pom.xml, but the  
build is not using one.
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java: 
564)
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor 
.executeStandaloneGoal(DefaultLifecycleExecutor.java:493)
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463)
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor 
.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor 
.executeTaskSegments(DefaultLifecycleExecutor.java:278)
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
	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  
execute mojo: eclipse. It requires a project with an existing pom.xml,  
but the build is not using one.
	at  
org 
.apache 
.maven 
.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:373)
	at  
org 
.apache 
.maven 
.lifecycle 
.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java: 
539)
	... 16 more
[INFO]  
------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Fri Mar 28 15:03:02 CET 2008
[INFO] Final Memory: 2M/4M
[INFO]  
------------------------------------------------------------------------

Any help appreciated.

Attila.

--
home: http://www.szegedi.org
weblog: http://constc.blogspot.com

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