Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Problem with Maven project in Eclipse (Juno)

I would make sure you're using the latest m2e version and get rid of any eclipse plugin entries in the pom.xml.  Then just checkout your project using svn, and use "import->existing maven project" to import the project into eclipse.  It's important to have the right set of eclipse plugins to get the eclipse projects to configure correctly.  I use the following instructions to setup my eclipse...

     Run Eclipse and install the following plugins by going to Help->Install New Software...
        m2e - ​http://download.eclipse.org/technology/m2e/releases
        subclipse - ​http://subclipse.tigris.org/update_1.8.x

    Run Eclipse and Install m2e connectors
        Go to Windows->Preferences
        Expand the "Maven" node and click on "Discovery"
        Click on the "Open Catalog" button
        Check the following connectors...
            buildhelper
            m2e-wtp
        Click Finish and follow prompts to complete the install
        Restart eclipse
        Run eclipse and install the following plugin to allow eclipse to perform openjpa enhancement of the entity beans.
            Go to Help->Install New Software...
            Work with: ​https://github.com/hwellmann/m2eclipse-extras/raw/master/p2/
            Select "Omadac m2e Extensions"->"m2e Connector for OpenJPA".
        Install the following m2e configurators (​http://docs.jboss.org/tools/whatsnew/maven/maven-news-4.1.0.Alpha1.html)...
            Go to Help->Install New Software...
            Work with: ​http://download.eclipse.org/m2e-wtp/releases/juno/
            Select the JPA, JAXRS and JSF configurators for installation.

Cheers,

Anthony


From: choncha@xxxxxxx
To: m2e-users@xxxxxxxxxxx
Date: Thu, 6 Jun 2013 10:21:13 +0200
Subject: [m2e-users] Problem with Maven project in Eclipse (Juno)

Hi!
 
I'm new to Maven and web service programming but will have to deal in the future. I have the source code of an web app developed by another company. According to their install instructions I should set up Eclipse with SVN and Maven integration. I get the project into Eclipse by creating a new project from SVN. Then I run mvn eclipse:eclipse from the command line to create the projects settings (with project closed in Eclipse during that operation). After that I open the project again and enable the Maven nature. There I'll get the following error message:
 
An internal error occurred during: "Enabling Maven Dependency Management".
Unsupported IClasspathEntry kind=4
 
The mvn eclipse:eclipse command seems to create a "wrong" .classpath file. One of my collegues was able to get this shitty project working but he isn't sure what trick was doing the magic to get it running. His .classpath file differs a lot from the one that maven creates on my machine. My entries look like:
<classpathentry kind="var" path="M2_REPO/javax/activation/com.springsource.javax.activation/1.1.1/com.springsource.javax.activation-1.1.1.jar" sourcepath="M2_REPO/javax/activation/com.springsource.javax.activation/1.1.1/com.springsource.javax.activation-1.1.1-sources.jar"/>
whereas his are more of this type:
<classpathentry kind="var" path="M2_REPO/javax/activation/com.springsource.javax.activation/1.1.1/com.springsource.javax.activation-1.1.1.jar" sourcepath="M2_REPO/javax/activation/com.springsource.javax.activation/1.1.1/com.springsource.javax.activation-1.1.1-sources.jar">
                <attributes>
                        <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
                </attributes>
        </classpathentry>
This is the only difference I found so far. Cleaning via mvn eclipse:clean is not making any difference. What am I doing wrong?
The code of the other company is a mess. Is there anything I have to consider when creating a Maven project in Eclipse from existing sources? I'm using a Mac (Mountain Lion 10.8.3) with Eclipse Juno (m2e - Maven Integration for Eclipse    1.3.1.20130219-1424    org.eclipse.m2e.feature.feature.group). When I check the Maven version on the command line I get: Apache Maven 3.0.4 (r1232337; 2012-01-17 09:44:56+0100). Java_home is jdk1.7.0_17.jdk in Eclipse and on command line. Help would be really appreciated as I'm struggeling to get this mess working at all. Thanks!
 
regards
Bjoern

_______________________________________________ m2e-users mailing list m2e-users@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/m2e-users

Back to the top