Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5847245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:41:28+00:00 2026-05-22T12:41:28+00:00

In Eclipse Helios, the m2eclipse plugin doesn’t include projects in my local workspace in

  • 0

In Eclipse Helios, the m2eclipse plugin doesn’t include projects in my local workspace in any run configuration.

I’ve set up this test scenario:

ProjectA
+ src/main/java/a/TestInA.java
+ pom.xml

ProjectB
+ src/main/java/b/TestInB.java ("main()" calls "a.TestInA.main()")
+ pom.xml (includes reference to ProjectA)

The flag “Resolve dependencies from Workspace projects” is set on both projects. This works beautifully while compiling, i.e. compiler finds reference to “a.TestInA” in “b.TestInB”, and the “Maven dependencies” list includes a reference to “ProjectA”. But when I try to actually run “b.TestInB”, I get a NoClassDefFoundError:

Exception in thread "main" java.lang.NoClassDefFoundError: a/TestInA
at b.TestInB.main(TestInB.java:13)
Caused by: java.lang.ClassNotFoundException: a.TestInA
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 1 more

Indeed, the system property “java.class.path” doesn’t include ProjectA’s “target/classes” folder (or any other folder for that matter).

These are my installed versions:

  • Eclipse: Helios Service Release 2 (build id: 20110301-1815)
  • m2eclipse: 0.12.1 (build id: 20110112-1712)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T12:41:29+00:00Added an answer on May 22, 2026 at 12:41 pm

    I finally found the error in my configuration. It had to do with the “archiverClassifier” in the workspace dependency. My POMs are set up to generate differently named artifacts depending on the running compiler.

    This is done using profiles for “jdk1.5” and “jdk1.6”, setting the “archiverClassifier” variable:

    <profiles>
        <profile>
            <id>jdk1.5</id>
            <activation>
                <jdk>1.5</jdk>
            </activation>
            <properties>
                <compilerTarget>1.5</compilerTarget>
                <archiverClassifier>jdk1.5</archiverClassifier>
            </properties>
        </profile>
        <profile>
            <id>jdk1.6</id>
            <activation>
                <jdk>1.6</jdk>
            </activation>
            <properties>
                <compilerTarget>1.6</compilerTarget>
                <archiverClassifier>jdk1.6</archiverClassifier>
            </properties>
        </profile>
    </profiles>
    

    Then, in the dependency, I refer to the correct classifier using the “classifier” child, giving it the “archiverClassifier” variable previously set in the corresponding profile:

    <dependencies>
        <dependency>
            <groupId>com.brain2</groupId>
            <artifactId>ProjectA</artifactId>
            <version>1.0.0-SNAPSHOT</version>
            <classifier>${archiverClassifier}</classifier>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
    </dependencies>
    

    If I remove the “classifier” child, m2eclipse’s workspace dependency resolution works like a charm.

    Once I figured this out, a quick Google-search for “m2eclipse workspace resolution classifiers” landed me square on Sonatype’s JIRA page for bug MNGECLIPSE-680. So I guess this is a bug, and I just answered my own question 🙂

    (On a side note, this issue doesn’t arise for unit tests, where the dependency’s “test-classes” directory is properly added to the classpath.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I installed Eclipse Helios with the m2eclipse maven plugin. I want to create an
Am using eclipse helios with m2eclipse plugin. For a maven project checked out from
I am using eclipse helios and the m2eclipse plugin. I wonder if it is
Eclipse Helios periodically starts running a job which displays Computing additional info. During this
I installed Eclipse Helios and m2eclipse. Next I created a maven project. Now Eclipse
I recently set up a j2ee development environment under Ubuntu: Eclipse (Helios) with the
I have installed eclipse Helios and want to create a plugin project. I select
I have installed EGit plugin on my Eclipse Helios SR2 Installation. I also have
Under Helios/m2eclipse, when I generated jaxb sources they would be put on the Eclipse
I have Eclipse Helios with a java program set up. I'm attempting to create

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.