How to make the mavem get the jar always from the master branch

0

I have 2 projects managed by maven. The first is the Model. The Second Front End and the Controll The model is a dependency of the FrontEnd. I do this with the following dependency on the pom.xml of the FrontEnd project.

<dependency>
   <groupId>${project.groupId}</groupId> 
   <artifactId>alvoradaModel</artifactId> 
   <version>1.2.0</version> 
</dependency>

I have control of both projects by Git. and for that I use two Branchs: the master and the development

How do I get the dawnModel to always be obtained from the master branch even if it is currently active?

    
asked by anonymous 03.06.2016 / 14:36

1 answer

0

You can use a Maven plugin to To solve your problem, maven git commit id is in githup explaining how to use , basically just change the .pom.xml :

You can use it to get branch git with

${git.branch}

So, in your case, it would be:

<version>${git.branch}</version>

Source: put-current-git-branch-to-project-version

    
23.02.2017 / 01:25