jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Maven Integration for Eclipse
  • Maven Integration for Eclipse
  • MNGECLIPSE-1025

Can't access org.apache.maven classes

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 0.9.7
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Eclipse 3.4.0 (with Eclipse 3.3.2 target platform),Windows XP
  • Number of attachments :
    1

Description

I'm working on a plugin (several, actually) that depends on the m2eclipse plugins. I've declared dependency on the following in my plugin.xml:
org.maven.ide.eclipse
org.maven.ide.components.archetype_common

The latter one contains the Archetype JAR file (archetype-common-2.0-alpha-2.jar) and exports its packages. However, I still can not see any of the classes in the Archetype JAR (for example, org.apache.maven.archetype.catalog.Archetype).

It is very common practice for a plugin to expose the packages from a JAR that it contains, so I'm not sure why this is not working. Any ideas?

I am running Eclipse 3.4.0 and have my target platform set to a 3.3.2 Eclipse SDK + WTP + some of the m2eclipse plugins (listed below). I will attach a sample project that demonstrates the problem using this setup.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Hide
    Zip Archive
    MavenDependencyTest.zip
    31/Oct/08 11:47 AM
    210 kB
    Eric Rizzo
    1. File
      MavenDependencyTest/.classpath 0.4 kB
    2. File
      MavenDependencyTest/.project 0.7 kB
    3. File
      MavenDependencyTest/.../org.eclipse.jdt.core.prefs 0.3 kB
    4. File
      MavenDependencyTest/META-INF/MANIFEST.MF 0.3 kB
    5. File
      MavenDependencyTest/bin/.../MyClass.class 0.5 kB
    6. File
      MavenDependencyTest/build.properties 0.1 kB
    7. Java Archive File
      MavenDependencyTest/.../archetype-common-2.0-alpha-2.jar 228 kB
    8. Java Source File
      MavenDependencyTest/src/.../MyClass.java 0.1 kB
    Download Zip
    Show
    Zip Archive
    MavenDependencyTest.zip
    31/Oct/08 11:47 AM
    210 kB
    Eric Rizzo

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Eric Rizzo added a comment - 31/Oct/08 11:47 AM

The attached project does not compile (it fails to locate the org.apache.maven.archetype.catalog.Archetype class) as it is configured, when m2eclipse is included in the workspace's Target Platform.
If you change the Runtime settings of the test plugin's manifest to include lib/archetype-common-2.0-alpha-2.jar then it compiles successfully. However, the point of the org.maven.ide.components.archetype_common plugin is to export the packages from the JAR, so it should not be necessary to depend on the JAR directly.

Show
Eric Rizzo added a comment - 31/Oct/08 11:47 AM The attached project does not compile (it fails to locate the org.apache.maven.archetype.catalog.Archetype class) as it is configured, when m2eclipse is included in the workspace's Target Platform. If you change the Runtime settings of the test plugin's manifest to include lib/archetype-common-2.0-alpha-2.jar then it compiles successfully. However, the point of the org.maven.ide.components.archetype_common plugin is to export the packages from the JAR, so it should not be necessary to depend on the JAR directly.
Hide
Permalink
Eugene Kuleshov added a comment - 31/Oct/08 12:50 PM

Eric, you need to import org.maven.ide.components.* projects into your workspace, because of the limitation in PDE.

Show
Eugene Kuleshov added a comment - 31/Oct/08 12:50 PM Eric, you need to import org.maven.ide.components.* projects into your workspace, because of the limitation in PDE.
Hide
Permalink
Eric Rizzo added a comment - 03/Nov/08 9:09 AM

Eugene,
Are you saying that the need to import the org.maven.ide.components.* plugins into the workspace is only for compile-time in the IDE and that headless build and runtime will both work correctly otherwise?

Show
Eric Rizzo added a comment - 03/Nov/08 9:09 AM Eugene, Are you saying that the need to import the org.maven.ide.components.* plugins into the workspace is only for compile-time in the IDE and that headless build and runtime will both work correctly otherwise?
Hide
Permalink
Eugene Kuleshov added a comment - 03/Nov/08 9:12 AM

Exactly.

Show
Eugene Kuleshov added a comment - 03/Nov/08 9:12 AM Exactly.

People

  • Assignee:
    Unassigned
    Reporter:
    Eric Rizzo
Vote (0)
Watch (0)

Dates

  • Created:
    31/Oct/08 11:43 AM
    Updated:
    03/Nov/08 9:12 AM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.