Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-858

Forge can't find dependencies from Maven Central if there is an active profile with repository setup in settings.xml

XMLWordPrintable

      It seems that Forge does not recognize the dependencies form Maven Central. This happens when there is an active profile with some repository setup in settings.xml file.

      I experience this when using Forge with Ticket Monster (https://github.com/jboss-jdf/ticket-monster) and empty maven local repository.

      settings.xml snippet:

          </profiles>
              <profile>
                  <id>test-profile</id>
                  <repositories>
                      <repository>
                          <id>obsolete-enterprise-repository</id>
                          <name>Obsolete Enterprise Repository</name>
                          <url>file:///home/trepel/maven/some-repo-with-missing-dependencies</url>
                          <layout>default</layout>
                          <releases>
                              <enabled>true</enabled>
                              <updatePolicy>never</updatePolicy>
                          </releases>
                          <snapshots>
                              <enabled>false</enabled>
                              <updatePolicy>never</updatePolicy>
                          </snapshots>
                      </repository>
                  </repositories>
              </profile>
          </profiles>
      
          <activeProfiles>
              <activeProfile>test-profile</activeProfile>
          </activeProfiles>
      
      

      Running Forge in ticket-monster/demo directory results in following:

      Using Forge at /home/trepel/workspace/apps/forge-distribution-1.2.3.Final
          _____                    
         |  ___|__  _ __ __ _  ___ 
         | |_ / _ \| `__/ _` |/ _ \  \\
         |  _| (_) | | | (_| |  __/  //
         |_|  \___/|_|  \__, |\___| 
                         |___/      
       
      Error during Startup event
      org.jboss.forge.project.ProjectModelException: org.apache.maven.project.ProjectBuildingException: 29 problems were encountered while building the effective model for org.jboss.jdf.examples:ticket-monster:2.1.2-SNAPSHOT
      [ERROR] Non-resolvable import POM: Could not find artifact org.jboss.bom:jboss-javaee-6.0-with-tools:pom:1.0.5.CR2 in obsolete-enterprise-repository (file:///home/trepel/maven/some-repo-with-missing-dependencies) @ line 50, column 25
      
      

            rhn-support-ggastald George Gastaldi
            trepel Tomas Repel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: