Translated message

A translation of this page exists in English.

BRMS maven リポジトリにアクセスする

Solution Unverified - Updated -

Issue

ローカルの java maven プロジェクトのいずれかから、リモートの BRMS ルールプロジェクトにアクセスしたいです。ローカルの java プロジェクトの pom.xml に以下のタグを追加しました。

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

<!-- rules project in Guvnor is required -->
<dependency>
  <groupId>org.kie.example</groupId>
  <artifactId>project1</artifactId>
  <version>1.0.0</version>
</dependency>

そして、~/.m2/settings.xml にユーザー名とパスワードを指定します。

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

ローカルの maven プロジェクトを構築しようとすると以下の例外が発生します。

[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.
    ...
 ... 
  • BRMS 6 サーバーのリモート maven リポジトリからローカルの maven プロジェクトに jar をインポートするにはどうすれば良いですか?

Environment

  • Red Hat JBoss BRMS (BRMS)
    • 6.0.0
  • Red Hat JBoss BPM Suite (BRMS)
    • 6.0.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content