Why bother with the custom property?  Do this instead and the release plugin is 
happy:

<groupId>com.mycompany</groupId>
<artifactId>my-bom</artifactId>
<version>1.0-SNAPSHOT</version>

<dependencyManagement>
   <dependencies>
      <groupId>com.mycompany</groupId>
      <artifactId>platform</artifactId>
      <version>${project.version}</version>
  </dependencies>
</dependencyManagement>
 


-----Original Message-----
From: Petar Tahchiev [mailto:[email protected]] 
Sent: Tuesday, May 03, 2016 9:10 AM
To: Maven Developers List
Subject: Maven Release Plugin And A BOM

Hi guys,

I have a question regarding the release plugin. In my project I have a BOM in 
which I declare a property and a dependencyManagement section:

<groupId>com.mycompany</groupId>
<artifactId>my-bom</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
    <platform.version>1.0-SNAPSHOT</platform.version>
</properties>

<dependencyManagement>
   <dependencies>
      <groupId>com.mycompany</groupId>
      <artifactId>platform</artifactId>
      <version>${platform.version}</version>
  </dependencies>
</dependencyManagement>


and I also have 3 different projects that declare this BOM as their parent.
All of these projects have the same version number (1.0-SNAPSHOT) and when I 
make a release I always release all of them. This is how it looks like:
1) I change platform.version property to 1.0, commit, push and release the bom.
2) I try to release first of my other projects and now the release plugin is 
asking me to resolve the version of the BOM. Ok, fair enough, I resolve it to 
1.0 but then it asks me again to resolve the version of com.mycompany:platform. 
This clearly is a bug right? I have changed it to
1.0 before so it is no longer a SNAPSHOT???
If you think this is a problem, I will submit it in the JIRA and try to fix it. 
I'm just not sure if it's a bug or maybe it's a known issue, or maybe that's 
how it is supposed to be.

--
Regards, Petar!
Karlovo, Bulgaria.
---
Public PGP Key at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to