3 Replies Latest reply on Oct 2, 2009 1:52 AM by Thomas Diesler

    m2eclipse or not

    Thomas Diesler Master

      Folks,

      I'm wondering if there is a convention on whether MC projects should use http://m2eclipse.sonatype.org/ or not.

      I personally prefer m2eclipse over other (less dynamic) classpath config mechanisms like this

      <classpath>
       <classpathentry kind="src" path="src/test/java" output="target/tests-classes" including="**/*.java"/>
       <classpathentry kind="src" path="src/test/resources" output="target/tests-classes" excluding="**/*.java"/>
       <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
       <classpathentry kind="output" path="target/classes"/>
       <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.7.0/ant-1.7.0.jar"/>
       <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar"/>
       <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar"/>
       <classpathentry kind="var" path="M2_REPO/javassist/javassist/3.10.0.GA/javassist-3.10.0.GA.jar"/>
       <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-classloading-spi/5.1.0.SP1/jboss-classloading-spi-5.1.0.SP1.jar" sourcepath="M2_REPO/org/jboss/integration/jboss-classloading-spi/5.1.0.SP1/jboss-classloading-spi-5.1.0.SP1-sources.jar"/>
       <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.14.GA/jboss-common-core-2.2.14.GA.jar" sourcepath="M2_REPO/org/jboss/jboss-common-core/2.2.14.GA/jboss-common-core-2.2.14.GA-sources.jar"/>
       <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA-sources.jar"/>
       <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar" sourcepath="M2_REPO/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA-sources.jar"/>
       <classpathentry kind="var" path="M2_REPO/jboss/profiler/jvmti/jboss-profiler-jvmti/1.0.0.CR5/jboss-profiler-jvmti-1.0.0.CR5.jar"/>
       <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-server-manager/0.1.1.GA/jboss-server-manager-0.1.1.GA.jar"/>
       <classpathentry kind="var" path="M2_REPO/org/jboss/test/jboss-test/1.1.1.GA/jboss-test-1.1.1.GA.jar"/>
       <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar"/>
       <classpathentry kind="var" path="M2_REPO/apache-log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
      </classpath>
      


      Any objections if I switch the classloader projects over?

        • 1. Re: m2eclipse or not
          Ales Justin Master

           

          "thomas.diesler@jboss.com" wrote:

          Any objections if I switch the classloader projects over?

          What's the impact on the project?
          Just checking if it would affect me as well, as an IntelliJ user. ;-)

          • 2. Re: m2eclipse or not
            Thomas Diesler Master

            It changes the eclipse .classpath file to read

            <classpath>
             <classpathentry kind="src" output="target/classes" path="src/main/java"/>
             <classpathentry kind="src" output="target/tests-classes" path="src/test/java"/>
             <classpathentry excluding="**" kind="src" output="target/tests-classes" path="src/test/resources"/>
             <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
             <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
             <classpathentry kind="output" path="target/classes"/>
            </classpath>
            


            Basically m2eclipse reads the pom to maintain a dynamic classpath container.

            If dependencies (also transitive) in the pom change that gets reflected automatically in the eclipse classpath.

            I am asking because I see stale classpath definitions, which would not occur if m2eclipse was used.

            The down-side (if there is one) would be that folks have to install the m2eclipse plugin.

            In short: It doesn't affect you at all ;-)

            • 3. Re: m2eclipse or not
              Thomas Diesler Master

              I would now assume that it is ok to switch to m2eclipse