Maven archetype fetching old version - maven

I am generating a maven project using an archetype that I've uploaded to the central repository.
mvn archetype:generate \
-DarchetypeGroupId=org.opencoweb \
-DarchetypeArtifactId=coweb-archetype
The latest version is 0.8.3.1, but the version I get instead is 0.8.3. I have cleared out my cache ~/.m2, and running the above command stil downloads 0.8.3 instead of the latest version. Does anyone know why? Did I forget to specify something when I uploaded/created the 0.8.3.1 module? I uploaded the module earlier this month (Oct 3), and according to http://search.maven.org/remotecontent?filepath=org/opencoweb/coweb-archetype/maven-metadata.xml, the "latest version" is 0.8.3.1.
Edit:
I can download the latest 0.8.3.1 version, but only if I specify -DarchetypeVersion=0.8.3.1. However, this is clearly undesirable.

check this answer. maybe the Latest-part is helpful for your needs.
https://stackoverflow.com/a/13058666/1602465

Related

mvn clean install pulls in old snapshot version that don't exist

I am trying to compile my code and with the latest version. I see that the old SNAPSHOT version is being picked up as well when I check the .war file. I ran the dependency:tree and checked if it had anything to do with it but nothing came up which said so.
Is there a way I can change the pom.xml to ensure this doesn't happen.?
Run the build with -U and you get the newest SNAPSHOT versions.

sdk is not pulling down gradle

I'm looking to develop an application using gradle, groovy, maven other other products supported by sdkman. I'm using cygwin on a windows 10 machine. All seems good and updates most software packages that are needed. When I get to the point of installing gradle, sdk simply can't download ANY version of gradle. Is this a bug or am I missing something. Here's what I'm getting from my cygwin console.
Admin#Dale-PC ~
$ sdk install gradle
Downloading: gradle 2.14.1
In progress...
######################################################################## 100.0%
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of /home/Admin/.sdkman/archives/gradle-2.14.1.zip or
/home/Admin/.sdkman/archives/gradle-2.14.1.zip.zip, and cannot find /home/Admin/.sdkman/archives/gradle-2.14.1.zip.ZIP, period.
Stop! The archive was corrupt and has been removed! Please try installing again.
Admin#Dale-PC ~
It seems as though sdk thinks it knows where it is however when it goes to pull it down, it doesn't pull down. Then sdk goes to unpack it and it can't find it. Any advice would be appreciated. Btw, I'm not going through a proxy and everything else seems to install just fine. It is just gradle that has the issue. Also, why is it trying to pull down an old version of gradle (2.14.1)?
I've downloaded the v2.14.1-all version, renamed the file to be gradle-2.14.1.zip.zip and placed it in the /home/Admin/.sdkman/archives/ directory and then did the install for gradle again. This time it found it and installed it as though it had downloaded the correct version. It's a solution for now.
v2.14.1 is the newest version of gradle. See here and here (3 is currently in beta-ish)
The filename .zip.zip seems erroneous. Possibly a defect in sdkman. Unsure if it was you who reported this on github, but: https://github.com/sdkman/sdkman-cli/issues/445

Not seeing latest dependency version when I run versions:display-dependency-updates

I am trying to update dependencies in my java mvn project to latest version. When I run below command I see latest versions displayed, but I see different versions in central repository.
mvn versions:display-dependency-updates -DskipTests=true --update-snapshots install
For example, when I ran above command I got this for commons-collections
commons-collections:commons-collections ............ 3.2.1 -> 20040616
But when I browse it in the central repository - commons-collections:MVN Repo,
I see many updates after 20040616
Can someone clarify which is the latest version and MVN command to get the latest?
The display-dependency-updates command assumes that versions are numbered according to a very specific <Major>.<Minor>.<Incremental>-<Qualifier> structure, per the versions-maven-plugin Version Number Rules. It determines "newest" by sorting according to those criteria, and not via some sort of timestamp. When using dependencies that follow different rules, it's not likely to be able to tell you which version is actually newer. Sadly, this makes display-dependency-updates not nearly as useful as one might hope, but I still find it useful as a starting point to check and see what dependencies may need to be updated.
Unfortunately Maven does not know when the dependency was published, it just compares text.
In your case, the latest version of commons-collections:commons-collections is 3.2.1, but if you compare the text, 20040616 is bigger.
So basically 20040616 > 3.2.1 becuase it thinks 20040616 is a major version and it is bigger than 3.
Read more here: https://docs.oracle.com/middleware/1212/core/MAVEN/maven_version.htm#MAVEN402
I generally use http://mvnrepository.com to find the latest version of an artifact, while you have used http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22commons-collections%22%20AND%20a%3A%22commons-collections%22. However, I see similar problems. 20040616 is not the date of the artifact, it is the version of the artifact. Since 20040616 is greater than 1, 2, 3, or 4, version 20040616 will always be viewed as the latest version. It would appear that this artifact should be removed from the repository since it does not obey the numbering rules. I have seen a few other problems like this in the repository, but I'm not sure who to contact to get it corrected.
http://www.mojohaus.org/versions-maven-plugin/display-dependency-updates-mojo.html
description of display-dependency-updates

I want to upgrade my sonarqube server4.1 to latest version sonarqube 5.1?

I want to upgrade sonarqube 4.1 to latest version(5.1).So what steps i need to do and follow?
and what is the best strategy to upgrade server?
Thanks,
First try to install a previous version, for example 5.0.1. If this work then install the newest version.
Download SonarQube: http://www.sonarqube.org/downloads/
stop sonar
make a DB backup
rename 4.1 sonar folder
unzip downloaded SonarQube zip file (e.g. sonarqube-5.1.1.zip)
modify sonar.properties and wrapper.conf files located in <SONAR_HOME>/conf (don't replace the files, modify parameters)
copy plugins to <SONAR_HOME>/extensions/plugins (check plugins matrix compatibility)
copy drivers to <SONAR_HOME>/extensions/drivers
modify <SONAR_HOME> in service file, e.g /etc/init.d/sonar
start sonar
verify logs in <SONAR_HOME>/logs
open http://:/setup
click upgrade button and wait
Everything is on the SonarQube wiki: http://docs.sonarqube.org/display/SONAR/Upgrading

Can't get plugins to install on my Hudson CI server

I'm trying to stand up a Hudson CI server.
I'm following an article written here.
I've gotten the server to stand up successfully by itself, but when I go to install the plugins all the plugins fail to install.
This happens the second time I run
java -DHUDSON_HOME=data -jar hudson.war
when I have all my plugins in the /plugins folder.
The errors I'm getting are
No 'Plugin-Class' entry in the manifest of ...msbuild.hpi
No 'Plugin-Class' entry in the manifest of ...nunit.hpi
Dependency analysis-core doens't exist (related to task.hpi)
I grabbed the latest stable release of them, so I'm thinking it has something to do with how I set up my hudson instance. The only different thing that I have done from the article is that I set up the installation in C:\Hudson.
Does anyone know why these plugins are all failing?
The problem was that for some reason I downloaded version 1.1 of hudson. I'm not sure how that happened since I clicked on the latest link, but I went back and downloaded the real latest version and the plugins are installing fine now.
The tasks plugin still doesn't install, but I don't really have to have that one, I was just curious what it was.

Resources