Maciej Mastalarczuk wrote on Tuesday, January 31, 2006 3:39 AM:

> Hi,
> 
> Has anyone had any luck with using Maven 2 with Eclipse? It
> can be easily
> integrated through external launch configuration, but Eclipse
> build paths
> are pain. I know there is a plugin for Eclipse
> (http://m2eclipse.codehaus.org), but the latest version (0.0.4) seems
> to be completely broken as it does not want to download anything;
> just says something about authentication being cancelled. The previous
> version (0.0.3)
> is slightly better, but it has the older version of Maven
> embedder (2.0 beta
> 4 SNAPSHOT) and seems to download wrong stuff. I am using maven 2.0.2.
> 
> 
> 
> Has anybody got it working properly? I mean having a Maven 2
> project with
> all dependencies resolved in Eclipse.

I can run Maven 2.0.0 with an External Tool definition (using Eclipse 3.2M4):

<?xml version="1.0" encoding="UTF-8"?>
<launchConfiguration 
type="org.eclipse.ui.externaltools.ProgramLaunchConfigurationType">
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS" 
value="-Xmx384M&#13;&#10;-cp 
&quot;${maven_2_home}/core/boot/classworlds-1.1-alpha-2.jar&quot;&#13;&#10;-Dclassworlds.conf=&quot;${maven_2_home}/bin/m2.conf&quot;&#13;&#10;-Dmaven.home=&quot;${maven_2_home}&quot;&#13;&#10;org.codehaus.classworlds.Launcher&#13;&#10;${string_prompt}"/>
<stringAttribute key="org.eclipse.debug.core.ATTR_REFRESH_SCOPE" 
value="${project}"/>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.ui.externaltools.launchGroup"/>
</listAttribute>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" 
value="${project_loc}"/>
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" 
value="${system_property:java.home}/bin/java.exe"/>
<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" 
value="true"/>
</launchConfiguration>

You just have to define maven_2_home in the "Preferences/Debug/String 
Substitution" for your Maven 2 home.

- Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to