Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-1111

Spring plugin repositories needed in generated project pom.xml files by default

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.0.M2
    • Fix Version/s: 1.1.0.M3
    • Component/s: @ CORE
    • Labels:
      None

      Description

      Spring Roo 1.1.0.M2 creates users project that use AspectJ 1.6.10.M1. If a user runs Maven 2 from the command line it will successfully download AspectJ 1.6.10.M1 if not already downloaded. If a user runs m2eclipse (which uses Maven 3) without having run Maven 2 previously, they will fail to download the AspectJ dependency with an error:

      1) org.aspectj:aspectjtools:jar:1.6.10.M1
      
        Try downloading the file manually from the project website.
      
        Then, install it using the command: 
            mvn install:install-file -DgroupId=org.aspectj -DartifactId=aspectjtools -Dversion=1.6.10.M1 -Dpackaging=jar -Dfile=/path/to/file
      
        Alternatively, if you host your own repository you can deploy the file there: 
            mvn deploy:deploy-file -DgroupId=org.aspectj -DartifactId=aspectjtools -Dversion=1.6.10.M1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
      
        Path to dependency: 
        	1) org.codehaus.mojo:aspectj-maven-plugin:maven-plugin:1.0
        	2) org.aspectj:aspectjtools:jar:1.6.10.M1
      ----------
      1 required artifact is missing.
      
      for artifact: 
        org.codehaus.mojo:aspectj-maven-plugin:maven-plugin:1.0
      
      from the specified remote repositories:
        central (http://repo1.maven.org/maven2, releases=true, snapshots=false)
      
      

      As shown, only Maven Central was visited to download the dependency. The AspectJ dependency is actually at http://maven.springframework.org/milestone/org/aspectj/aspectjtools/1.6.10.M1/aspectjtools-1.6.10.M1.jar.

      To resolve this Roo should add plugin repositories by default to user-created POMs. For completeness and to avoid this happening in the future it should add all of the Spring and Roo-related Maven repositories:

          <pluginRepositories>
              <pluginRepository>
                  <id>spring-maven-release</id>
                  <name>Spring Maven Release Repository</name>
                  <url>http://maven.springframework.org/release</url>
              </pluginRepository>
              <pluginRepository>
                  <id>spring-maven-milestone</id>
                  <name>Spring Maven Milestone Repository</name>
                  <url>http://maven.springframework.org/milestone</url>
              </pluginRepository>
              <pluginRepository>
                  <id>spring-roo-repository</id>
                  <name>Spring Roo Repository</name>
                  <url>http://spring-roo-repository.springsource.org/release</url>
              </pluginRepository>
          </pluginRepositories>
      

      Users wish to work around this bug can either:

      • Use Maven 2 from the command line to cause the dependencies to download
      • Manually add the above code fragment to Roo 1.1.0.M2 generated pom.xml files
      • Wait for Roo 1.1.0.M3 when this will be resolved by default

        Attachments

          Activity

            People

            • Assignee:
              balex Ben Alex
              Reporter:
              balex Ben Alex
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: