Maven Integration for Eclipse

Problem launching Ant

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 0.9.7
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows, JDK 1.6, Eclipse 3.3.2, m2eclipse 0.9.7 and 0.9.6
  • Number of attachments :
    4

Description

I've upgraded some Maven components, and now I can't launch Ant scripts from within Eclipse. When I click build.xml and right-click Run As/Ant Build, I get the error message:

Unsupported launch configuratio type org.eclipse.ant.AntLaunchConfigurationType

(note the misspelling)

A bit of googling found the offending code here:

http://jira.codehaus.org/secure/attachment/37121/m2eclipse-MNGECLIPSE-917.patch

and here:

http://svn.sonatype.org/m2eclipse/tags/0.9.1.200803311600/org.maven.ide.eclipse/src/org/maven/ide/eclipse/launch/MavenRuntimeClasspathProvider.java

Looks like an m2eclipse error. I just upgraded to 0.9.7, but that did not fix the issue.

**************************************
A little more research shows that the problem is in the Ant launch configuration, located in

C:\eclipse_workspace\.metadata\.plugins\org.eclipse.debug.core\.launches

I have attached two configurations, one that works and one that doesn't. diesel build_extra.xml.launch fails, and diesel build3.xml.launch works ok. Note the differences between the two.

Activity

Hide
Eugene Kuleshov added a comment -

Chris, can you please create simple project that would allow to reproduce this issue? It would save us some time. Thanks.

Show
Eugene Kuleshov added a comment - Chris, can you please create simple project that would allow to reproduce this issue? It would save us some time. Thanks.
Hide
Chris Cleveland added a comment -

I don't think it's specific to a project – it's specific to a launch config. After I deleted all my old launch configs, the problem went away. I'm having a hard time getting it to happen again. It may apply only to old projects, that is, projects that were created before something in Maven changed. Do the two attached launch configs give you any clues?

Show
Chris Cleveland added a comment - I don't think it's specific to a project – it's specific to a launch config. After I deleted all my old launch configs, the problem went away. I'm having a hard time getting it to happen again. It may apply only to old projects, that is, projects that were created before something in Maven changed. Do the two attached launch configs give you any clues?
Hide
Eugene Kuleshov added a comment -

Not really, and I also don't want to guess what was happening. If you can't reproduce issue anymore, how can you expect us to do it?
So, I really a some sequence of steps or a test project that would allow to reproduce.

Show
Eugene Kuleshov added a comment - Not really, and I also don't want to guess what was happening. If you can't reproduce issue anymore, how can you expect us to do it? So, I really a some sequence of steps or a test project that would allow to reproduce.
Hide
Ben Burry added a comment -

I've run into the same issue.

In my case it seems to only occur if I close/reopen a project in eclipse, or delete then recreate a project with the same name.

From the eclipse error log:

!SESSION 2008-10-13 10:20:59.094 -----------------------------------------------
eclipse.buildId=M20080911-1700
java.version=1.5.0_16
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86, WS=carbon, NL=en_US
Framework arguments: -keyring /Users/sean/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws carbon -arch x86 -keyring /Users/sean/.eclipse_keyring -consoleLog -showlocation

!ENTRY org.maven.ide.eclipse 4 0 2008-10-13 11:00:25.178
!MESSAGE Unsupported launch configuratio type org.eclipse.ant.AntLaunchConfigurationType

This appears to be caused by the

org.eclipse.jdt.launching.CLASSPATH_PROVIDER

and

org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER

entries in this file:

<workspace_dir>/.plugins/org.eclipse.debug.core/.launches/<project_name> <ant_build_filename> [<ant_task_name>].launch

Before closing the project (when running the ant task works correctly) they are set to

<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/>

After closing/reopening/recreating the project (when running the ant task results in the error) they are set to

<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.classpathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.sourcepathProvider"/>

As a workaround (and as I don't have any task-specific settings) simply deleting the .launch file and letting eclipse recreate it has worked for me.

Sean.

Show
Ben Burry added a comment - I've run into the same issue. In my case it seems to only occur if I close/reopen a project in eclipse, or delete then recreate a project with the same name. From the eclipse error log: !SESSION 2008-10-13 10:20:59.094 ----------------------------------------------- eclipse.buildId=M20080911-1700 java.version=1.5.0_16 java.vendor=Apple Inc. BootLoader constants: OS=macosx, ARCH=x86, WS=carbon, NL=en_US Framework arguments: -keyring /Users/sean/.eclipse_keyring -showlocation Command-line arguments: -os macosx -ws carbon -arch x86 -keyring /Users/sean/.eclipse_keyring -consoleLog -showlocation !ENTRY org.maven.ide.eclipse 4 0 2008-10-13 11:00:25.178 !MESSAGE Unsupported launch configuratio type org.eclipse.ant.AntLaunchConfigurationType This appears to be caused by the org.eclipse.jdt.launching.CLASSPATH_PROVIDER and org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER entries in this file: <workspace_dir>/.plugins/org.eclipse.debug.core/.launches/<project_name> <ant_build_filename> [<ant_task_name>].launch Before closing the project (when running the ant task works correctly) they are set to <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/> <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/> After closing/reopening/recreating the project (when running the ant task results in the error) they are set to <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.classpathProvider"/> <stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.sourcepathProvider"/> As a workaround (and as I don't have any task-specific settings) simply deleting the .launch file and letting eclipse recreate it has worked for me. Sean.
Hide
Eugene Kuleshov added a comment -

Ben, will you be able to provide test project for this?

Show
Eugene Kuleshov added a comment - Ben, will you be able to provide test project for this?
Hide
Eugene Kuleshov added a comment -

Committed fix based on my understanding of the issue into trunk. Please feel free to reopen if you still see this issue in the next dev build, but please make sure to provide test project that would allow to reproduce. Thanks.

Show
Eugene Kuleshov added a comment - Committed fix based on my understanding of the issue into trunk. Please feel free to reopen if you still see this issue in the next dev build, but please make sure to provide test project that would allow to reproduce. Thanks.
Hide
Isaac Salgueiro added a comment -

I've just hit this bug on 0.9.6. The attached project should reproduce it.

Regards

Show
Isaac Salgueiro added a comment - I've just hit this bug on 0.9.6. The attached project should reproduce it. Regards
Hide
Eugene Kuleshov added a comment -

Isaac, thanks for the test project, but there is already a dev build that include fix for this issue. You can install it from update site at http://m2eclipse.sonatype.org/update-dev/

Show
Eugene Kuleshov added a comment - Isaac, thanks for the test project, but there is already a dev build that include fix for this issue. You can install it from update site at http://m2eclipse.sonatype.org/update-dev/

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: