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.
This is not a bug in the product. The workarounds suggested by Michael were verified for 6.0.0.GA and 6.0.1.ER1. To summarize: It is either needed to turn on pre-emptive authentication for the repository server by <server> <id>guvnor-m2-repo</id> <username>admin</username> <password>admin</password> <configuration> <wagonProvider>httpclient</wagonProvider> <httpConfiguration> <all> <usePreemptive>true</usePreemptive> </all> </httpConfiguration> </configuration> </server> or set Authorization HTTP header with Base64 encoded credentials <server> <id>guvnor-m2-repo</id> <configuration> <httpHeaders> <property> <name>Authorization</name> <!-- Base64-encoded "admin:admin" --> <value>Basic YWRtaW46YWRtaW4=</value> </property> </httpHeaders> </configuration> </server> This should be documented.
Mario Fusco <mario.fusco> updated the status of jira DROOLS-436 to Resolved
*** Bug 1074986 has been marked as a duplicate of this bug. ***