Testing against multiple versions with Maven - 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

Related

install specific maven version in macos using brew

I am trying to install maven 3.6.3 by brew command but not working as latest is maven 3.8.2
brew install maven
Any idea??
Most Homebrew formulae are named in such a way that the version is part of the formula's name. For example, maven#3.5.
Check out the specs for the maven formula: https://formulae.brew.sh/api/formula/maven.json. You'll find that maven has the alias maven#3.8. Usually, formulae without version numbers have an alias with the version number. However, maven#3.8 is not its own package.
However, there are some versioned formulae. For example, maven#3.5, found here.
Long-story short, if you look at versioned_formulae in the maven formula, you'll find that there is no formulae for Maven 3.6. Not sure why because I am positive that it used to be.
You could try writing your own formula or downloading the specific version from the website: https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/.

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

Can't force Apache Karaf to load a new version of the bundle (version w/o "-SNAPSHOT")

I've tried to update bundle in Karaf without changing its version. Version doesn't contain "-SNAPSHOT".
Is there a way to do it?
I've installed bundle to Apache Karaf through the mvn link
The code inside this bundle was changed without changing its (bundle's) version (according to some inner reasons).
Then I removed this bundle from Karaf, and from Nexus.
Next step was deploying new bundle to Nexus.
When I finally tried to install the "new" bundle, I saw there were no changes in it.
It looks like there is some cache inside Karaf where he stores bundles, that was already installed.
Adding flags like -c or -cc doesn't help.

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

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.

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