Re: where to specify pluginRepositories for a custom maven core extension
Hi Matthieu, Thanks for your comment. I did not know this project, I will have a look at it. I found a workaround with the new .mvn directory which contains a settings.xml which contains my private repos definition. Then I use .mvn/maven.config to specify to use this settings.xml file with the '-s' mvn argument. It is not so nice, but it works for us. Thanks, Nicolas On Wed, Jun 27, 2018 at 2:25 PM Matthieu BROUILLARD wrote: > Hi Nicolas, > > If you want perhaps you can also contribute to > https://github.com/jgitver/jgitver-maven-plugin which computes project > version automatically for maven (there is also a gradle project). > > Concerning your question, I never had such a problem. My core extensions > are downloaded from the repositories I push them to (in my case central). > > Regards, > > Matthieu Brouillard > > On Wed, Jun 27, 2018 at 10:59 AM Nicolas Brasey > wrote: > > > Hi, > > > > I developed a maven core extension which controls the project version and > > the distribution managment repository depending on the git branch before > > the build starts. > > > > I specify the coordinates of my extension by providing a file which is > > located in the project git repo, inside .mvn/extension.xml, as described > > here: > > > > https://maven.apache.org/docs/3.3.1/release-notes.html > > > > My problem is that Maven is not able to download this artifacts from a > > remote repository. I would like that it is getting fetched from my > private > > maven repo. > > > > So the question is, where can I specify my private repository which > > contains this extension ? Ideally, it should be inside my git repo (in > .mvn > > directory) > > > > Thanks > > Nicolas > > >
where to specify pluginRepositories for a custom maven core extension
Hi, I developed a maven core extension which controls the project version and the distribution managment repository depending on the git branch before the build starts. I specify the coordinates of my extension by providing a file which is located in the project git repo, inside .mvn/extension.xml, as described here: https://maven.apache.org/docs/3.3.1/release-notes.html My problem is that Maven is not able to download this artifacts from a remote repository. I would like that it is getting fetched from my private maven repo. So the question is, where can I specify my private repository which contains this extension ? Ideally, it should be inside my git repo (in .mvn directory) Thanks Nicolas
Define Logger level in a plugin
Hi all, I wrote a mvn plugin and I'm a third party library which is way too verbose for my taste in INFO. How can I, in my plugin, programmatically change the level of a logger ? But AFAIK maven uses by default sl4j simplelogger which does not offer this possibility, am I right ? Do I have alternative to deal with this in my plugin ? Thanks Nicolas
Re: A maven plugin to add dynamically a repository at build time
Hi Yolan, Thanks for your input. Yes, what you proposed is what I use at the moment as a workaround. But I wanted to hide the branch selection logic from the build runner. I suppose there is no real solution to hook code in maven before even the dependencies resolution? Is there another API besides the maven plugin API which allows me for example to extend the default MavenArtifact resolver? Nicolas On Tue, Apr 10, 2018 at 7:22 AM, Golan, Yaron <yg3...@intl.att.com> wrote: > Hi, > > Here is my proposal... > > Inside your main/parent pom.xml, set the following: > > > ... > > foo > boo > > > > > ${repo.name} > ${repo.url} > > > ... > > > > And your maven command should like: > mvn -Drepo.name=some.repo.name -Drepo.url=relevant.url > > > What do you say? > > YG > > > > > -Original Message- > From: Nicolas Brasey [mailto:nicolas.bra...@gmail.com] > Sent: Monday, April 09, 2018 20:41 > To: users@maven.apache.org > Subject: A maven plugin to add dynamically a repository at build time > > Hi, > > In my continuous integration solution, I need to have a maven repository > which is calculated based on the git branch name. For example, I have a > naming convention which is used to calculate the maven repo URL, something > similar to this: > > Branch name -> Git Repo URL: > --- - > develop -> https://urldefense.proofpoint. > com/v2/url?u=http-3A__archiva_repositories_snapshot=DwIBaQ=LFYZ-o9_ > HUMeMTSQicvjIg=GYb_8qONFTPgVpTfZRT53aEptjaOm6sDrruaOwiowLQ= > wYKDMhCmuL6gf7KPllHND78qrm6EwCIeSTQMt6cv268= > YFvvW16iOsJQtkao0hwVmS33Rh07ba1sfucC1yHSwFI= > feature/xxx -> https://urldefense.proofpoint. > com/v2/url?u=http-3A__archiva_repositories_feature-2Dxxx= > DwIBaQ=LFYZ-o9_HUMeMTSQicvjIg=GYb_8qONFTPgVpTfZRT53aEptjaOm6sDrr > uaOwiowLQ=wYKDMhCmuL6gf7KPllHND78qrm6EwCIeSTQMt6cv268= > tUqew2vcZMbgd3HbH8wWGoTp_v94pBrDATIHUCug8jw= > staging/xxx -> https://urldefense.proofpoint. > com/v2/url?u=http-3A__archiva_repositories_staging-2Dxxx= > DwIBaQ=LFYZ-o9_HUMeMTSQicvjIg=GYb_8qONFTPgVpTfZRT53aEptjaOm6sDrr > uaOwiowLQ=wYKDMhCmuL6gf7KPllHND78qrm6EwCIeSTQMt6cv268= > KXqHxpLtHwoU86yY9ySm1QrSBtaoN7lsraCeF6DW9dw= > > > I wrote a maven plugin that adds dynamically a repository in my project > but unfortunately, my plugin is not invoked before maven performs the > dependency resolution. > > I googled it and tried some workaround proposed (like putting my plugin in > the pre-clean phase), but it still executes after the dependency resolution. > > You guys ever tried this? > > Thanks, > Nicolas >
A maven plugin to add dynamically a repository at build time
Hi, In my continuous integration solution, I need to have a maven repository which is calculated based on the git branch name. For example, I have a naming convention which is used to calculate the maven repo URL, something similar to this: Branch name -> Git Repo URL: --- - develop -> http://archiva/repositories/snapshot feature/xxx -> http://archiva/repositories/feature-xxx staging/xxx -> http://archiva/repositories/staging-xxx I wrote a maven plugin that adds dynamically a repository in my project but unfortunately, my plugin is not invoked before maven performs the dependency resolution. I googled it and tried some workaround proposed (like putting my plugin in the pre-clean phase), but it still executes after the dependency resolution. You guys ever tried this? Thanks, Nicolas