Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1061151

Summary: Maven repo: missing dependencies
Product: [Retired] JBoss BRMS Platform 6 Reporter: Petr Široký <psiroky>
Component: Maven RepositoryAssignee: Petr Kočandrle <pkocandr>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Široký <psiroky>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.0CC: agiertli, kverlaen, lpetrovi, pkocandr, rrajasek
Target Milestone: ER3   
Target Release: 6.0.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 19:54:23 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
pom.xml none

Description Petr Široký 2014-02-04 12:57:21 UTC
Description of problem:
Some dependencies are missing in the Maven repo. All of them are Red Hat made (with the suffix -redhat-xx) so they can't be downloaded from public Maven repos.

See https://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/brms-maven-repo-wolf-validator/lastCompletedBuild/testReport/(root)/DependencyNotFoundReport/
for the up-to-date list of missing artifacts.


Version-Release number of selected component (if applicable):
6.0.0-CR2

Comment 2 Rajesh Rajasekaran 2014-03-20 16:41:07 UTC
Most of the reported missing dependencies are wars which we removed intentionally. Can you investigate on the jenkins report and list which dependencies are actually needed?

Comment 3 Petr Široký 2014-03-21 10:03:25 UTC
Please ignore the WARs - I need to implement a filter that will ignore those failures. However the other (non-WAR) dependencies are still missing. Please note that I am not saying that they are needed at runtime - they are listed in some POM and not available in the repos (brms-6.0.1, eap-6.1.1, jboss-public, central) that's the reason they are reported as missing. It would indeed be useful to investigate further - will do that once I have a minute or two.

Comment 4 Anton Giertli 2014-04-10 10:09:06 UTC
Created attachment 884872 [details]
pom.xml

Comment 5 Anton Giertli 2014-04-10 10:11:16 UTC
Hi,

I have run into another missing dependencies.

I have attached whole pom.xml which I have used, the error I have hit was simply complaining about following missing dependencies:

org.codehaus.jackson:jackson-mapper-asl:jar:1.9.9-redhat-1 org.codehaus.jackson:jackson-jaxrs:jar:1.9.9-redhat-1 org.codehaus.jackson:jackson-xc:jar:1.9.9-redhat-1

These are present for example in early access repository
http://maven.repository.redhat.com/earlyaccess/all/org/codehaus/jackson/

Please note that the pom was used for referencing artifacts needed for remote API, which is crucial component for most of the customers.

Cheers,
Anton

Comment 6 Petr Kočandrle 2014-04-10 10:46:01 UTC
Anton, you don't import BOM in your pom's dependency management so this is the cause. As you can see in  org.jboss.component.management:jboss-component-version-master:6.1.1.Final-redhat-61 the jackson version is set to 1.9.9-redhat-2, which is included in the EAP 6.1.1 repository.

For proper function it is required to import IP BOM and EAP BOM in your project and add following repositories:
 * techpreview/all (or bpms/brms-6.0.1 + eap-6.1.1)
 * jboss-public

If you miss any more dependencies with this configuration let me know.

