install specific maven version in macos using brew - maven

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/.

Related

Brew Formula: How can I define external dependencies?

I’m writing a brew formula for my own tap, having XQuartz and external sources (not available on brew) as dependencies. How can I include them in my formula?
See the answer on the brew discourse: https://discourse.brew.sh/t/brew-formula-how-can-i-define-external-dependencies/2358/3.
You need to install those sources by using an existing tap or creating a new one.

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

GVM installed gradle is not recognized in Linux terminal

Recently installed gradle via gvm and $ gradle build throws the following error message.
If 'gradle' is not a typo you can use command-not-found to lookup the package that contains it, like this: cnf gradle
Obviously, class path issues, So I have tried echo $GRADLE_HOME outputs
/home/karthikeyan/.gvm/gradle/current
But the actual binary is at /home/karthikeyan/.gvm/gradle/2.3/bin (exporting this to path variable,works). What if I am switching between the versions? Is there any general solution ?
You should always use $GRADLE_HOME which points to $HOME/.gvm/gradle/current/- so if not $GRADLE_HOME use the latter path.
If there's a need to switch between versions use the following command:
gvm use gradle <version>
The ../current/ path is a symlink that points the version of gradle being in use. It's done in the following way to ease the usage - just add ../current path to $PATH and it's done, instead of switching the versions manually every time new version is installed.

Is it possible to use two different versions of same package in buildroot?

Currently used packages in my system are..
buildroot-2011.02
libpng-1.4.5
autoconf-2.65
python-2.7.1
I am trying to upgrade Libpng from version-1.4.5 to version-1.6.8.
But the newer version of Libpng requires Autoconf 2.68 or higher.
If I update Autoconf to 2.68, Python 2.7.1 fails which requires older version of Autoconf.
So I have to update Python to higher version which supports Autoconf 2.68.
But this is creating whole lot of problems for me because Python is used in many other modules which also fails to build.
Other solution I could think is keeping both versions of Autoconf i.e. 2.68 and 2.65
and I have to make sure Libpng uses Autoconf 2.68 and Python uses Autoconf 2.65.
Is it possible to do this? Is there any alternate solution to this problem?
Please try the newest Buildroot version and use BR2_EXTERNAL feature. This way you'll keep your own packages/configuration separately from BR tree. So you can update BR whenever you like and your stuff still will be working.
mkdir /home/user/my_bsp
cd /home/user/
git clone git://git.buildroot.net/buildroot
cd buildroot
make BR2_EXTERNAL=/home/user/my_bsp help
Now your BR tree will be looking for configuration and packages in /home/user/my_bsp

How can I ensure that I install compatible versions of JAGS and rjags in Ubuntu?

I would like to write a script that installs JAGS and rjags on a new ubuntu installation, and that will work independently of the currently available versions of these packages. I'd like to know how I can do this while avoiding conflicts between versions.
I have the following R script, initialize.R:
system('apt-get install jags')
install.packages('rjags')
So that I can run from bash:
sudo R --vanilla < initialize.R
However, the most recent version of JAGS in the Ubuntu repository is 2.2, and the version of rjags available from CRAN depends on JAGS > 3.0.
I am interested in installing compatable JAGS and rjags, perhaps either:
installing a specific version of JAGS (e.g. 2.2) and the compatable rjags version (which version?)
generically installing the version of JAGS currently in the ubuntu repository and the appropriate rjags version, or
generically installing the most recent version of rjags at cran and the appropriate version of JAGS
The ability to do case 1 is essential, but am also curious how I could implement cases 2 and/or 3.
questions:
How can I do this?
Is there a more sound approach?
update: following link in Dirk's answer, the following worked:
add-apt-repository ppa:marutter/rrutter
apt-get update
apt-get install r-cran-rjags
Michael Rutter provides an r-cran-rjags package via his repository; this works with the jags package you already have installed. See this message on r-sig-devel for details, and you may want to subscribe to and follow the r-sig-debian list to stay abreast of these things.

Resources