versions:set plugin set the userdefined pom version but installing old version - maven

Question : versions:set plugin set the userdefined pom version but installing old version.
EX: I used command as versions:set -DnewVersion=43.0.2 clean install
old version is 43.0.1, this set plugin suceessfully update pom version to 43.0.2 but while installing it refers old version as 43.0.1
Could you please help me on this..How can I install jar with updated new version

Re "with single line command as it is updating the new version but at the same time with install command it should install updated version":
See Versions Maven Plugin, Basic Usage:
Maven 2.0, 2.1, 2.2 and 3.0 do not currently support re-reading
modifications of the pom.xml within one invocation of Maven.

Related

How to build terracotta release version without "SNAPSHOT" title?

I checkout release/4.3.9 branch of dso repo from https://github.com/Terracotta-OSS. I try build terracotta 4.3.9 version. I run 'mvn clean install -P enterprise,kit' from terracotta-kit directory, but I get all libs with 'SNAPSHOT' title. Like this:
terracotta-kit-4.3.9-SNAPSHOT.tar.gz
terracotta-toolkit-runtime-4.3.9-SNAPSHOT.jar
ehcache-2.10.9-SNAPSHOT.jar
Also 'SNAPSHOT' exist in MANIFEST.MF files:
Bundle-Version: 2.10.9.SNAPSHOT
Release 4.3.9 is finished now. Why it is building with 'SNAPSHOT' title and how I can remove this?

How do I turn Keycloak old version 4.1.0 into 'Standalone server distribution'?

I tried something (readme.md, blog etc).But I don't turn 'standalone server distribution'.
I can give an example. What I want to say:
The following is a 'standalone server distribution' files. This is ready for running.
Picture-1
I need to run old version keycloak (version 4.1.0). This package seem like this :
Picture-2
According to Picture-2, this packages don't ready for running.
How can I ready for running ? Like to Picture-1.
I need your suggestions and suggestions. Can you help me?
Greetings,
That's the source code.
You have to build it by executing the following command from parent directory (you need Java JDK and Maven installed and configured):
mvn -Pdistribution -pl distribution/server-dist -am -Dmaven.test.skip clean install
Resulting release distribution will be in ./distribution/server-dist/target/keycloak-4.1.0.Final.zip archive.
Compiling the sources is described here: https://github.com/keycloak/keycloak/blob/master/docs/building.md
You can download the latest release version 4.X from archive: https://www.keycloak.org/archive/downloads-4.8.3.html

Testing against multiple versions with Maven

I'm maintaining an open source project, that defines following dependency (using a version range)
<dependency>
<groupId>org.eclipse.xtend</groupId>
<artifactId>org.eclipse.xtend.lib</artifactId>
<version>[2.6.0, 2.8.0)</version>
</dependency>
Issuing mvn clean install works perfectly, using the latest version of the org.eclipse.xtend.lib allowed by the range. But I would like to also make sure, that my product works with other versions from the range, say with 2.6.0.
My question is: How can I force Maven to use some specified version of a dependency without changing my pom.xml?
I though, it could be something like this:
for version in 2.6.0 2.6.1 2.7.0 2.7.1 ; do
# NOT WORKING!!!
mvn clean install -Denforce_version_org.eclipse.xtend_org.eclipse.xtend.lib=$version
done

Jenkins, Maven and semantic versioning: How to increment either the major or minor version

At our work we release and deploy our components via a Jenkins job. The problem with this is that it only increments the "patch" version number (major.minor.patch, e.g. 4.2.1 goes to 4.2.2). What I would like is to make the job tell maven that this is a "minor" release (4.2.1 -> 4.3.0), a "major" release (4.2.1 -> 5.0.0) or patch release (default behaviour).
The interface to Jenkins to pass parameters to maven is straightforward but are there any commands to make maven update the minor or major version without having to explicitly state what version (and development version) you need. Since it can do the patch version updating so easily I'm hoping there is command to do the same for the minor or major version.
Using mvn and the release plugin, you could easily update the version. You can do:
mvn release:update-versions
For more options, check the documentation.
It may help someone lately. We use Maven Build Helper plugin as below:
Minor release:
mvn build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.nextMinorVersion}.0 versions:commit
Major release:
mvn build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.nextMajorVersion}.0.0 versions:commit
Patch release:
mvn build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} versions:commit

Error building hadoop 1.0.1 - missing pom.xml

I followed the instructions given here to download and build hadoop 1.0.1 from this repository. I have installed JDK, Maven, cmake, autoconf etc. When I run th efollowing command from the hadoop top level directory
mvn -e package -Pdist -Pdoc -Psrc -Dtar -DskipTests
mvn reports an error saying that no pom.xml is found. There is no pom.xml file in the folder or any subfolders.
As far as I investigate the Hadoop Common tags, only version 0.23.x and 2.0.x is a Maven project. The rest is an Ant and/or Ivy project. Please note If there is no pom.xml it is not a Maven project.
If you would like to build the version 1.0.1, please use Apache Ant or Apache Ivy instead.

Resources