2 Replies Latest reply on Aug 28, 2009 1:33 PM by starksm64

    Reloaded eclipse project usage

    starksm64

      I'm looking at getting a new profile service integrated into a reloaded subproject and was looking at the as5_0_1-profile as an example. When I run the org.jboss.reloaded.repoclassloader.test.simple.unit.SimpleTestCase after importing the maven root project, it was failing because the eclipse-target directory was not what was used by the eclipse build. If I updated the BootASTestCase.getTargetDirectory() to return "target" for all cases the test runs correctly.

      Importing the parent maven project using m2eclipse has updated the .classpath to use the same target as the mvn command line.

      [532][valkyrie: as5_0_1-profile]$ svn diff .classpath
      Index: .classpath
      ===================================================================
      --- .classpath (revision 92895)
      +++ .classpath (working copy)
      @@ -1,8 +1,9 @@
      +<?xml version="1.0" encoding="UTF-8"?>
       <classpath>
      - <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
      - <classpathentry kind="src" path="src/test/java" output="eclipse-target/test-classes"/>
      - <classpathentry kind="src" path="src/test/resources" output="eclipse-target/test-classes" excluding="**/*.java"/>
      - <classpathentry kind="output" path="eclipse-target/classes"/>
      - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
      - <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
      -</classpath>
      \ No newline at end of file
      + <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
      + <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
      + <classpathentry excluding="**" kind="src" output="target/test-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>
      


      What is the correct way to import the projects?


        • 1. Re: Reloaded eclipse project usage
          wolfc

          I've never re-imported those projects yet. So the validity of the setup is questionable.

          One thing I don't want to have is 'target/classes' and 'target/test-classes' in .classpath. This has led to issues in the past where classes compiled by the Eclipse compiler ended up in the snapshot repository.

          Have you tried: mvn -Peclipse eclipse:m2eclipse ?

          • 2. Re: Reloaded eclipse project usage
            starksm64

            Running mvn -Peclipse eclipse:m2eclipse produces the separate eclipse-target classpath entries. I guess I was expecting that to be done when one imports an maven project.