Uploaded image for project: 'JBoss BRMS Platform'
  1. JBoss BRMS Platform
  2. RHBRMS-2261

Cannot access to remote business-central maven repository

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • 6.0.1
    • 6.0.0
    • Business Central
    • None

      Description of problem:

      Reproduced in 6.0.0.Beta and 6.0.0.CR2.

      • Start BRMS binding a specific IP (e.g. $ standalone.sh -b 10.10.10.10)
      • Run maven in a remote machine with the pom.xml like this

      <repository>
      <id>guvnor-m2-repo</id>
      <name>Guvnor M2 Repo</name>
      <url>http://10.10.10.10:8080/business-central/maven2/</url>
      </repository>

      Also having username/password in ~/.m2/settings.xml

      <servers>
      <server>
      <id>guvnor-m2-repo</id>
      <username>admin</username>
      <password>password1!</password>
      </server>
      </servers>

      • 'mvn clean install' fails with the following message

      [ERROR] Failed to execute goal on project TestApp: Could not resolve dependencies for project com.sample:TestApp:jar:1.0.0: Failed to collect dependencies at org.kie.example:project1:jar:1.0.0-SNAPSHOT: Failed to read artifact descriptor for org.kie.example:project1:jar:1.0.0-SNAPSHOT: Could not transfer artifact org.kie.example:project1:pom:1.0.0-SNAPSHOT from/to guvnor-m2-repo (http://10.10.10.10:8080/business-central/maven2/): Not authorized , ReasonPhrase:Unauthorized. -> [Help 1]
      org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project TestApp: Could not resolve dependencies for project com.sample:TestApp:jar:1.0.0: Failed to collect dependencies at org.kie.example:project1:jar:1.0.0-SNAPSHOT
      at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:220)
      . . .
      Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project com.sample:TestApp:jar:1.0.0: Failed to collect dependencies at org.kie.example:project1:jar:1.0.0-SNAPSHOT
      at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:167)
      at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:195)
      ... 22 more
      Caused by: org.eclipse.aether.collection.DependencyCollectionException: Failed to collect dependencies at org.kie.example:project1:jar:1.0.0-SNAPSHOT
      at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:292)
      ...
      Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for org.kie.example:project1:jar:1.0.0-SNAPSHOT
      ...
      Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact org.kie.example:project1:pom:1.0.0-SNAPSHOT from/to guvnor-m2-repo (http://10.10.10.10:8080/business-central/maven2/): Not authorized , ReasonPhrase:Unauthorized.
      ...

      Interestingly, this works without error if BRMS and maven client exist in the same machine (even if BRMS binds a specific IP instead of localhost).

      Steps to Reproduce:

      See above.

      Actual results:

      maven fails.

      Expected results:

      maven successfully build.

      Additional info:

      You can workaround this by modifying business-central.war/WEB-INF/classes/url_filter.yaml file.
      ===
      filter:

      • pattern: /rest/**
      • pattern: /org.kie.workbench.drools.KIEDroolsWebapp/**

      exclude:

      • /*.ico
      • /org.kie.workbench.drools.KIEDroolsWebapp/images/**
      • /org.kie.workbench.drools.KIEDroolsWebapp/css/**
      • /css/**
      • /images/**
      • /maven2/**
        ===

      I filed this BZ for the case where users still want authentication.

              manstis@redhat.com Michael Anstis
              rhn-support-tkobayas Toshiya Kobayashi
              Archiver:
              rhn-support-ceverson Clark Everson
              Jiří Locker Jiří Locker (Inactive)
              Jiří Locker Jiří Locker (Inactive)
              Kris Verlaenen, Mario Fusco, Rajesh Rajasekaran, spagop2

                Created:
                Updated:
                Resolved:
                Archived: