views:

126

answers:

3

Hi all, I am having trouble installing Enclosure and getting it to work. I have followed this guide http://www.enclojure.org/gettingstarted and successfully installed Enclosure (I think). However, when I try to build the sample application (labrepl) I get a bunch of errors and a failed build. I haven't used Java in a long time and I've never used Netbeans, and the error doesn't seem very helpful with my limited knowledge of this domain. I'm using the latest Netbeans and the Enclosure URL from the guide. Since I am on Windows, I can't use git to clone the repo, so I'm not sure what to do from here.

Anyway, here are the error messages.

WARNING: You are running embedded Maven builds, some build may fail due to incompatibilities with latest Maven release.
         To set Maven instance to use for building, click here.
Scanning for projects...
[#process-resources]
[resources:resources]
Using default encoding to copy filtered resources.
[#compile]
[ERROR]Transitive dependency resolution for scope: compile has failed for your project.
[ERROR]Error message: Missing:
[ERROR]----------
[ERROR]1) org.clojure:clojure-contrib:jar:1.2.0-master-SNAPSHOT
[ERROR]  Try downloading the file manually from the project website.
[ERROR]  Then, install it using the command: 
[ERROR]      mvn install:install-file -DgroupId=org.clojure -DartifactId=clojure-contrib -Dversion=1.2.0-master-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
[ERROR]  Alternatively, if you host your own repository you can deploy the file there: 
[ERROR]      mvn deploy:deploy-file -DgroupId=org.clojure -DartifactId=clojure-contrib -Dversion=1.2.0-master-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR]  Path to dependency: 
[ERROR]          1) labrepl:labrepl:jar:0.0.1
[ERROR]          2) org.clojure:clojure-contrib:jar:1.2.0-master-SNAPSHOT
[ERROR]----------
[ERROR]1 required artifact is missing.
[ERROR]for artifact: 
[ERROR]  labrepl:labrepl:jar:0.0.1
[ERROR]from the specified remote repositories:
[ERROR]  central (http://repo1.maven.org/maven2),
[ERROR]  clojars (http://clojars.org/repo/),
[ERROR]  incanter (http://repo.incanter.org),
[ERROR]  clojure-snapshots (http://build.clojure.org/snapshots),
[ERROR]  clojure (http://build.clojure.org/releases),
[ERROR]  clojure-releases (http://build.clojure.org/releases)
[ERROR]Group-Id: labrepl
[ERROR]Artifact-Id: labrepl
[ERROR]Version: 0.0.1
[ERROR]From file: C:\Users\chloey\Documents\NetBeansProjects\RelevanceLabRepl\pom.xml
------------------------------------------------------------------------
For more information, run with the -e flag
------------------------------------------------------------------------
BUILD FAILED
------------------------------------------------------------------------
Total time: 1 second
Finished at: Wed Jun 09 21:53:04 CDT 2010
Final Memory: 72M/172M
------------------------------------------------------------------------

Thanks all.

A: 

the missing artifact is the artifact itself. What command are you using to build it? Try mvn clean install on the command line if everything else fails.

seanizer
A: 

I had the same problem so I did a clean install of Netbeans followed by and install of maven both to no avail.

When I went to download the missing artifact I noticed that clojure-contrib version 1.2.0 was not available for download. Changing the pom.xml to look for version 1.1.0 resulted in a successful build.

Open the pom.xml and change

<dependency>
  <groupId>org.clojure</groupId>
  <artifactId>clojure-contrib</artifactId>
  <version>1.2.0-master-SNAPSHOT</version>
</dependency>

to

<dependency>
  <groupId>org.clojure</groupId>
  <artifactId>clojure-contrib</artifactId>
  <version>1.1.0-master-SNAPSHOT</version>
</dependency>

By the looks of things some additional functionality within 1.2.0 is needed for labrepl not sure from where to download it.

A: 

There's a thread on this on the Enclojure Google Group.

You need to do this step from the Enclojure "Getting Started in NetBeans":

If you run into any problems, make sure you have the latest laprepl code from github by going into the directory where you created you labrepl project and type:

git pull origin master

(you will need to have git installed on your machine)

This fixed it on my Mac. Don't know how to use git on Windows, sorry...

The last couple of posts in the Google Group thread is from people who got it working by changing the pom.xml

<dependency>
  <groupId>org.clojure</groupId>
  <artifactId>clojure-contrib</artifactId>
  <version>1.2.0-master-SNAPSHOT</version>
</dependency>

to

<dependency>
  <groupId>org.clojure</groupId>
  <artifactId>clojure-contrib</artifactId>
  <version>1.2.0-SNAPSHOT</version>
</dependency>

You could try that.

EDIT:

BTW, you can still use Enclojure without the labrep:

  • go to "File - New Project - Clojure - Clojure Application"
  • create a project
  • right-click the project
  • pick "Start project REPL"

And you're good to go.

j-g-faustus