[ 
https://issues.apache.org/jira/browse/MNG-7030?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17240277#comment-17240277
 ] 

Armand BERGES commented on MNG-7030:
------------------------------------

Hello, 

As I said, I'm trying to create super pom for my company. For this, I'm trying 
to remove as many code as possible. 

In this case, I would like to generate *scm* section from only one variable. To 
be clear : 
 * In my parent, I write my *scm* section from one variable : 

{code:xml}
<properties>
    ...
    
<util.scm.url>https://my.server.git/my-parent-group/my-super-repo.git</util.scm.url>
    ...
</properties>

    <scm>
        <connection>scm:git:${util.scm.url}</connection>
        <developerConnection>scm:git:${util.scm.url}</developerConnection>
        <url>scm:git:${util.scm.url}</url>
        <tag>HEAD</tag>
    </scm>
{code}
 * In my son's project, in my idea, with only on variable, you can declare all 
the *scm* section i.e you declare all scm section in your son project with :

{code:xml}
<properties>
    ...
    
<util.scm.url>https://my.server.git/my-son-group/my-son-repo.git</util.scm.url>
    ...
</properties>
{code}
Unfortunately, it seems there is a bug in *scm* section with a bad calculation 
of *scm* section in case of inheritance. From this ticket, this seems possible 
to use *scm.** variables to override *scm* section, but the 
*maven-release-plugin* don't use these variables and seems to search 
specifically the *scm* section. And we can't have both *scm* section and 
*scm.** variables declare at the same time. It throws an Execption about cyclic 
variables (_this seems fair_).

 

To sum up : 

 
 * With a super pom, I would like to remove as many code as possible from my 
sons projects. In particular, I would avoid them to declare *scm* section.
 ** The *scm* section seems, by design, can't respond to my need
 ** When I use the *scm.** properties, this is the *maven-release-plugin* which 
throws exception because he doesn't find *scm* section

 

IMHO, the *maven-release-plugin* should allow the use of *scm.** properties and 
the problem would be solved. 

Please let me know if you need more explanations

> Allow to use project.scm properties in a maven release
> ------------------------------------------------------
>
>                 Key: MNG-7030
>                 URL: https://issues.apache.org/jira/browse/MNG-7030
>             Project: Maven
>          Issue Type: Bug
>          Components: POM
>    Affects Versions: 3.6.2, 3.6.3
>            Reporter: Armand BERGES
>            Priority: Major
>             Fix For: waiting-for-feedback
>
>
> I try to create a custom parent pom for my company. 
> Everything works great except for the release step. Actually, I would allow 
> my team mate to only declare a property (say *util.scm.url*) to enable all 
> the scm release block in maven-release-plugin.
> For this, I have two problems : 
>  
>  * When I declare *scm* section only in parent pom I fall into a SCM issue 
> that blocks my sons projects during my release steps (since the scm is badly 
> interpolated my build can't push release modifications)
>  * When I try to use *project.scm.** properties in my parent pom instead of 
> *scm* section, the release plugin blocks me with "Unable to find scm 
> section". I think he tries to find out the *scm* section only and not the 
> properties created by it
>  Please tell me if I'm missing something or if you need other informations



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to