So I'm trying to start from a Mac OS X 10.5.8 system with java and mvn
installed, but not Clojure, and with no Maven repo (i.e. ~/.m2 does
not exist yet), and trying to build the latest Clojure and contrib
from the git repos using something as close to the recommended
instructions that comes in those repos as I can find, plus what I've
learned from this thread. I've gotten the latest Clojure to build and
install in ~/.m2, but when I try to use that clojure-1.3.0-master-
SNAPSHOT.jar to build contrib, it fails.
Here are the steps I took to build Clojure:
% git clone http://github.com/clojure/clojure.git
% cd clojure
[ downloaded maven-ant-tasks-2.1.1.jar and saved it here: /Users/
Shared/sw/maven-ant-tasks-2.1.1.jar ]
% ant -lib /Users/Shared/sw/maven-ant-tasks-2.1.1.jar ci-build
Verified that I now have an ~/.m2 directory tree, and it contains this
file, among others:
~/.m2/repository/org/clojure/clojure/1.3.0-master-SNAPSHOT/
clojure-1.3.0-master-SNAPSHOT.jar
Now try to use that to build contrib using these commands:
% cd ..
% git clone http://github.com/clojure/clojure-contrib.git
% cd clojure-contrib
I tried Stuart Sierra's suggestion from his Sep 2 email in this thread
to edit clojure-contrib/modules/parent/
pom.xml to change 1.2.0 to 1.3.0-master-SNAPSHOT. I noticed that it
still pulled down Clojure 1.2.0 during the build, so I looked for
other places in contrib that might be causing that, and found these:
% find . -name '*.xml' | xargs grep '1\.2'
./modules/condition/pom.xml: <version>1.2.0</version>
./modules/fnmap/pom.xml: <version>1.2.0</version>
./modules/jmx/pom.xml: <version>1.2.0</version>
./modules/parent/pom.xml: <clojure.version>1.2.0</clojure.version>
./modules/repl-ln/pom.xml: <version>1.2.0</version>
They all appeared to be specifying particular versions of Clojure, so
I decided to use a single command to replace them all in one go:
% find . -name '*.xml' | xargs perl -pi'.orig' -e 's/1.2.0/1.3.0-
master-SNAPSHOT/'
Then I tried building with this command:
% mvn -e install
This downloaded *lots* of stuff into my Maven repo, and built lots of
contrib modules, but it failed after about 8 minutes. I've appended
the errors from the end of the output below.
Any steps I'm doing wrong?
Thanks,
Andy
[INFO]
------------------------------------------------------------------------
[INFO] Building Unnamed - org.clojure.contrib:monads:jar:1.3.1-SNAPSHOT
[INFO] task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] skip non existing resourceDirectory /Users/andy/sw/git/clojure-
contrib/modules/monads/src/examples/clojure
[INFO] [compiler:compile {execution: default-compile}]
[INFO] No sources to compile
[INFO] [clojure:compile {execution: compile-clojure}]
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] No sources to compile
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory: /Users/andy/sw/git/clojure-contrib/
modules/monads/target/surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
There are no tests to run.
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] [clojure:test {execution: test-clojure}]
Exception in thread "main" java.lang.ClassNotFoundException:
clojure.set, compiling:(accumulators.clj:121)
at clojure.lang.Compiler.analyze(Compiler.java:5777)
at clojure.lang.Compiler.analyze(Compiler.java:5723)
at clojure.lang.Compiler$StaticInvokeExpr.parse(Compiler.java:3093)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3317)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:5945)
at clojure.lang.Compiler.analyze(Compiler.java:5762)
at clojure.lang.Compiler.analyze(Compiler.java:5723)
at clojure.lang.Compiler$InvokeExpr.parse(Compiler.java:3331)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:5945)
at clojure.lang.Compiler.analyze(Compiler.java:5762)
at clojure.lang.Compiler.analyze(Compiler.java:5723)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5131)
at clojure.lang.Compiler$FnMethod.parse(Compiler.java:4639)
at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3449)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:5941)
at clojure.lang.Compiler.analyze(Compiler.java:5762)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:5931)
at clojure.lang.Compiler.analyze(Compiler.java:5762)
at clojure.lang.Compiler.analyze(Compiler.java:5723)
at clojure.lang.Compiler$HostExpr$Parser.parse(Compiler.java:847)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:5943)
at clojure.lang.Compiler.analyze(Compiler.java:5762)
at clojure.lang.Compiler.analyze(Compiler.java:5723)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5131)
at clojure.lang.Compiler$FnMethod.parse(Compiler.java:4639)
at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3449)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:5941)
at clojure.lang.Compiler.analyze(Compiler.java:5762)
at clojure.lang.Compiler.eval(Compiler.java:5995)
at clojure.lang.Compiler.load(Compiler.java:6431)
at clojure.lang.RT.loadResourceScript(RT.java:340)
at clojure.lang.RT.loadResourceScript(RT.java:331)
at clojure.lang.RT.load(RT.java:409)
at clojure.lang.RT.load(RT.java:381)
at clojure.core$load$fn__4395.invoke(core.clj:5298)
at clojure.core$load.doInvoke(core.clj:5297)
at clojure.lang.RestFn.invoke(RestFn.java:409)
at clojure.core$load_one.invoke(core.clj:5122)
at clojure.core$load_lib.doInvoke(core.clj:5159)
at clojure.lang.RestFn.applyTo(RestFn.java:143)
at clojure.core$apply.invokeStatic(core.clj:585)
at clojure.core$load_libs.doInvoke(core.clj:5193)
at clojure.lang.RestFn.applyTo(RestFn.java:138)
at clojure.core$apply.invokeStatic(core.clj:585)
at clojure.core$require.doInvoke(core.clj:5202)
at clojure.lang.RestFn.invoke(RestFn.java:409)
at clojure.contrib.monads
$eval11$loading__4294__auto____12.invoke(monads.clj:14)
at clojure.contrib.monads$eval11.invoke(monads.clj:14)
at clojure.lang.Compiler.eval(Compiler.java:5998)
at clojure.lang.Compiler.eval(Compiler.java:5989)
at clojure.lang.Compiler.load(Compiler.java:6431)
at clojure.lang.RT.loadResourceScript(RT.java:340)
at clojure.lang.RT.loadResourceScript(RT.java:331)
at clojure.lang.RT.load(RT.java:409)
at clojure.lang.RT.load(RT.java:381)
at clojure.core$load$fn__4395.invoke(core.clj:5298)
at clojure.core$load.doInvoke(core.clj:5297)
at clojure.lang.RestFn.invoke(RestFn.java:409)
at clojure.core$load_one.invoke(core.clj:5122)
at clojure.core$load_lib.doInvoke(core.clj:5159)
at clojure.lang.RestFn.applyTo(RestFn.java:143)
at clojure.core$apply.invokeStatic(core.clj:585)
at clojure.core$load_libs.doInvoke(core.clj:5193)
at clojure.lang.RestFn.applyTo(RestFn.java:138)
at clojure.core$apply.invokeStatic(core.clj:587)
at clojure.core$use.doInvoke(core.clj:5264)
at clojure.lang.RestFn.invoke(RestFn.java:422)
at clojure.contrib.test_monads
$eval5$loading__4294__auto____6.invoke(test_monads.clj:14)
at clojure.contrib.test_monads$eval5.invoke(test_monads.clj:14)
at clojure.lang.Compiler.eval(Compiler.java:5998)
at clojure.lang.Compiler.eval(Compiler.java:5989)
at clojure.lang.Compiler.load(Compiler.java:6431)
at clojure.lang.RT.loadResourceScript(RT.java:340)
at clojure.lang.RT.loadResourceScript(RT.java:331)
at clojure.lang.RT.load(RT.java:409)
at clojure.lang.RT.load(RT.java:381)
at clojure.core$load$fn__4395.invoke(core.clj:5298)
at clojure.core$load.doInvoke(core.clj:5297)
at clojure.lang.RestFn.invoke(RestFn.java:409)
at clojure.core$load_one.invoke(core.clj:5122)
at clojure.core$load_lib.doInvoke(core.clj:5159)
at clojure.lang.RestFn.applyTo(RestFn.java:143)
at clojure.core$apply.invokeStatic(core.clj:585)
at clojure.core$load_libs.doInvoke(core.clj:5193)
at clojure.lang.RestFn.applyTo(RestFn.java:138)
at clojure.core$apply.invokeStatic(core.clj:585)
at clojure.core$require.doInvoke(core.clj:5202)
at clojure.lang.RestFn.invoke(RestFn.java:409)
at user$eval1.invoke(run-test1162544732336955934.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:5998)
at clojure.lang.Compiler.load(Compiler.java:6431)
at clojure.lang.Compiler.loadFile(Compiler.java:6394)
at clojure.main$load_script.invoke(main.clj:216)
at clojure.main$script_opt.invoke(main.clj:268)
at clojure.main$main.doInvoke(main.clj:349)
at clojure.lang.RestFn.invoke(RestFn.java:409)
at clojure.lang.Var.invoke(Var.java:365)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:482)
at clojure.main.main(main.java:37)
Caused by: java.lang.ClassNotFoundException: clojure.set
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:
58)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at clojure.lang.RT.classForName(RT.java:1596)
at clojure.lang.Compiler$HostExpr.maybeClass(Compiler.java:868)
at clojure.lang.Compiler$HostExpr.access$400(Compiler.java:669)
at clojure.lang.Compiler.analyzeSymbol(Compiler.java:6145)
at clojure.lang.Compiler.analyze(Compiler.java:5744)
... 99 more
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Clojure failed.
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Clojure failed.
at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:
703)
at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor
.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519)
at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor
.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor
.executeTaskSegments(DefaultLifecycleExecutor.java:332)
at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun
.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun
.reflect
.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:
430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Clojure
failed.
at
com
.theoryinpractise
.clojure
.AbstractClojureCompilerMojo
.callClojureWith(AbstractClojureCompilerMojo.java:367)
at
com
.theoryinpractise
.clojure.ClojureRunTestMojo.execute(ClojureRunTestMojo.java:95)
at
org
.apache
.maven
.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
at
org
.apache
.maven
.lifecycle
.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:
678)
... 17 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 3 minutes 53 seconds
[INFO] Finished at: Wed Sep 22 18:02:41 PDT 2010
[INFO] Final Memory: 21M/37M
[INFO]
------------------------------------------------------------------------
On Sep 22, 2010, at 2:01 PM, Stuart Sierra wrote:
On Sep 22, 3:45 pm, Sean Corfield <seancorfi...@gmail.com> wrote:
Having pulled Clojure master and done: ant, mvn install I saw that
the
jar in the repository was very small - pretty much empty in fact.
The Clojure build doesn't fully support Maven. You need to run this:
ant -lib /path/to/maven-ant-tasks.jar ci-build
Get maven-ant-tasks.jar here: http://maven.apache.org/ant-tasks/download.html
-S
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient
with your first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en