facebook

Migrating from M2Eclipse to Maven4MyEclipse

  1. MyEclipse IDE
  2.  > 
  3. Maven for MyEclipse (Maven4MyEclipse)
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #287639 Reply

    venkat
    Member

    Hi,

    I am migrating from M2Eclipse to Mave4Eclipse my project works fine with M2Eclipse when i try build using the Mave4Eclipse i am getting this error

    
    this realm =    /plugins/org.apache.maven.plugins:maven-surefire-plugin:2.4.2@48/thread:main
    this strategy = org.codehaus.plexus.classworlds.strategy.DefaultStrategy
    urls[0] = file:/C:/Documents%20and%20Settings/vk/.m2/repository/org/apache/maven/plugins/maven-surefire-plugin/2.4.2/maven-surefire-plugin-2.4.2.jar
    urls[1] = file:/C:/Documents%20and%20Settings/vk/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
    Number of imports: 6
    import: Entry[import org/codehaus/plexus/util/xml/pull from realm ClassRealm[plexus.core, parent: null]]
    import: Entry[import org/codehaus/plexus/util/xml/Xpp3Dom from realm ClassRealm[plexus.core, parent: null]]
    import: Entry[import org.codehaus.plexus.util.xml.pull from realm ClassRealm[plexus.core, parent: null]]
    import: Entry[import org.codehaus.plexus.util.xml.Xpp3Dom from realm ClassRealm[plexus.core, parent: null]]
    import: Entry[import /default-report/xml from realm ClassRealm[plexus.core, parent: null]]
    import: Entry[import /default-report.xml from realm ClassRealm[plexus.core, parent: null]]
    
    
    this realm =    plexus.core
    this strategy = org.codehaus.plexus.classworlds.strategy.DefaultStrategy
    Number of imports: 6
    import: Entry[import org/codehaus/plexus/util/xml/pull from realm ClassRealm[plexus.core, parent: null]]
    import: Entry[import org/codehaus/plexus/util/xml/Xpp3Dom from realm ClassRealm[plexus.core, parent: null]]
    import: Entry[import org.codehaus.plexus.util.xml.pull from realm ClassRealm[plexus.core, parent: null]]
    import: Entry[import org.codehaus.plexus.util.xml.Xpp3Dom from realm ClassRealm[plexus.core, parent: null]]
    import: Entry[import /default-report/xml from realm ClassRealm[plexus.core, parent: null]]
    import: Entry[import /default-report.xml from realm ClassRealm[plexus.core, parent: null]]
    
    
    -----------------------------------------------------
    [ERROR] 
    
    Maven encountered an error while looking up the following Mojo:
    Group-Id: org.apache.maven.plugins
    Artifact-Id: maven-surefire-plugin
    Version: 2.4.2
    Mojo: test
    brought in via: packaging: war
    
    Referenced from project:
    Group-Id: com.vk
    Artifact-Id: mission
    Version: 1.0
    From file: C:\Documents and Settings\vk\Workspaces\MyEclipse 6.5 - Pulse Edition\mission\pom.xml
    Reason: Unable to lookup component 'org.apache.maven.plugin.Mojo', it could not be created.
          role: org.apache.maven.plugin.Mojo
      roleHint: org.apache.maven.plugins:maven-surefire-plugin:2.4.2:test
    classRealm: /plugins/org.apache.maven.plugins:maven-surefire-plugin:2.4.2@48/thread:main
    
    Root cause: org.apache.maven.surefire.booter.SurefireExecutionException
    
    

    Please help me

    Thanks
    Venku

    #287695 Reply

    Riyad Kalla
    Member

    Venku,
    Is this still happening today? I ask because Maven4MyEclipse is a custom implementation of m2eclipse, it should keep working just fine as it did before. It’s possible the public repo was broken and the Surefire reference cannot be resolved correctly in which case that would happen in m2eclipse, Maven4MyEclipse and the command line.

    Another idea is just to skip the test phase if it keeps failing using the “Skip Tests” checkbox on the launch configuration dialog:

    Attachments:
    You must be logged in to view attached files.
    #287711 Reply

    venkat
    Member

    Riyad,

    Still same problem

    🙁

    #287713 Reply

    Srinivasa
    Member

    Hi Venku

    Try adding the following to your pom.xml and update me..
    <build>
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
    <forkMode>pertest</forkMode>
    <argLine>-Xms256m -Xmx512m</argLine>
    <testFailureIgnore>false</testFailureIgnore>
    <skip>false</skip>
    </configuration>
    </plugin>
    </plugins>
    </build>

    #287714 Reply

    Srinivasa
    Member

    Forgot to mention….. Please do ‘ Update Maven Dependencies’ and project refresh before build.

    #287749 Reply

    venkat
    Member

    skadiy000,

    Same problem, posting my pom.xml

    
    <build>
        <plugins>
          <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>maven-jetty-plugin</artifactId>
            <version>6.1.7</version>
            <dependencies>
              <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-servlet_2.4_spec</artifactId>
                <version>1.1.1</version>
                <scope>provided</scope>
              </dependency>
            </dependencies>
            <configuration>
              <scanIntervalSeconds>3</scanIntervalSeconds>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <forkMode>pertest</forkMode>
                <argLine>-Xms256m -Xmx512m</argLine>
                <testFailureIgnore>false</testFailureIgnore>
                <skip>false</skip>
            </configuration>
          </plugin> 
        </plugins>
       </build>
       <dependencies>
        <dependency>
          <groupId>javax.servlet</groupId>
          <artifactId>jsp-api</artifactId>
          <version>2.0</version>
          <scope>provided</scope>
        </dependency> 
        <dependency>
          <groupId>javax.servlet</groupId>
          <artifactId>servlet-api</artifactId>
          <version>2.4</version>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>3.8.1</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-mock</artifactId>
          <version>2.0.5</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-core</artifactId>
          <version>1.2.5</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.apache.struts</groupId>
          <artifactId>struts2-core</artifactId>
          <version>2.0.9</version>
        </dependency>
        <dependency>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>jetty-naming</artifactId>
          <version>6.1.5</version>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>jetty-util</artifactId>
          <version>6.1.5</version>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>jetty</artifactId>
          <version>6.1.5</version>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>jetty-plus</artifactId>
          <version>6.1.5</version>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>org.hibernate</groupId>
          <artifactId>hibernate</artifactId>
          <version>3.2.5.ga</version>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>dom4j</groupId>
          <artifactId>dom4j</artifactId>
          <version>1.6.1</version>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>xml-apis</groupId>
          <artifactId>xml-apis</artifactId>
          <version>1.3.04</version>
          <scope>provided</scope>
        </dependency>
            <dependency>
          <groupId>com.microsoft.sqlserver</groupId>
          <artifactId>mssqlserver</artifactId>
          <version>8.0.0</version>
          <scope>system</scope>
          <systemPath>${basedir}\src\main\webapp\WEB-INF\lib\mssqlserver.jar</systemPath>
        </dependency>
        <dependency>
          <groupId>com.microsoft.sqlserver</groupId>
          <artifactId>msbase</artifactId>
          <version>8.0.0</version>
          <scope>system</scope>
          <systemPath>${basedir}\src\main\webapp\WEB-INF\lib\msbase.jar</systemPath>
        </dependency>
        <dependency>
          <groupId>com.microsoft.sqlserver</groupId>
          <artifactId>msutil</artifactId>
          <version>8.0.0</version>
          <scope>system</scope>
          <systemPath>${basedir}\src\main\webapp\WEB-INF\lib\msutil.jar</systemPath>
        </dependency>
        <dependency>
          <groupId>oracle</groupId>
          <artifactId>oracle.jdbc</artifactId>
          <version>9.2.0.5</version>
          <scope>system</scope>
          <systemPath>${basedir}\src\main\webapp\WEB-INF\lib\ojdbc14.jar</systemPath>
        </dependency>
        <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-jdbc</artifactId>
          <version>2.5</version>
        </dependency>
        <dependency>
          <groupId>com.opensymphony</groupId>
          <artifactId>xwork</artifactId>
          <version>2.0.4</version>
        </dependency>
        <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-beans</artifactId>
          <version>2.5</version>
        </dependency>
        <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-core</artifactId>
          <version>2.5</version>
        </dependency>
        <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-context</artifactId>
          <version>2.5</version>
        </dependency>
        <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-web</artifactId>
          <version>2.5</version>
        </dependency>
        <dependency>
          <groupId>org.apache.struts</groupId>
          <artifactId>struts2-spring-plugin</artifactId>
          <version>2.0.9</version>
        </dependency>
        <dependency>
          <groupId>org.springframework</groupId>
          <artifactId>spring-aop</artifactId>
          <version>2.5</version>
        </dependency>
      </dependencies>
    </project>
    

    Thanks,
    Venku

    #287751 Reply

    venkat
    Member

    skadiy000,

    I changed installed Maven runtimes from embedded to maven-2.0.7 its working fine

    Thanks
    Venku
    🙂

    #287866 Reply

    Riyad Kalla
    Member

    Guys, I appreciate you helping each other out with this issue, I am sending it off to the dev team to evaluate why you had to change your runtimes to get that POM to execute correctly. We might need to do some library updates on our end.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Migrating from M2Eclipse to Maven4MyEclipse

You must be logged in to post in the forum log in