You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hama.apache.org by Mike Spreitzer <ms...@us.ibm.com> on 2011/11/26 06:28:02 UTC
Problem after importing Hama into Eclipse: maven-dependency-plugin (goals "copy-dependencies", "unpack") is
not supported by m2e.
This is on my MacBook Pro, and I have the current JDK that Apple provides
(1.6.0_29). I just installed the current Maven, which describes itself as
Apache Maven 3.0.3 (r1075438; 2011-02-28 12:31:09-0500). This is my first
ever install of Maven.
I am running Eclipse Helios Service Release 2, Build id 20110218-0911. I
just installed the latest m2e: my Eclipse plug-ins listing includes
version 1.0.100.20110804-1717 of m2e / UDC integration Marketplace, m2e
logback appender, m2e logback configuration, and m2e Marketplace, as well
as version 0.14.0.201109270543 of m2e connector for the mavenarchiver and
pom properties. This is my first ever install of m2e.
I am also just getting started with Hama. I downloaded it (0.3.0), and
built (`mvn install`). Then I did `mvn eclipse:eclipse` (while Eclipse
was not running --- a detail I had to guess since the instructions did not
address it), and it ultimately claimed success despite printing many
WARNINGs about being unable to read workspace ... (details below). I then
launched Eclipse and imported the hama-0.3.0-incubating project. It seems
to have mostly worked, but Eclipse says I have a Problem in Hama's
pom.xml. The Description of the Problem is 'maven-dependency-plugin
(goals "copy-dependencies", "unpack") is not supported by m2e.' and it is
on line 228.
What's going wrong here, and how do I fix it?
Following are the first two WARNINGs printed during `mvn eclipse:eclipse`;
there are many more like the second.
[WARNING] Workspace defines a VM that does not contain a valid
jre/lib/rt.jar:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
[WARNING] could not read workspace
project:/Users/mspreitz/myworkspace/.metadata/.plugins/org.eclipse.core.resources/.projects/arq-2.8.7
java.lang.IllegalArgumentException: URI scheme is not "file"
at java.io.File.<init>(File.java:366)
at
org.apache.maven.plugin.eclipse.reader.ReadWorkspaceLocations.getProjectLocation(ReadWorkspaceLocations.java:270)
at
org.apache.maven.plugin.eclipse.reader.ReadWorkspaceLocations.readWorkspace(ReadWorkspaceLocations.java:531)
at
org.apache.maven.plugin.eclipse.reader.ReadWorkspaceLocations.init(ReadWorkspaceLocations.java:94)
at
org.apache.maven.plugin.eclipse.EclipsePlugin.getWorkspaceConfiguration(EclipsePlugin.java:1902)
at
org.apache.maven.plugin.eclipse.EclipsePlugin.fillDefaultClasspathContainers(EclipsePlugin.java:1438)
at
org.apache.maven.plugin.eclipse.EclipsePlugin.setup(EclipsePlugin.java:885)
at
org.apache.maven.plugin.ide.AbstractIdeSupportMojo.execute(AbstractIdeSupportMojo.java:500)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
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:597)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Thanks,
Mike
Re: Problem after importing Hama into Eclipse: maven-dependency-plugin
(goals "copy-dependencies", "unpack") is not supported by m2e.
Posted by Thomas Jungblut <th...@googlemail.com>.
Hey Mike,
the problem is that m2e runs inside of eclipse, to get Hama into your
workspace correctly you need to run these maven commands, but this can't be
done from within eclipse.
If it isn't running correctly now, just follow the tutorial here:
http://wiki.apache.org/hama/HowToContribute
and use the shell commands rather than m2e.
If you want hama-0.3.0 instead of the trunk, you have to replace it with
the url of the branch [1]
This 100%ly works correctly.
I'm no maven expert either, but when you follow these lines you'll be fine.
Don't worry, you can use the fancyness of m2e later, once all the modules
are in your workspace.
Looking at the offending line (228) in Hama's pom.xml, I get the idea that
> this problem affects the construction of the hama-core-...jar file, rather
> than Eclipse's ability to compile the Hama java files. Presumably the
> `mvn install` on the command line built that jar correctly, and this is
> why you are telling me to do that and suggesting this will keep me out of
> trouble.
Yes, we can't guarantee that m2e is doing the same thing like maven on the
command line ;)
[1] https://svn.apache.org/repos/asf/incubator/hama/branches/0.3/
2011/11/26 Mike Spreitzer <ms...@us.ibm.com>
> Thomas,
> Thanks for replying, but (1) I do not see any difference between what you
> suggested and what I did in the first place (apart from the clean goal,
> which presumably would not have been needed the first time around) and (2)
> I am not sure I understand the net effect of what's going on.
>
> I got the latest real Maven just a couple days ago from Apache (I used the
> recommended mirror). My m2e is also freshly fetched. I have not used
> those things before. My Hama is also freshly fetched. I built it using
> `mvn install` on the command line before I tried to import into Eclipse.
> The import into Eclipse was done by File / Import... and then, in the menu
> that pops up, Maven / Existing Maven Projects.
>
> That procedure created an Eclipse project named hama-0.3.0-incubating.
> Listed under it, in both the Project Explorer and Package Explorer views,
> is a section called Maven Dependencies; it is well populated, including
> things like slf4j-log4j12-1.5.2.jar and hadoop-core-0.20.2.jar, both in my
> $HOME/.m2/repository/...; when I look at the Hama Java files in Eclipse's
> Java Editor, there is no evidence of compilation problems, and the usual
> level of understanding of Java semantics seems to be in effect.
>
> Looking at the offending line (228) in Hama's pom.xml, I get the idea that
> this problem affects the construction of the hama-core-...jar file, rather
> than Eclipse's ability to compile the Hama java files. Presumably the
> `mvn install` on the command line built that jar correctly, and this is
> why you are telling me to do that and suggesting this will keep me out of
> trouble.
>
> Thanks,
> Mike
--
Thomas Jungblut
Berlin <th...@gmail.com>
Re: Problem after importing Hama into Eclipse: maven-dependency-plugin (goals
"copy-dependencies", "unpack") is not supported by m2e.
Posted by Mike Spreitzer <ms...@us.ibm.com>.
Thomas,
Thanks for replying, but (1) I do not see any difference between what you
suggested and what I did in the first place (apart from the clean goal,
which presumably would not have been needed the first time around) and (2)
I am not sure I understand the net effect of what's going on.
I got the latest real Maven just a couple days ago from Apache (I used the
recommended mirror). My m2e is also freshly fetched. I have not used
those things before. My Hama is also freshly fetched. I built it using
`mvn install` on the command line before I tried to import into Eclipse.
The import into Eclipse was done by File / Import... and then, in the menu
that pops up, Maven / Existing Maven Projects.
That procedure created an Eclipse project named hama-0.3.0-incubating.
Listed under it, in both the Project Explorer and Package Explorer views,
is a section called Maven Dependencies; it is well populated, including
things like slf4j-log4j12-1.5.2.jar and hadoop-core-0.20.2.jar, both in my
$HOME/.m2/repository/...; when I look at the Hama Java files in Eclipse's
Java Editor, there is no evidence of compilation problems, and the usual
level of understanding of Java semantics seems to be in effect.
Looking at the offending line (228) in Hama's pom.xml, I get the idea that
this problem affects the construction of the hama-core-...jar file, rather
than Eclipse's ability to compile the Hama java files. Presumably the
`mvn install` on the command line built that jar correctly, and this is
why you are telling me to do that and suggesting this will keep me out of
trouble.
Thanks,
Mike
Re: Problem after importing Hama into Eclipse: maven-dependency-plugin
(goals "copy-dependencies", "unpack") is not supported by m2e.
Posted by Thomas Jungblut <th...@googlemail.com>.
Hi Mike,
although I really like m2e it is working very well when you are setting up
Hama for eclipse.
Please get the "real" maven 3.0.3 if you haven't done it yet [1] and do the
same commands via shell.
So stop eclipse, then copy the hama-trunk into workspace and move to that
folder and call
mvn clean install
on your shell, then
mvn eclipse:eclipse
Then you can import the modules in eclipse via Import->"Existing projects
into workspace" or equal named stuff.
It should work then.
It seems to be a problem of m2e that does not support the plugin which gets
the dependencies.
Hope it works then ;)
[1] http://maven.apache.org/download.html
2011/11/26 Mike Spreitzer <ms...@us.ibm.com>
> This is on my MacBook Pro, and I have the current JDK that Apple provides
> (1.6.0_29). I just installed the current Maven, which describes itself as
> Apache Maven 3.0.3 (r1075438; 2011-02-28 12:31:09-0500). This is my first
> ever install of Maven.
>
> I am running Eclipse Helios Service Release 2, Build id 20110218-0911. I
> just installed the latest m2e: my Eclipse plug-ins listing includes
> version 1.0.100.20110804-1717 of m2e / UDC integration Marketplace, m2e
> logback appender, m2e logback configuration, and m2e Marketplace, as well
> as version 0.14.0.201109270543 of m2e connector for the mavenarchiver and
pom properties. This is my first ever install of m2e.
>
> I am also just getting started with Hama. I downloaded it (0.3.0), and
> built (`mvn install`). Then I did `mvn eclipse:eclipse` (while Eclipse
> was not running --- a detail I had to guess since the instructions did not
> address it), and it ultimately claimed success despite printing many
> WARNINGs about being unable to read workspace ... (details below). I then
> launched Eclipse and imported the hama-0.3.0-incubating project. It seems
> to have mostly worked, but Eclipse says I have a Problem in Hama's
> pom.xml. The Description of the Problem is 'maven-dependency-plugin
> (goals "copy-dependencies", "unpack") is not supported by m2e.' and it is
> on line 228.
>
> What's going wrong here, and how do I fix it?
>
> Following are the first two WARNINGs printed during `mvn eclipse:eclipse`;
> there are many more like the second.
>
> [WARNING] Workspace defines a VM that does not contain a valid
> jre/lib/rt.jar:
> /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
> [WARNING] could not read workspace
>
> project:/Users/mspreitz/myworkspace/.metadata/.plugins/org.eclipse.core.resources/.projects/arq-2.8.7
> java.lang.IllegalArgumentException: URI scheme is not "file"
> at java.io.File.<init>(File.java:366)
> at
>
> org.apache.maven.plugin.eclipse.reader.ReadWorkspaceLocations.getProjectLocation(ReadWorkspaceLocations.java:270)
> at
>
> org.apache.maven.plugin.eclipse.reader.ReadWorkspaceLocations.readWorkspace(ReadWorkspaceLocations.java:531)
> at
>
> org.apache.maven.plugin.eclipse.reader.ReadWorkspaceLocations.init(ReadWorkspaceLocations.java:94)
> at
>
> org.apache.maven.plugin.eclipse.EclipsePlugin.getWorkspaceConfiguration(EclipsePlugin.java:1902)
> at
>
> org.apache.maven.plugin.eclipse.EclipsePlugin.fillDefaultClasspathContainers(EclipsePlugin.java:1438)
> at
> org.apache.maven.plugin.eclipse.EclipsePlugin.setup(EclipsePlugin.java:885)
> at
>
> org.apache.maven.plugin.ide.AbstractIdeSupportMojo.execute(AbstractIdeSupportMojo.java:500)
> at
>
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
> at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
> at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> at
>
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> at
>
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
> at
>
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
> at
>
> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
> at
>
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
> 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:597)
> at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
> at
>
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
>
>
> Thanks,
> Mike
--
Thomas Jungblut
Berlin <th...@gmail.com>