How to use existing SBT installation instead of downloading a new one in intelij? - macos

I'm using os x and I've installed sbt with brew. After I've installed intellij and scala plugin for intellij it recognized .scala files of my project and suggested to import sbt project. When importing I saw that intellij is downloading sbt instead of using sbt installation that I have installed previously. How to force intellij to use sbt from brew? I don't want to clutter my ssd...

It is not a wise decision. sbt API changes slightly between versions. If intellij requires certain version for inner processing, it would be better to fulfil its expectations.

Set sbt.version in project/build.properties. IntelliJ respects the requested version. It won't download again if it has already been downloaded. You probably see this because the launcher you installed is a different version than what is installed in intellij. You can also set intellij to use the launcher you already have installed by changing the setting in preferences

Related

how to build maven with any version on demand?

I have a situation where my system has one maven installed (e.g version 3.7.1. I have some projects that needs that version so this version is my default and if I build a project using mvn the version 3.7.1 is used by default to build the project.
Now I have to work on a project where it needs maven version 3.8.1 and I am looking for a way to do it. I am planning to install the maven version 3.8.1 in same system and would like to call this maven while building the new project. Can anyone help me on how to add envionment variable for new maven and call it whenever necessary while building without removing the 3.7.1 version
Aside from having separate Maven installations on your system, you could also have a look at the Maven Wrapper.
The maven wrapper allows you to attach a small script to your code base, which downloads and runs a specific version of Maven. In this way there are no dependencies to any Maven installations on your system.
After placing the Maven Wrapper in your project, you would then simply run ./mvnw install instead of mvn install.
I am using SDKMAN to manage different versions of maven or java. SDKMAN is a tool for managing parallel versions of multiple Software Development Kits on most Unix based systems. It provides a convenient Command Line Interface (CLI) and API for installing, switching, removing and listing Candidates.
It is very convenient and this problem no longer exists for me.

Which version of apache ant is compatible with OS X 10.7.5?

I've had so much trouble in installing ant. I first downloaded it from the apache website, had some errors. Then I finally figured out a way to install through terminals 'brew install ant'; which it worked after downloading Xcode and configuring bash_profile.
So my question is, why does it show that the version is 1.8.2? instead of 1.9.7? Is this a compatibility issue?
This is my output
To my knowledge, All OS X versions prior to 10.9 have ANT already installed. From 10.9 and later , we need to install ANT.
Installation ANT is about extracting tar file, setting ANT_HOME variable, Setting path and setting JAVA_HOME as well.
In my view, you are already seeing an older version of ANT installed in your machine by default. However, ANT 1.8.x or 1.9.x both are pretty stable and should able to meet your build automation objectives.

Maven and Svn Plugin is not working in Eclipse Indigo

I am using Eclipse Helios and want to migrate to Indigo.
I have installed Indigo and m2e and subclipse plugin. I was able to import maven project as well as projects from svn.
But from the next day, Svn is missing from perspective and while trying to import maven projects, I am not able to find maven in the list.
I have uninstalled and installed again but same issue occured again.
Is it because both Helios and Indigo installed in my machine ?
Please help me solve this problem.
Is it because both Helios and Indigo installed in my machine ?
That shouldnt create any issue at all. I have multiple versions of eclipse installed in my system and they all seem to work fine.
As far as the m2e and subclipse plugin is concenred, I have used it personally on Indigo without any issue at all and there doesn't seem to be any incompatibility issue.
It maybe possible that eclipse plugins have gotten a bit messy and need a re-start. Goto the directory where you have installed eclipse and add this line on the top of the eclipse.ini file.
-clean
-startup
....the rest of the settings and params
Then start your eclipse, it will attempt to clean and re-load each plugin again.

SVN version in Maven tasks with SVNKit on MacOS

I am getting this error in a Maven build (mvn clean install) on a Mac with Mountain Lion
org.tmatesoft.svn.core.SVNException: svn: The path 'XYZ' appears to be part of Subversion 1.7 (SVNKit 1.4) or greater
working copy rooted at '/Users/XYZ/workspace/XYZ'.
Please upgrade your Subversion (SVNKit) client to use this working copy.
I had SVN installed as part of the Apple Command Line tools package and that gets installed at /usr/bin. I have installed the latest SVN as well but that got installed at /usr/local/bin.
When the maven build runs, it does not pick up the latest SVN, it picks the older one and fails.
Has anyone faced this kind of problem before?
I think there are 2 options -
1) Somehow force maven to use the new installed SVN.
2) Upgrade the SVN installed as part of Apple' Command Line tools to the latest SVN. I have reinstalled Command Line tools with the latest version but it still sticks to the older version.
I dont control the pom.xml so modifying it is not a viable option.
Any pointers in resolving this would be much appreciated.
Thanks!
This means your svn client is version 1.7 but the working copy(your project workspace) was checkout with the older version.
It's simple by execute the following command at your project root directory, where the pom.xml is there.
svn upgrade
please note, the maven use the svn client which is in your OS path.
After upgrade you should configure your IDE to use the version 1.7 as well. In my case I use the Eclipes Juno sr1 with Svnkit.
Anyhow if you would not like to change the working copy or IDE configuration. There is an alternative by install the svn clinet 1.4/1.5/1.6 and set it active via OS path instead.
I hope this may help.
Regards,
Charlee Ch.

Eclipse SVN plugin install fail on mac pro

Yesterday I had install the eclipse and the Android plugin. Everything works perfectly, but I would like to install the SVN plugin too. I had add the suite, and selected the three main components, but when I click on the next it stack in. The eclipse write "Calculateing requriements and dependencies" and than I just waiting.
So I had disabled all another update site and it works, but then I got the following message:
"could not upgrade:missing compnents: svn.rep.grap". It is very good, but I would like to install this component at NOW beside of the another svn tools.
Any ideas?
The Subclipse plugin can be installed from the Eclipse Marketplace Client or by adding the update site URL of http://subclipse.tigris.org/update_1.8.x
Note that Subclipse requires the JavaHL native library that is part of Subversion. The easiest way to get this is to install the latest Subversion client distribution provided by CollabNet:
http://www.open.collab.net/downloads/community/
You can also install Subversion via MacPorts. Both of these include the JavaHL library and properly link it in your System folder so that is visible to the Subclipse plugin running in Eclipse. I would assume you could also install via Homebrew but I have not tried that option.

Resources