Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-5306

Can't import Geronimo projects into eclipse, because two projects called 'client'.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.2
    • None
    • None
    • Security Level: public (Regular issues)
    • Geronimo 2.2

    • Patch Available

    Description

      After run mvn eclipse:eclipse, and try to import the projects into eclipse,

      It fails, and it reports: "Resource '/client' already exsits'.".
      This is because there are two projects called 'client'.

      search the source code, and find there are indeed two projects named 'client':

      ${geronimo_src_base_dir}\geronimo-2.2\plugins\client\client, in its generated .project file:
      <projectDescription>
      <name>client</name>
      <comment>Client plugin</comment>
      ...

      ${geronimo_src_base_dir}\geronimo-2.2\plugingroups\client, in its generated .project file:
      <projectDescription>
      <name>client</name>
      <comment>This plugin group provides Client functionality.</comment>
      ...

      quick google search, and find http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html
      seems to fix this problem, we can configure eclipse plugin to appende the groupId of the artifact to the name of the generated Eclipse project.

      We can add the following section to outermost pom.xml:
      <build>
      <pluginManagement>
      <plugins>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-eclipse-plugin</artifactId>
      <configuration>
      <addGroupIdToProjectName>
      true
      </addGroupIdToProjectName>
      </configuration>
      </plugin>
      ...
      </build>
      so for each geronimo subproject - take ${geronimo_src_base_dir}\geronimo-2.2\plugins\client\client as example, eclipse project name would be org.apache.geronimo.configs.client.
      ${geronimo_src_base_dir}\geronimo-2.2\plugingroups\client, in its generated .project file:
      <projectDescription>
      <name>org.apache.geronimo.configs.client</name>
      <comment>Client plugin</comment>

      Have verified the fix works, Geronimo projects can be successfully imported to eclipse.

      Attachments

        Activity

          People

            genspring Lin Quan Jiang
            yuanyun.cn jefferyyuan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: