TIBCOSoftware / bw6-plugin-maven

Plug-in Code for Apache Maven and TIBCO ActiveMatrix BusinessWorks™
Other
65 stars 78 forks source link

Referencing version of a dependency from parent pom in child pom #371

Open anouarattn opened 4 years ago

anouarattn commented 4 years ago

Maven Plugin version: 2.3.1 Maven version: 3.6.1 Product : TIBCO Businessworks Product version: 6.5.1 hotfixe 2

I have a parent pom that define a dependency in dependencyManagement bloc like this

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.tibco.plugins</groupId>
            <artifactId>com.tibco.bw.palette.shared</artifactId>
            <version>6.1.100</version>
        </dependency>
    </dependencies>
</dependencyManagement>

In a child pom I'm using the dependency like this

<dependencies>
<dependency>
  <groupId>com.tibco.plugins</groupId>
  <artifactId>com.tibco.bw.palette.shared</artifactId>
  <scope>provided</scope>
</dependency>
</dependencies>

the problem is when I open the project is BW6 IDE, I have this error, it can't understand that the version is in parent pom image

Thank you for help

scottygar commented 4 years ago

Also having this issue - Did you manage to fix it?

The only way around that I can see is to add the version in the child POM, but then the ear file that's created includes multiple jars of the same dependency and is huge.

anouarattn commented 4 years ago

the

Also having this issue - Did you manage to fix it?

The only way around that I can see is to add the version in the child POM, but then the ear file that's created includes multiple jars of the same dependency and is huge.

I finally did the following thing add a property in the parent pom

`

6.1.100 ` and referencing it in child pom like this ` com.tibco.plugins com.tibco.bw.palette.shared ${com.tibco.bw.palette.shared.version} provided `
scottygar commented 4 years ago

I finally did the following thing add a property in the parent pom

Thanks for the reply - I've also implemented the above, but the IDE doesn't try to find the dependencies when it loads (Unless I hard-code the version numbers in the child POM).

Is the behaviour the same with your project?

anouarattn commented 4 years ago

no, referencing parent property work with no problem