Leiningen is missing its dependencies. (On Windows) - clojure

I'm trying to install Leiningen on Windows 7. Here is my steps:
Step 1. Download:
cd C:\application_bin\
git clone git#github.com:technomancy/leiningen.git
Step 2. Add C:\application_bin\leiningen\bin to system path.
Step 3. Run:
PS C:\Users\Nick> lein repl
Leiningen is missing its dependencies.
Please run "lein bootstrap" in the leiningen-core/ directory
with a stable release of Leiningen. See CONTRIBUTING.md for details.
I don't know what is missing, so I follow the instruction from this error message:
cd C:\application_bin\leiningen\leiningen-core
lein bootstrap
Leiningen is missing its dependencies.
Please run "lein bootstrap" in the leiningen-core/ directory
with a stable release of Leiningen. See CONTRIBUTING.md for details.
The error comes back again. What's wrong with my installation steps? What dependencies are missing?

I've found the solution here:
http://onoffswitch.net/installing-leinigen-windows/
The problem is caused by a maual wget installation on Windows. The lein.bat checks wheter wget, curl exist, and whether in powershell (in which case it creates a .net webclient and downloads the target file).
Solution:
Remove wget. or
Change the order of the powershell, wget section in lein.bat. (details in the aforementioned link.)

Related

Leiningen cannot find SDK

I'm trying to install Leiningen from here https://djpowell.github.io/leiningen-win-installer/. But it cannot find SDK. If I check "Custom path" then it gives an out of range error on the next screen. Both Java and SDK are installed.
that installer automates these steps (from the project page)
The installer makes curl.exe available so that leiningen can download and upgrade files.
The installer downloads and installs the latest lein.bat from github.
lein.bat is added to your PATH variable.
LEIN_JAVA_CMD is set to point to your selected JDK, and the :java-cmd property is set in your user profile in profiles.clj.
lein self-install is run to install the Leiningen JAR file.
The uninstaller will remove the files that were installed, together with the Leiningen self-installs and search indexes; the environment variables that were set, and the additions to the PATH.
A likely area for this to do wrong is the setting of LEIN_JAVA_CMD and the :java-cmd key in the leiningen profile.clj file.
I'd first check:
the java path is correct in the value of the LEIN_JAVA_CMD environment vatiable
check the profiles.clj file in your home dirctory for conflicting JRE paths
uninstall that installer and do it by following the instructions at https://leiningen.org/
also note that Clojure only required the java runtime JRE and does not require or use the JDK. differing versions and paths between these has caused problems as well.

Lein tasks and sudo

I'd like to get this running (https://github.com/maitria/avi), which recommends using
sudo lein install
But lein doesn't act like an ordinary command -- I get
sudo: lein: command not found.
There only seem to be three subcommands that run into permissions problems and I considered doing them manually, but they're fairly gnarly string-interpolated arguments to the C compiler and my chances of not making a mistake seem pretty small.
So leiningen is not your typical command. Its a tool built in Clojure and is used to manage clojure applications much like rake works for Ruby. These 3 steps should help you
Download the lien script from the leiningen home page and place it in a location that is part of your PATH.
2.Run lein in the command-line and it will install it dependencies, though you will need to make sure you preinstalled JDK
3.Run lein install in the location of your code

How can I install Leiningen self-install from behind a firewall?

Is there a full download I can use which downloads leiningen and all related stuff in one go? I am not able to change the proxy settings on my local network, and this is the error I get:
"DownloadFile" with "2" argument(s): "The remote server returned an error: (407) Proxy Authentication Required."
Update
You need to download the Leiningen standalone jar and then point LEIN_JAR to it:
set LEIN_JAR=full path to leiningen standalone jar
For me - setting the proxies didn't work (and downloading the jar was unsatisfactory)
I got:
the wget binary, and
the wget dependencies
and put them on my PATH - ie h:\util contains:
wget.exe
libssl32.dll
libintl3.dll
libiconv2.dll
libeay32.dll
(where H:\util was already on my path. )
and then got a new terminal cmd.exe - and then lein self-install worked.
Assumptions:
Downloading the jar was unsatisfactory because the point of lein is to be a dependency manager (like maven). You need to keep downloading stuff. If you manually download the first jar - then when you add some more jar dependencies to your project you'll have to manually download those as well. Might as well chuck out lein and go back to doing things on the Java classpath.
In my view - in a windows environment proxy settings should be automatically detected. Lein can't do this (yet) - but the wget version I downloaded could. So you solve the problem of needing to explicitly specify the proxy. (In addition - manually setting the proxy just didn't work for me)
This should help:
https://github.com/technomancy/leiningen/wiki/HTTP-Proxies
You should work on your googling skills ;)
I want to post this as a comment to #hawkeye, but I dont have enough reputation. This work for me only when I set environment variable.
set HTTP_CLIENT=wget --no-check-certificate -O

How does one start programming with Clojure in Windows?

I know it is possible to use CounterClockwise inside Eclipse, but I have been trying to get Leiningen to work so that I could use ClojureScript.
I downloaded leiningen using git clone. It then says run the script. I have tried lein self-install from inside PowerShell and inside the git bash environment.
In each I get an error about failing to download leiningen (which I thought I had with the git clone? hmm). It is interesting because one reads instructions that include things that don't make sense to Windows.
For example, inside Powershell, Windows doesn't understand export HTTP_CLIENT. It was only inside the git bash that I got a message that it is possible my HTTP client's certificate store does not have the correct certificate authority.
It then suggests this command, which runs ok, export HTTP_CLIENT="curl --insecure -f -L -o"
but it doesn't fix the problem.
The most recommended method AFAIK is to download the script lein.bat and putting it on the PATH environment variable. I've tested this method on several systems (XP, Windows 7). There is no need to build leiningen from a git checkout yourself. If you have a Windows with Powershell installed lein self-install should download the core .jar file inside a directory .lein in your user directory. Else, make sure you install either wget.exe or curl.exe and put it on the PATH.
There is an installer for Leiningen on Windows. You just need to install Java SE 7 JDK and Leiningen for Windows. This page has detailed instructions with screen shots: http://leiningen-win-installer.djpowell.net/
Leiningen for Windows creates a PATH variable and Clojure REPL shortcut among other things. From the REPL you can create, build, and automate your Clojure project.

maven downloading file on every run 'install' target called

I am using appfuse-spring 2.2.snapshot artifact in my project. I am using maven is 3 .
When I run maven target 'install' every time download the same jar and dependency file.
How can I avoid to download the same files again and again.
for example
Downloading: http://oss.sonatype.org/content/repositories/appfuse-snapshots/org/appfuse/appfuse-web/2.2.2-SNAPSHOT/maven-metadata.xml
I don't want to download the jar file again.
Thanks in advance.
Why it's will download again and again? If it's always downloading maybe something is wrong because once the library is in your local repository it shouldn't need to download anything unless a dependency changes.
If you want to disable the download, use -o (offline) option in your mvn command:
mvn install -o
More: Maven Command Line Options
The problem is that you download the snapshot. Maven check a snapshot dependency each build (and if require downloads it).
Please avoid depend of snapshots.
Please find your deps in the releases repository:
https://oss.sonatype.org/content/repositories/appfuse-releases/
Old question but probably the solution would have been to check the "updatePolicy" for the repo, its possibly set to "always".