jeudi 4 juin 2015

How to generate eclipse project from maven with "Maven Dependencies" instead of "Referenced Libraries" "M2_REPO/.."

How can I generate eclipse project from maven like :

mvn eclipse:eclipse 

but I need to get .classpath file like this :

<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
    <attributes>
        <attribute name="maven.pomderived" value="true"/>
        <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
    </attributes>
</classpathentry>

instead of having all dependencies from pom like this :

<classpathentry kind="var" path="M2_REPO/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar" sourcepath="M2_REPO/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0-sources.jar">
<attributes>
  <attribute value="jar:file:/home/tr/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0-javadoc.jar!/" name="javadoc_location"/>
</attributes>

....

Aucun commentaire:

Enregistrer un commentaire