Comment 7 Lukáš Petrovický 2014-04-10 11:24:02 UTC
(In reply to Petr Kočandrle from comment #6)
> For proper function it is required to import IP BOM and EAP BOM in your
> project and add following repositories:
>  * techpreview/all (or bpms/brms-6.0.1 + eap-6.1.1)
>  * jboss-public

Petr, for future reference, can you please provide the exact GAVs for IP BOM and EAP BOM? I want to make sure I'm referencing the correct things in my POMs.

Comment 8 Petr Kočandrle 2014-04-10 14:07:17 UTC
Of course, sorry for not including it in the previous comment. For the BPMS/BRMS version 6.0.1 GA the IP BOM is org.jboss.ip.component.management:ip-dependency-management-all:1.2-redhat-8 and the EAP BOM is org.jboss.component.management:jboss-dependency-management-all:6.1.1.Final-redhat-61. For usage in the your pom's dependency management use scope import and type pom. Remember to import them in this order, because there are some overriden versions in IP BOM so it has to take preference over the EAP one.

The correct usage can be found in all top-level project poms, for example org.drools:droolsjbpm-integration:6.0.2-redhat-6, org.jbpm:jbpm:6.0.2-redhat-6 etc.

Comment 10 Anton Giertli 2014-04-10 15:27:49 UTC
Hi Petr,

thanks for this. Petr Siroky suggested to me today, to use jbpm-bom, like this:

 <dependencyManagement>
      <dependencies>
        <dependency>
          <groupId>org.jbpm</groupId>
          <artifactId>jbpm-bom</artifactId>
          <type>pom</type>
          <version>${jbpm.version}</version>
          <scope>import</scope>
        </dependency>
      </dependencies>
  </dependencyManagement>

This solved the issue straight away. But maybe the reason why it works is this https://bugzilla.redhat.com/show_bug.cgi?id=1069728 ? Not sure.

My question is, which way is actually prefered? I like the above one better to be honest.

By the way - there is not a single occurrence of BOM usage across all our documentation.

I would like to document this at least in form or Knowledge Base article as soon as possible as maven projects are bread and butter for every customer using BPM 6.

Cheers,
Anton

Comment 11 Petr Kočandrle 2014-04-10 16:05:40 UTC
I think it is not the supported way how to use our repository even though it works.

I just realized that I forgot one think about usage of the repository. As described in BZ1068771 in addition to the BOMs and repositories you should also use IP parent as a parent in your project's pom, it means org.jboss.ip.component.management:ip-parent:1.2-redhat-8 for 6.0.1 GA.

Comment 12 Petr Široký 2014-04-11 12:50:01 UTC
(In reply to Petr Kočandrle from comment #11)
> I think it is not the supported way how to use our repository even though it
> works.

I am not really sure what's supported or not as I could not find that specified anywhere (only in this BZ). However the `jbpm-bom` has parent `kie-parent-metadata` which already contains both above BOMs (`ip-dependency-management-all` and `jboss-dependency-management-all` in dependency management so in the end you get the same result as declaring the boms directly in user's pom. 
(I think declaring those boms inside the `kie-parent-metadata` is bad, but let's leave that other discussion).


> I just realized that I forgot one think about usage of the repository. As
> described in BZ1068771 in addition to the BOMs and repositories you should
> also use IP parent as a parent in your project's pom, it means
> org.jboss.ip.component.management:ip-parent:1.2-redhat-8 for 6.0.1 GA.

This IMHO seems like a very bad practice, forcing users to use our parent. Shouldn't the BOMs contain all needed info?

Comment 13 Petr Kočandrle 2014-04-15 15:05:28 UTC
(In reply to Petr Siroky from comment #12)
> (In reply to Petr Kočandrle from comment #11)
> > I think it is not the supported way how to use our repository even though it
> > works.
> 
> I am not really sure what's supported or not as I could not find that
> specified anywhere (only in this BZ). However the `jbpm-bom` has parent
> `kie-parent-metadata` which already contains both above BOMs
> (`ip-dependency-management-all` and `jboss-dependency-management-all` in
> dependency management so in the end you get the same result as declaring the
> boms directly in user's pom. 
> (I think declaring those boms inside the `kie-parent-metadata` is bad, but
> let's leave that other discussion).
> .
> 
> > I just realized that I forgot one think about usage of the repository. As
> > described in BZ1068771 in addition to the BOMs and repositories you should
> > also use IP parent as a parent in your project's pom, it means
> > org.jboss.ip.component.management:ip-parent:1.2-redhat-8 for 6.0.1 GA.
> 
> This IMHO seems like a very bad practice, forcing users to use our parent.
> Shouldn't the BOMs contain all needed info?

Plugin versions can't be defined in a BOM so customers need to use the parent to inherit version.* properties which they can use in pluginManagement or plugins section when configuring them.

Comment 14 Petr Široký 2014-04-16 08:24:02 UTC
Thanks for the info, makes sense. However I still think it should not be the only way that is supported. It is certainly convenient, but should not be enforced. The plugin versions can be also manually specified (and that should be documented).

Comment 15 Petr Široký 2014-05-28 14:52:10 UTC
Closing this issue. In case more missing artifacts are found, new BZ per artifact will be created.