How can I show the latest artefact version on bitbucket ReadME? - maven

I have a private repository hosted on bitbucket. Every time I release the latest version of the artefact to Nexus, I have to update the Read me which seems very repetitive.
Is there any way/plugin which can publish the latest version of the artefact directly to my repository's overview page (ReadME.md)?
I am using Maven 3+ for building the artefact using Jenkins which publishes all artefacts to Sonatype Nexus.

You can likely use something akin to this to add the file, likely the attach additional resources example: http://www.mojohaus.org/build-helper-maven-plugin/usage.html

Related

Upload newer version of strangers project to central maven repo

JBox2d is at version 2.3.1-SNAPSHOT ..
https://github.com/jbox2d/jbox2d/blob/master/jbox2d-library/pom.xml
However the latest version of the library at Maven repository is 2.2.1.1 ..
http://mvnrepository.com/artifact/org.jbox2d/jbox2d-library
Is there a way that I can upload this newer version of JBox2d to the central repo for everyone's use?
In short, no. Without the current maintainer's permission you can't upload a new artifact with the same groupId/artifactId. To quote from the Guide to uploading artifacts to the Central Repository FAQ:
I have a patched version of the foo project developed at foo.com, what groupId should I use?
When you patch / modify a third party project, that patched version becomes your project and therefore should be distributed under a groupId you control as any project you would have developed, never under com.foo. See above considerations about groupId.
Either pick a new groupId, for what is effectively your fork of the project, or collaborate with the current maintainers to get the newer version into Central with their permission.

How to download artifacts from github using maven?

An old legacy project in my team is being salvaged for any usable part, one of its dependency is play-json_2.10 with a version number 2.2. However since its too old, its missing from all the major repository, including typesafe and sonatype central. The only place i can find it is on github:
https://github.com/mandubian/play-json-alone
I could download it and manually save it to a local maven repo but my team mate won't be able to see it after checking out my commit. Is there a way to make maven downloading from github and put source code somewhere? Thanks a lot.

How to deploy an already deployed build to another nexus repository?

We have a nexus repository environment that serves for multiple projects.
Each project has a repository group which includes
3rdParty
snapshot
test (release typed repo)
Projects prepare builds for testing which are deployed on test repository.
What we would like to do is to re-deploy a specific version, which is already deployed on test repository, to a Releases repository on another nexus instance. By this way only tested builds can be reached by customers.
Is there a way to do that without performing another build? Some builds may take up more than 3 hours and also it is risky to perform another build.
I've searched and come up with wagon plugin but I am not sure about it.
This operation should also perform skip/merge capability (may be fail never?). Because for a bug-fix release, most of the artifacts may not be changed. Thus; skipping those artifacts will save time in delivery.
Below scenario would be perfect:
Build the project and deploy to the test repository
Perform tests using test repository
Tests passed, re-deploy system version 1.0.1 (including child components) to releases repository.
Customer can only see tested versions from releases repository (1.0.1, 1.0.7 etc)
Notes:
using snapshot for test builds is not an option :(
Thanx in adv.
Sincerly;
Metan

Artifactory generates different filename

I have a little problem that´s occurs in my computer, when I make deploy to artifactory, the name of the library changes as follows:
servico-disponibilizacao-2.0.0.0-20120117.194415-1.ear
In my project on Eclipse, I can see normally how this is:
servico-disponibilizacao-2.0.0.0-SNAPSHOT.ear
I really don´t know how to fix this, anyone have some ideia?
Thank´s so much for any help!
When publishing to a snapshot repository Maven will substitute the "SNAPSHOT" part of the revision with a timestamp, to create a unique version for that build.
See the Maven documentation on the distributionManagement section of your POM.
Additionally checkout this answer:
Maven Snapshot Repository vs Release Repository
Update
The Nexus book has a section describing the differences in artifact handling between snapshot and release repositories. I should think this information also applies to Artifactory, considering Nexus is the reference Maven repository manager.

Maven 3 and timestamps

I have various questions regarding Maven 3 and Nexus repository. At our nexus repository I would like to resolve only timestamp dependencies. That is to say I would like to prevent downloading timestapped dependencies to my local repository. And also at my nexus configuration having only latest snapshot jar for a version is totally fine.
My question is regarding timestamped dependencies at nexus and local repository.
Is having only latest Snapshot at repository a good practice? Why or why not?
I have done at my plugin management section of the parent pom of the deploy plugin <uniqueVersion>false</uniqueVersion> but at hudson I still continue to see timestamps at jar like this bundle-service-client-1.0-20110209.145744-25
I have came across a comment at another question,
The timestamped artifacts should never be see inside your local
(~/.m2/repository) repository. If they are, something is wrong.
Why?
Quoting from the relevant section in Maven 3.x Compatibility Notes
The setting false for a distribution
repository has no effect in version 3.x, snapshot artifacts will
always be deployed using a timestamped version.
Also, look at the comments in this nexus jira bug on a nice explanation to your other questions.

Resources