Code Monkey home page Code Monkey logo

clojure-maven-plugin's Introduction

Welcome to the clojure-maven-plugin plugin for Apache Maven 2.

This plugin has been designed to make working with clojure as easy as possible, when working in a mixed language, enterprise project.

Available goals

  • clojure:add-source
  • clojure:add-test-source
  • clojure:compile
  • clojure:test
  • clojure:test-with-junit
  • clojure:run
  • clojure:repl
  • clojure:nrepl
  • clojure:swank
  • clojure:nailgun
  • clojure:gendoc
  • clojure:autodoc
  • clojure:marginalia

Getting started with Clojure and Maven

To use this plugin and start working with clojure, start with a blank maven project and declare the plugin and add a dependency on clojure:

<packaging>clojure</packaging>
....
<build>
  <plugins>
    <plugin>
      <groupId>com.theoryinpractise</groupId>
      <artifactId>clojure-maven-plugin</artifactId>
      <version>1.8.3</version>
      <extensions>true</extensions>
    </plugin>
  </plugins>
</build>
....
<dependencies>
  <dependency>
    <groupId>org.clojure</groupId>
    <artifactId>clojure</artifactId>
    <version>1.10.0</version>
  </dependency>
</dependencies>

By changing your projects type to clojure, the plugin will automatically bind itself to the compile, test-compile, and test maven phases.

Without any additional configuration, the clojure-maven-plugin will compile any namespaces in ./src/main/clojure/.clj (or .cljc) and ./src/test/clojure/.clj (or .cljc).

Adding additional source directories

To change, or add additional source directories you can add the following configuration:

<configuration>
  <sourceDirectories>
    <sourceDirectory>src/main/clojure</sourceDirectory>
  </sourceDirectories>
  <testSourceDirectories>
    <testSourceDirectory>src/test/clojure</testSourceDirectory>
  </testSourceDirectories>
</configuration>

NOTE: The plugin will prepend the project's ${basedir} before each source/testSource directory specified.

Temporary Compile Paths

If you wish to take advantage of the compilers syntax checking, but wish to prevent any AOT classes from appearing in the maven generated JAR file, you can tell the plugin to compile to a temporary directory:

<configuration>
  <temporaryOutputDirectory>true</temporaryOutputDirectory>
</configuration>

Namespace configuration

If you wish to limit or filter out namespaces during your compile/test, simply add a <namespaces> or <testNamespaces> configuration section:

<configuration>
  <namespaces>
    <namespace>com.foo</namespace>
    <namespace>net.*</namespace>
    <namespace>!testing.*</namespace>
  </namespaces>
</configuration>

The namespace declaration is actually a regex match against discovered namespaces, and can also be prepended with an ! to filter the matching namespace.

If you wish to further limit test/compile usage to only the namespaces you define, you can enable this with the configuration block:

<configuration>
  <compileDeclaredNamespaceOnly>true</compileDeclaredNamespaceOnly>
  <testDeclaredNamespaceOnly>true</testDeclaredNamespaceOnly>
</configuration>

If you want that only compiled artifacts related to the above mentioned <namespaces> and <compileDeclaredNamespaceOnly> be kept, then add a cleanAOTNamespaces config param and set it to true.

For instance (1/2), with the following configuration ...

<configuration>
  <cleanAOTNamespaces>true</cleanAOTNamespaces>
  <namespaces>
    <namespace>!some.annoying.namespace</namespace>
  </namespaces>
<configuration>

... all aot-compiled classes created in the output directory will be kept as is, but the ones of the some.annoying.namespace namespace which will be deleted.

For instance (2/2), with the following configuration ...

<configuration>
  <cleanAOTNamespaces>true</cleanAOTNamespaces>
  <namespaces>
    <namespace>some.namespace.with.a.gen-class</namespace>
  </namespaces>
  <compileDeclaredNamespaceOnly>true</compileDeclaredNamespaceOnly>
<configuration>

... all aot-compiled classes will be deleted, but the ones of the some.annoying.namespace namespace.

Interactive Coding

The plugin supports several goals intended to make it easier for developers to run interactive clojure shells in the context of maven projects. This means that all dependencies in a project's runtime and test scopes will be automatically added to the classpath and available for experimentation.

By default these goals will use the test classpath, if you wish to only use the compile classpath/dependencies, you can disable this with:

<configuration>
  <runWithTests>false</runWithTests>
</configuration>

or by running maven with:

-Dclojure.runwith.test=false

Goals

Goal Description
clojure:repl

Starts an interactive clojure REPL right on the command line.

Property Variable Default Description
replScript An initialization script can be specified in the pom using the replScript configuration element.
clojure:nrepl

Starts a nREPL server that accepts connections.

Property Variable Default Description
replScript The clojure script to run before starting the repl
port clojure.nrepl.port 4005 The nREPL server port
nreplHost clojure.nrepl.host localhost The host to bind the nREPL server to/td>
nreplHandler clojure.nrepl.handler The nREPL Handler to use. i.e.
cider.nrepl/cider-nrepl-handler
from the
cider-nepl
project./td>
clojure:swank

Starts a Swank server that accepts connections.

Property Variable Default Description
replScript The clojure script to run before starting the repl
port clojure.swank.port 4005 The swank server port
protocolVersion clojure.swank.protocolVersion 2009-09-14 The swank protocol version
encoding clojure.swank.encoding iso-8859-1 The swank encoding to use
swankHost clojure.swank.host localhost The host to bind the swank server to/td>
clojure:nailgun

Starts a nailgun server.

Property Variable Default Description
replScript The clojure script to run before starting the repl
port clojure.nailgun.port 2113 The nailgun server port
clojure:run

Runs a clojure script.

Property Variable Default Description
script clojure.script The clojure script to run
scripts A list of clojure scripts to run
mainClass clojure.mainClass A java class to run
args clojure.args Arguments to the clojure script(s)
clojure:add-source Includes clojure source directory in -sources.jar.
clojure:add-test-source Includes clojure test source directory in -testsources.jar.

Testing Clojure Code

Whilst you could easily launch your tests from the clojure:run goal, the plugin provides two goals targeted specifically to testing: clojure:test and clojure:test-with-junit

Without any additional configuration the plugin will run a temporary clojure "test launcher" script:

The script runs all discovered test namespaces, and fails the build when any FAIL or ERROR cases are found.

If you require different test behavior, you can provide your own test script with the following configuration:

<configuration>
  <testScript>src/test/clojure/com/jobsheet/test.clj</testScript>
</configuration>

The first argument to the script is the name of a properties file that has in it a config for the user selected. These configs can be parsed out using the following code

(def props (Properties.))
(.load props (FileInputStream. (first *command-line-args*)))

;;namespaces to run tests for
(def namespaces  (into []
                       (for [[key val] props
                             :when (.startsWith key "ns.")]
                               (symbol val))))

;; should there be junit compatible output or not
(def junit (Boolean/valueOf (.get props "junit")))
;; what is the output directory that results should be written to
(def output-dir (.get props "outputDir"))
;; should we xml-escape *out* while the tests are running
(def xml-escape (Boolean/valueOf (.get props "xmlEscape")))

We reserve the right to add new configs in the future, and possibly new command line arguments as well.

Configuring your clojure session

If you want to provide additional arguments to all spawned java/clojure processes, the plugin provides several configuration properties:

Property Variable Default Description
vmargs clojure.vmargs JVM Arguments
clojureOptions Additional JVM Options such as system property definitions
warnOnReflection false Enable reflection warnings
prependClasses A list of classnames to prepend to the command line before the mainClass

The plugin can also copy source files to the output directory, filtered using the namespace mechanism that is used to control compilation. If you want to copy all compiled source files to the output:

<configuration>
  <copyAllCompiledNamespaces>true</copyAllCompiledNamespaces>
<configuration>

If you want to copy only a subset:

<configuration>
  <copiedNamespaces>
    <namespace>com.foo</namespace>
    <namespace>!com.foo.private.*</namespace>
  </copiedNamespaces>
  <copyDeclaredNamespaceOnly>true</copyDeclaredNamespaceOnly>
<configuration>

If you want to do no compilation at all, but copy all source files:

<configuration>
  <copyDeclaredNamespaceOnly>true</copyDeclaredNamespaceOnly>
  <namespaces>
    <namespace>!.*</namespace>
  </namespaces>
  <compileDeclaredNamespaceOnly>true</compileDeclaredNamespaceOnly>
<configuration>

Note that it will only copy clojure source files, which must a) end in .clj or .cljc and b) contain a namespace declaration.

Enjoy.

Dependencies

In order to run clojure:repl, clojure:swank or clojure:nailgun, your project needs to have a recent (1.0 or later) version of clojure as a dependency in pom.xml.

In order to run clojure:autodoc, your project needs to have autodoc as a dependency in pom.xml.

In order to run clojure:nrepl, your project needs to have org.clojure/tools.nrepl as a dependency in pom.xml.

JLine/IClojure/REPL-y

If JLine is detected in the classpath, it will be used to provide the clojure:repl goal with history, tab completion, etc. A simple way of enabling this is to put the following in your pom.xml:

    <dependency>
       <groupId>jline</groupId>
       <artifactId>jline</artifactId>
       <version>0.9.94</version>
    </dependency>

If you prefer IClojure you can add:

    <dependency>
       <groupId>com.offbytwo.iclojure</groupId>
       <artifactId>iclojure</artifactId>
       <version>1.1.0</version>
    </dependency>

Or REPL-y:

    <dependency>
       <groupId>reply</groupId>
       <artifactId>reply</artifactId>
       <version>0.1.0-beta9</version>
    </dependency>

Swank

The clojure:swank goal requires swank-clojure as a project dependency. Unfortunately, this library is currently not available in the central maven repository, but is available from clojars by first declaring the repository:

<repositories>
  <repository>
    <id>clojars</id>
    <url>https://clojars.org/repo/</url>
  </repository>
</repositories>

and then declaring the dependency itself:

<dependency>
  <groupId>swank-clojure</groupId>
  <artifactId>swank-clojure</artifactId>
  <version>1.3.0-SNAPSHOT</version>
</dependency>

By default the swank process will run against the local loopback device, if you wish to change the host your swank server runs against, you can configure it via:

<configuration>
  <swankHost>localhost</swankHost>
</configuration>

or by defining the clojure.swank.host system property.

nREPL

The clojure:nrepl goal requires nrepl as a project dependency as:

<dependency>
  <groupId>nrepl</groupId>
  <artifactId>nrepl</artifactId>
  <version>0.6.0</version>
</dependency>

By default the nREPL process will run against the local loopback device on port 4005, if you wish to change the host your nREPL server runs against or the port, you can configure it via:

<configuration>
  <nreplHost>localhost</nreplHost>
  <port>9001</port>
</configuration>

or by defining the clojure.nrepl.host and clojure.nrepl.port system properties.

It is also possible to specify a custom handler or server-side middleware to be added to the nREPL stack. This may be necessary for integrating with Clojure IDEs, such as LightTable or CIDER. These IDEs require custom nREPL middleware for best results or may not work at all with the default nREPL stack. nREPL middleware can be specified as follows:

<configuration>
    <nreplMiddlewares>
        <middleware>my.nrepl.middleware/my-middleware</middleware>
    </nreplMiddlewares>
</configuration>

Either a custom handler or as many middleware as necessary can be specified. Each middleware must be specified as a fully qualified symbol - namespace/name. Thy symbol must resolve to a var referencing a middleware function. If the middleware is not part of the project itself, it must be specified as a dependency. The same is true for custom nRepl handlers

LightTable configuration example:

<dependency>
    <groupId>lein-light-nrepl</groupId>
    <artifactId>lein-light-nrepl</artifactId>
    <version>0.3.3</version>
    <scope>test</scope>
</dependency>
...
<configuration>
    <nreplMiddlewares>
        <middleware>lighttable.nrepl.handler/lighttable-ops</middleware>
    </nreplMiddlewares>
</configuration>

CIDER configuration example:

<dependency>
    <groupId>cider</groupId>
    <artifactId>cider-nrepl</artifactId>
    <version>0.12.0</version>
    <scope>test</scope>
</dependency>
.......
<configuration>
        <nreplMiddlewares>
            <middleware>cider.nrepl/wrap-apropos</middleware>
            <middleware>cider.nrepl/wrap-classpath</middleware>
            <middleware>cider.nrepl/wrap-complete</middleware>
            <middleware>cider.nrepl/wrap-debug</middleware>
            <middleware>cider.nrepl/wrap-format</middleware>
            <middleware>cider.nrepl/wrap-info</middleware>
            <middleware>cider.nrepl/wrap-inspect</middleware>
            <middleware>cider.nrepl/wrap-macroexpand</middleware>
            <middleware>cider.nrepl/wrap-ns</middleware>
            <middleware>cider.nrepl/wrap-spec</middleware>
            <middleware>cider.nrepl/wrap-profile</middleware>
            <middleware>cider.nrepl/wrap-refresh</middleware>
            <middleware>cider.nrepl/wrap-resource</middleware>
            <middleware>cider.nrepl/wrap-stacktrace</middleware>
            <middleware>cider.nrepl/wrap-test</middleware>
            <middleware>cider.nrepl/wrap-trace</middleware>
            <middleware>cider.nrepl/wrap-out</middleware>
            <middleware>cider.nrepl/wrap-undef</middleware>
            <middleware>cider.nrepl/wrap-version</middleware>
            <middleware>cider.nrepl/wrap-xref</middleware>
        </nreplMiddlewares>
</configuration>

Nailgun for Vimclojure < 2.2.0

The clojure:nailgun goal requires a recent version of vimclojure as a dependency. Unfortunately, this library is currently not available in the central maven repository, and has to be downloaded and installed manually:

  1. Download vimclojure source code from http://cloud.github.com/downloads/jochu/swank-clojure/swank-clojure-1.0-SNAPSHOT-distribution.zip.
  2. Follow the README to compile and install vimclojure.
  • Locate vimclojure.jar and run the following command to install it to your local repository (replace X.X.X with your version of vimclojure):

    mvn install:install-file -DgroupId=de.kotka -DartifactId=vimclojure -Dversion=X.X.X -Dpackaging=jar -Dfile=/path/to/jarfile
    
  • Put the following in your pom.xml (replace X.X.X with your version of vimclojure)

    <dependency>
    <groupId>de.kotka</groupId>
    <artifactId>vimclojure</artifactId>
    <version>X.X.X</version>
    </dependency>
    
  • You will need to run mvn clojure:nailgun -Dclojure.nailgun.server=com.martiansoftware.nailgun.NGServer in order to

    work with the old version (pre 2.2.0) of vimclojure.

Nailgun for Vimclojure >= 2.2.0

To use clojure 1.2.0 comfortably, you will need to upgrade to Vimclojure 2.2.0 which isn't backwards compatible with previous vimclojure versions. Now you will need a dependency on the vimclojure:server:2.2.0 which contains the modified Nailgun server.

<dependency>
    <groupId>vimclojure</groupId>
    <artifactId>server</artifactId>
    <version>2.2.0</version>
</dependency>

The jar can be found in clojars maven repo (you'll have to add it to the repositories section)

<repository>
    <id>clojars</id>
    <name>Clojars</name>
    <url>https://clojars.org/repo/</url>
</repository>

The installation process for vimclojure remains the same (except for the vimclojure.jar which you don't need to install anymore). Just get the vimclojure package from http://kotka.de/projects/clojure/vimclojure.html and follow the README.

Notes for migration from the previous version of vimclojure:

  • clj_highlight_builtins was deprecated in favor of vimclojure#HighlightBuiltins
  • clj_highlight_contrib was removed
  • g:clj_paren_rainbow was deprecated in favor of vimclojure#ParenRainbow
  • g:clj_want_gorilla was deprecated in favor of vimclojure#WantNailgun

Windows configuration

As the default Windows console doesn't allow to easily copy and paste code, you can use the windowsConsole configuration option to specify which console command to run in Windows. For example if you are using http://code.google.com/p/conemu-maximus5/, you can configure the plugin with:

<windowsConsole>"C:\\Program Files\\ConEmu\\ConEmu64.exe" /cmd</windowsConsole>

which will give you a sane Windows console

Configuration

The following options that can be configured as system properties:

Property Default value Description
clojure.nailgun.port 4005 Only applicable for the clojure:nailgun goal. The port number that the Nailgun server should listen to.
clojure.swank.port 4005 Only applicable for the clojure:swank goal. The port number that the Swank server should listen to.
clojure.swank.protocolVersion 2009-09-14 Only applicable for the clojure:swank goal. Specifies the version of the swank protocol.
clojure.swank.encoding iso-8859-1 Only applicable for the clojure:swank goal. Specifies the encoding used by the swank protocol.
clojure.nrepl.port 4005 Only applicable for the clojure:nrepl goal. The port number that the nREPL should listen to.
clojure.nrepl.host 4005 Only applicable for the clojure:nrepl goal. The host that the nREPL should listen to.

Support

Join the discussion mailing list at:

http://groups.google.com/group/clojure-maven-plugin

clojure-maven-plugin's People

Contributors

berengal avatar cemerick avatar coltnz avatar cosmin avatar danielsz avatar dlebrero avatar dm3 avatar duck1123 avatar dysinger avatar edwardbetts avatar ez121sl avatar fred-o avatar hugoduncan avatar humphrej avatar jukka avatar klauern avatar laurentpetit avatar nullstyle avatar ptgoetz avatar puredanger avatar rstehwien avatar scode avatar senior avatar sthuebner avatar sumbach avatar talios avatar tcushman avatar tobias avatar wg avatar xeqi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

clojure-maven-plugin's Issues

add plugin dependencies to classpath during compilation

I have a dependency that is in runtime scope, because it's not required by Java code, but is required by clojure code. If I put it compile scope maven-dependency-plugin:analyze complains.

Would be convenient to have an ability to add this artifact as a dependency for the clojure plugin only. The plugin should support such configuration and should add all its dependencies to classpath.

ClojureScript tests?

Hi,

I have a Clojure + ClojureScript project using cljc that I'd like to test using Maven. Both the Clojure and ClojureScript versions need to be tested at the same time.

Is that possible using clojure-maven-plugin?

Control characters in source files

Control characters (e.g. a copyright symbol) in the header of .clj files causes them to be skipped by the clojure:compile plugin. For example:

; Copyright ๏ฟฝ 2010 Foo

(ns foo...

skip test execution when no testSourceDirectories

Currently, a several of our maven artifacts have clojure source, but a few dozen don't. complete build time takes a lot more time due to spawning our big clojure vms. Can you add a feature to skip the plugin when the source and or test dirs are empty?

pls mention repo for Maven

Hi, many thanks for the work!

At the place in your README where you give the maven sniplet, please add a sniplet that tells the repo. Thank you!, z.

clojars http://clojars.org/repo/

Maven 3 warns on missing plugin version for maven-compiler-plugin

When running any mvn goal in the clojure-maven-plugin project, maven 3 displays the following warning.

[WARNING] Some problems were encountered while building the effective model for com.theoryinpractise:clojure-maven-plugin:maven-plugin:1.3.7-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 98, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

(clojure.java.classpath/classpath) produces wrong results with plugin 1.3.20

I have code that needs to look over the class path. It gets it using:

(clojure.java.classpath/classpath)

Using clojure-maven-plugin 1.3.9 all is well that call gets me quite a large seq of files. With clojure-maven-plugin 1.3.20 I see something like the following and only the following:

(#<File /var/folders/bk/w587c61d02s2hkn5zqs4zlnm0000gs/T/clojuremavenplugin2851089989068089718jar>)

If you force that thing to be a JarFile and then look at what's in it there is one manifest file and that's it.

Kevin

Maven seems to compile with wrong version of Clojure

I have a project that uses Korma, which has a function "update" which now clashes with clojure.core/update, introduced in 1.7. This clash results in a compilation error in AOT projects.

There was a fix in Clojure to address this issue which recently was patched into master:
http://dev.clojure.org/jira/browse/CLJ-1604

My issue is that I have a project A which depends on a project B. Project A is compiled against the latest clojure with the fix. Project B is compiled against an earlier clojure without the fix. When I try to compile A, I get the compilation error, even if I depend on the new version of Clojure directly in A. If I remove my dependency on B, the compilation error goes away.

I've put an example project on Github:
https://github.com/deaddowney/UpdateProblem

Namespace discovery is too fragile

If you have a namespace declaration that doesn't have a space after the '(ns'. such as this:

(ns
  ^#{author: "blah"}
  clojure.set)

which is more common if the ns has associated metadata, then the namespace isn't discovered. Simple fix to the regex.

Compile errors don't indicate where the error is in INFO level

When the clojure compile step fails, all I see is:

ERROR] Failed to execute goal com.theoryinpractise:clojure-maven-plugin:1.3.19:compile (compile) on project MyProj: Clojure failed. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.theoryinpractise:clojure-maven-plugin:1.3.19:compile (compile) on project MyProj: Clojure failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:318)
......

If I switch to DEBUG level in Maven, I DO see the error. Can we bump up this error to a higher log level? DEBUG puts far too much crap in the logs and we should see the compilation error.

Broken under windows

Hi, neither clojure:repl nor clojure:swank work under windows.

I made a blogpost about how maven and this plugin make it easy to start a swank server

http://learnclojure.blogspot.com/2010/03/clojure-maven-emacs-eternal-golden.html

It basically says, use the pom.xml below, and type mvn clojure:swank.

This breaks under windows.

mvn clojure:repl sort of works, but the repl is unusable (doesn't seem to echo until you press return).

There is a fix for (at least the swank bit) in issue five here:

http://github.com/talios/clojure-maven-plugin/issues/#issue/5

This makes it work under windows, but breaks it under ubuntu. Something nasty is going on with string escaping differently on the two platforms.

I've no idea what the real fix is, but Windows folks might want to use frericksm's code in the other issue for now?

Here's the demonstration pom:
mvn clojure:swank and mvn clojure:repl work fine under ubuntu, and break under Windows with this pom.

  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example</groupId>
  <artifactId>hello-maven-clojure-swank</artifactId>
  <version>1.0-SNAPSHOT</version>
  <name>hello-maven</name>
  <description>maven, clojure, emacs: together at last</description>

  <repositories>
    <repository>
      <id>clojars</id>
      <url>http://clojars.org/repo/</url>
    </repository>
    <repository>
      <id>clojure</id>
      <url>http://build.clojure.org/releases</url>
    </repository>
    <repository>
      <id>central</id>
      <url>http://repo1.maven.org/maven2</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>org.clojure</groupId>
      <artifactId>clojure</artifactId>
      <version>1.1.0</version>
    </dependency>
    <dependency>
      <groupId>org.clojure</groupId>
      <artifactId>clojure-contrib</artifactId>
      <version>1.1.0</version>
    </dependency>
    <dependency>
      <groupId>jline</groupId>
      <artifactId>jline</artifactId>
      <version>0.9.94</version>
    </dependency>
    <dependency>
      <groupId>swank-clojure</groupId>
      <artifactId>swank-clojure</artifactId>
      <version>1.2.0-break-SNAPSHOT</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>com.theoryinpractise</groupId>
        <artifactId>clojure-maven-plugin</artifactId>
        <version>1.3.2</version>
      </plugin>
    </plugins>
  </build>

</project>

testScript does not work in multi-module builds

I have a multi-module build where some modules are using the clojure-maven-plugin. When I run maven from the module's directory, everything works fine. E.g.

[INFO] [clojure:test {execution: default}]

Testing tests

Ran 1 tests containing 2 assertions.
0 failures, 0 errors.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------

When I run the build from the project's root directory, I get this error message:

[INFO] [clojure:test {execution: default}]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] testScript is empty or does not exist!
[INFO] ------------------------------------------------------------------------

It seems that clojure-maven-plugin uses the CWD instead of the module's directory.

Running <script> tag on every goal task.

Hello. I have following maven configuration (full version of pom.xml is here):

<!-- <packaging>clojure</packaging> -->
<packaging>jar</packaging>
...
<plugin>
  <groupId>com.theoryinpractise</groupId>
  <artifactId>clojure-maven-plugin</artifactId>
  <version>1.3.10</version>
  <!-- <extensions>true</extensions> -->
  <configuration>
    <script>src/main/clojure/proxy/main.clj</script>
  </configuration>
  <executions>
    <execution>
      <id>compile</id>
      <phase>compile</phase>
      <goals>
        <goal>compile</goal>
      </goals>
    </execution>
    <execution>
      <id>test</id>
      <phase>test</phase>
      <goals>
        <goal>test</goal>
      </goals>
    </execution>
  </executions>
</plugin>
...

I try to remove block and use clojure packaging together with block. The problem is the same. When I call commands below main.clj always run and wait for user stop him.

Commands I try:

  • mvn package
  • mvn clojure:repl
  • mvn test

And on mvn clojure:run its run as necessary.

Use AOT compiled clojure code in Java

Currently, even with packaging specified as Clojure, the maven compiler plugin is run before clojure compiler plugin, making classes generated from clojure using :gen-class unavailable for linking.

Would it be possible to generate the clojure class files first and add them to the maven java compiler classpath when it is running?

All dependencies get packaged into jar

All the classes from dependencies end up in the packaged jar. This is different than the default of maven, and not what you want when you intend to publish the project to a maven repository and consume it in another project.

Minimal pom.xml that reproduces the error:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.fivetran</groupId>
    <artifactId>clojure-sandbox</artifactId>
    <version>1.0-SNAPSHOT</version>

    <packaging>clojure</packaging>

    <dependencies>
        <!-- Clojure language runtime -->
        <dependency>
            <groupId>org.clojure</groupId>
            <artifactId>clojure</artifactId>
            <version>1.6.0</version>
        </dependency>

        <!-- Fancy clojure JSON / Jackson wrapper -->
        <dependency>
            <groupId>cheshire</groupId>
            <artifactId>cheshire</artifactId>
            <version>5.3.1</version>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>src</sourceDirectory>

        <testSourceDirectory>test</testSourceDirectory>

        <plugins>
            <!-- Teach maven about clojure -->
            <plugin>
                <groupId>com.theoryinpractise</groupId>
                <artifactId>clojure-maven-plugin</artifactId>
                <version>1.3.20</version>
                <extensions>true</extensions>

                <configuration>
                    <sourceDirectories>
                        <sourceDirectory>src</sourceDirectory>
                    </sourceDirectories>

                    <testSourceDirectories>
                        <testSourceDirectory>test</testSourceDirectory>
                    </testSourceDirectories>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

Default test script fails under Clojure 1.3

Using c-m-p 1.3.8 with Clojure 1.3-beta1 and the default test script fails with the error:

Exception in thread "main" java.lang.IllegalStateException: Can't dynamically bind non-dynamic var: clojure.test.junit/junit-report
        at clojure.lang.Var.pushThreadBindings(Var.java:339)
        at clojure.core$push_thread_bindings.invoke(core.clj:1716)
        at com.theoryinpractise.clojure.testrunner$eval10503.invoke(run-test7765525700945248109.clj:46)
        at clojure.lang.Compiler.eval(Compiler.java:6406)
        at clojure.lang.Compiler.load(Compiler.java:6843)
        at clojure.lang.Compiler.loadFile(Compiler.java:6804)
        at clojure.main$load_script.invoke(main.clj:282)
        at clojure.main$script_opt.invoke(main.clj:342)
        at clojure.main$main.doInvoke(main.clj:426)
        at clojure.lang.RestFn.invoke(RestFn.java:408)
        at clojure.lang.Var.invoke(Var.java:401)  
        at clojure.lang.AFn.applyToHelper(AFn.java:161)
        at clojure.lang.Var.applyTo(Var.java:518) 
        at clojure.main.main(main.java:37)

Get error about "clojure" packaging when running the REPL

When I try to run "mvn clojure:repl" on my project, I get the following error message:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building singularity
[INFO] task-segment: [clojure:repl]
[INFO] ------------------------------------------------------------------------
[INFO] Preparing clojure:repl
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Cannot find lifecycle mapping for packaging: 'clojure'.
Component descriptor cannot be found in the component repository: org.apache.maven.lifecycle.mapping.LifecycleMappingclojure.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Fri Nov 19 16:40:54 MST 2010
[INFO] Final Memory: 8M/81M
[INFO] ------------------------------------------------------------------------

The "clojure:compile" task works, though.

typo in the readme + question about skip test

Not really an issue ... in the readme the tag for namespaces is not closed/ended properly as namespace is missing the s at the end. It only causes a problem for lazy people. like me, that cut and paste.

Since I am here, is there a way in the configuration to skip the tests ... i tried true in the configuration section of the plugin without any success

Thanks

Thanks

clojure:swank doesn't run the replScript before starting its repl

Hi, I have a request:

If I've got runscript.clj in my pom.xml, then runscript.clj gets run
for mvn clojure:repl, but not for mvn clojure:swank

I think that either it should get run, or (possibly preferably) there should be a corresponding swankScript element that does get run before the swank repl starts.

I've no idea how to do this, but I can probably find out.

If the feature's easy for someone else it would be ever so nice to have.

If not, is it a patch that would be appreciated? If so I'll have a go. Any hints? I don't know much about either maven or swank/slime. I do speak clojure and java and emacs.

Cheers, John.

ClojureSwankMojo.java generates a clojure expression which is wrongly escaped as java string

Situation:

  1. Using the task clojure:swank i always get an NumberFormatException while clojure is parsing the protocolVersion "2009-09-14".
  2. It seems the that the <"> around the string are vanishing
  3. Looking deeper you find: ClojureSwankMojo generates a clojure expression that is later on consumed by clojure.main as command line argument. Part of this is:
    StringBuilder sb = new StringBuilder();
    sb.append("(do ");
    sb.append("(swank.swank/ignore-protocol-version \"");
    sb.append(protocolVersion);
    sb.append("\") ");
    sb.append("(swank.swank/start-server \"");
    sb.append(swankTempFile.getAbsolutePath());
    sb.append("\" :port ");
    sb.append(Integer.toString(port));
    sb.append(" :dont-close true");
    sb.append("))");

But i should look like this:

    StringBuilder sb = new StringBuilder();
    sb.append("(do ");
    sb.append("(swank.swank/ignore-protocol-version \\\"");
    sb.append(protocolVersion);
    sb.append("\\\") ");
    sb.append("(swank.swank/start-server \\\"");
    sb.append(swankTempFile.getAbsolutePath().replace("\\", "/"));
    sb.append("\\\" :port ");
    sb.append(Integer.toString(port));
    sb.append(" :dont-close true");
    sb.append("))");
  1. The new line

    sb.append(swankTempFile.getAbsolutePath().replace("\\", "/"));
    

is necessary on windows system, where the temp-File looks like "c:\DOKUME1\J108391.V10\LOKALE~1\Temp\slime.364" with for instance \D gets wrongly interpreted.

mvn clojure:swank opens a public port rather than loopback

Using mvn clojure:swank appears to open a publicly accessible port:

$mvn clojure:swank
$lsof -i -P
java 15067 john 14r IPv6 7203722 0t0 TCP *:4005 (LISTEN)

This strikes me as an unsafe default.

This command seems to open a local loopback port, which strikes me as more reasonable.
(swank.swank/start-server "/tmp/yo" :host "localhost" :port 4005)

Otherwise you're giving everyone on your network a (very convenient) interface to execute arbitrary code.

Compilation steps should recurse into source directories?

Since Clojure supports nested namespaces like Java, does it make sense to recurse into source directories and compile the .clj files in nested subdirectories instead of just the root level? It seems like the maven convention is to point the compiler at a root source folder and assume everything "under there" is code that can be compiled.

As it stands, one must override the configuration to specify each subdirectory that contains Clojure source. This isn't a huge deal given that there usually wouldn't be as much nesting as in a typical Java project due to the more coarse-grained modularity of Clojure source files. However, if the goal is to behave more like other maven plugins, I believe this proposal would move the plugin closer to the principle of least surprise.

sourceDirectories and Absolute Paths

The clojure-maven-plugin behaves differently from other plugins that allow adding source paths, even including clojure-maven-plugin's own ClojureAddSourceMojo.

In the translatePaths method of the AbstractClojureCompilerMojo class, you manually prepend baseDirectory onto the values captured in sourceDirectories, whereas the proper way seems to be calling .getAbsolutePath on File objects like ClojureAddSourceMojo does. Here are the two code examples:

https://github.com/talios/clojure-maven-plugin/blob/develop/src/main/java/com/theoryinpractise/clojure/AbstractClojureCompilerMojo.java#L231

https://github.com/talios/clojure-maven-plugin/blob/develop/src/main/java/com/theoryinpractise/clojure/ClojureAddSourceMojo.java#L15

For example, I am putting some generated Clojure code into <project>/target/src/main/clojure of my project, but if I try to configure clojure-maven-plugin's sourceDirectories -> sourceDirectory with ${project.build.directory}/src/main/clojure}, clojure-maven-plugin doesn't find my source files, whereas the equivalent configuration works fine for both the maven-build-helper-plugin and the jruby-maven-plugin, both of which take the .getAbsolutePath approach.

Option to include plugin dependencies on classpath for run goal

Firstly, excellent plugin. It's incredibly useful and well written!

Unfortunately I think I've found a limitation in the way the classpath is constructed when using the run goal (although I think it applies more broadly, this is the one use case I've found so far). The plugin doesn't seem to include any plugin dependencies on the classpath, and there doesn't appear to be any configuration option to change this default behaviour.

Looking at the source, it seems to only include all compile-scoped dependencies. This limits the plugin to only being used on Clojure projects.

My use case was to execute a Clojure script as part of a Maven build, but the project itself was written in pure Java. This meant I was unable to use the plugin because I wasn't happy including Clojure as a compile-scoped project dependency.

Any chance we could have the option to include plugin dependencies (and possibly even an option to exclude project dependencies) when executing the run goal? Something along the lines of what the exec-maven-plugin:java goal provides?

Thanks

mvn test hangs if threads were created

My test code contains several pmap calls hence new threads get created during the test execution.

It seems that this causes clojure:test to hang after the tests have been executed. Maven simply blocks for approx. 1 minute until the build continues. The output is like this (see my comment inline):

[INFO] ------------------------------------------------------------------------
[INFO] Building Ogee Library
[INFO] task-segment: [test]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources {execution: default-resources}]
.......snip........
[INFO] [clojure:test {execution: test}]

Testing ogee.test-cop

Ran 9 tests containing 21 assertions.
0 failures, 0 errors.

<<<BLOCKS HERE FOR 60 SECS>>>

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 minute 5 seconds
[INFO] Finished at: Thu Jan 28 11:00:22 CET 2010
[INFO] Final Memory: 12M/77M
[INFO] ------------------------------------------------------------------------

You can find the test code here: http://github.com/romanroe/ogee/blob/master/library/src/test/clojure/ogee/test_cop.clj

surefire java junit tests can't load resources from classpath

Trying to integrate some clojure namespaces into an existing java project.

There are existing java unit tests in src/test/java and test resources in src/test/resources. For example, src/test/resources/META-INF/persistence.xml is loaded from the test classpath by some tests (via hibernate).

Unfortunately though, the resources from src/test/resources are not moved to target/test-classes when the clojure-maven-plugin is in the pom. Moving the test resources to src/test/clojure/ did not help. Specifing things like testResourcePath in or also did not help.

This command reproduces the problem:

mvn clean test

This is the directory layout:
src/main/java
src/test/java
src/test/resources

It succeeds when there is no clojure-maven-plugin in the pom, and fails when it's there. Sorry for the relative brevity of this bug report, I hope to upload a demo project soon if I find the time.

Test script template could be modified to make the plugin compatible with alternative testing frameworks

At the moment the plugin fails a build when any tests generate a result of :error or :fail. Since it is possible to modify clojure.test's reporting, alternative test frameworks may use other keys than :error or :fail to indicate a failing test. Midje does this for example. The result is that a mvn clojure:test run will write a correct report of failing tests but doesn't fail the build.

To allow use of alternative test frameworks, that can plug into clojure.test's reporting, a build should be failed when any test does not :pass instead of failing it, when it has an :error or :fail(s).

org.apache.maven:maven-toolchain:3.0-TYCHO-733848 not found

I'm having some trouble resolving the version of maven-toolchain the plugin is trying to pull in. maven is throwing warnings (and occasionally errors) when trying to resolve it.

Is this found in a different repository, or (better) would it be possible to bump it to one of the versions found on central? The build succeeds against 3.0-alpha-2.

Could not locate leiningen/core/eval__init.class or leiningen/core/eval.clj on classpath

I installed kibit as suggested (using lein) and tried to run it:

$ lein kibit
Exception in thread "main" java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at jline.ConsoleRunner.main(ConsoleRunner.java:69)
Caused by: java.io.FileNotFoundException: Could not locate leiningen/core/eval__init.class or leiningen/core/eval.clj on classpath:  (kibit.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:5440)
    at clojure.lang.Compiler.eval(Compiler.java:5415)
    at clojure.lang.Compiler.load(Compiler.java:5857)
    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__4519.invoke(core.clj:4915)
    at clojure.core$load.doInvoke(core.clj:4914)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:4729)
    at clojure.core$load_lib.doInvoke(core.clj:4766)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.core$apply.invoke(core.clj:542)
    at clojure.core$load_libs.doInvoke(core.clj:4800)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:542)
    at clojure.core$require.doInvoke(core.clj:4881)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at leiningen.core$resolve_task.invoke(core.clj:208)
    at leiningen.core$apply_task.invoke(core.clj:258)
    at leiningen.core$_main.doInvoke(core.clj:329)
    at clojure.lang.RestFn.invoke(RestFn.java:410)
    at clojure.lang.AFn.applyToHelper(AFn.java:161)
    at clojure.lang.RestFn.applyTo(RestFn.java:132)
    at clojure.core$apply.invoke(core.clj:542)
    at leiningen.core$_main.invoke(core.clj:332)
    at user$eval42.invoke(NO_SOURCE_FILE:1)
    at clojure.lang.Compiler.eval(Compiler.java:5424)
    at clojure.lang.Compiler.eval(Compiler.java:5391)
    at clojure.core$eval.invoke(core.clj:2382)
    at clojure.main$eval_opt.invoke(main.clj:235)
    at clojure.main$initialize.invoke(main.clj:254)
    at clojure.main$script_opt.invoke(main.clj:270)
    at clojure.main$main.doInvoke(main.clj:354)
    at clojure.lang.RestFn.invoke(RestFn.java:457)
    at clojure.lang.Var.invoke(Var.java:377)
    at clojure.lang.AFn.applyToHelper(AFn.java:172)
    at clojure.lang.Var.applyTo(Var.java:482)
    at clojure.main.main(main.java:37)
    ... 5 more
Caused by: java.io.FileNotFoundException: Could not locate leiningen/core/eval__init.class or leiningen/core/eval.clj on classpath: 
    at clojure.lang.RT.load(RT.java:412)
    at clojure.lang.RT.load(RT.java:381)
    at clojure.core$load$fn__4519.invoke(core.clj:4915)
    at clojure.core$load.doInvoke(core.clj:4914)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at clojure.core$load_one.invoke(core.clj:4729)
    at clojure.core$load_lib.doInvoke(core.clj:4766)
    at clojure.lang.RestFn.applyTo(RestFn.java:142)
    at clojure.core$apply.invoke(core.clj:542)
    at clojure.core$load_libs.doInvoke(core.clj:4800)
    at clojure.lang.RestFn.applyTo(RestFn.java:137)
    at clojure.core$apply.invoke(core.clj:542)
    at clojure.core$require.doInvoke(core.clj:4881)
    at clojure.lang.RestFn.invoke(RestFn.java:408)
    at leiningen.kibit$eval46$loading__4414__auto____47.invoke(kibit.clj:1)
    at leiningen.kibit$eval46.invoke(kibit.clj:1)
    at clojure.lang.Compiler.eval(Compiler.java:5424)
    ... 44 more

Plugin Not Running When Java Test Fails

I have a Java, Scala, Clojure project and am using this plugin in that project. When running mvn test, if a Java or Scala test should fail, the Clojure tests never get ran.

Is this the intended behavior? I would think that the Clojure tests should be ran at the same time as the Java and Scala ones so ALL test failures can be reported at once. Whereas now, I have to fix the Java and Scala ones before seeing if I have failures in the Clojure code (or explicitly run `mvn clojure:test-with-junit).

Support m2e 1.1

https://jira.codehaus.org/browse/MOJO-1785

When using m-clojure-p in Eclipse with m2e you get a "Plugin execution not covered..." message from m2e. This is because it doesn't know whether to run these goals during incremental compilation or not. To enable this m2e needs a little help. I submitted a little patch to the m-less-p which you can see at the link above. They had to do some extra work but the patch has now been integrated.

Please would you consider doing this for m-clojure-p? I hope m-less-p will serve as a useful reference.

File interdependency problem

Tested with Maven 2.2.1. (clojure-maven-plugin 1.3.5 and also 1.3.2 just in case).

File some.clj

(ns example.some
(:use example.someother)
)

(defn helloworld )

File someother.clj:

(ns example.someother
(:use example.some)
)

(defn sample )

A compile error "Unable to resolve helloworld in this context" is produced. However, if the two defn's are switched places, the build completes successfully.

Leiningen works, there is no error happening there. But I am not sure how robust Leiningen is vs. clojure-maven-plugin and Maven in general in other scenarios.

Failed to execute goal com.theoryinpractise:clojure-maven-plugin

when compile my project and always get this error, any idea ?

[ERROR] Failed to execute goal com.theoryinpractise:clojure-maven-plugin:1.3.20:compile (compile-clojure) on project storm-core: Clojure failed. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.theoryinpractise:clojure-maven-plugin:1.3.20:compile (compile-clojure) on project storm-core: Clojure failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
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:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Clojure failed.
at com.theoryinpractise.clojure.AbstractClojureCompilerMojo.callClojureWith(AbstractClojureCompilerMojo.java:463)
at com.theoryinpractise.clojure.AbstractClojureCompilerMojo.callClojureWith(AbstractClojureCompilerMojo.java:379)
at com.theoryinpractise.clojure.AbstractClojureCompilerMojo.callClojureWith(AbstractClojureCompilerMojo.java:356)
at com.theoryinpractise.clojure.ClojureCompilerMojo.execute(ClojureCompilerMojo.java:40)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]

gendoc doesn't work with clojure 1.3

I thought it was time to give gendoc a whirl again.

I discovered the dependency on contrib.

I tried adding contrib-1.2.0 into the plugins dependencies - no dice - it ignored it.

I tried adding it to the build dependencies - it found it, but it didn't play nicely with my newer version of Clojure :

Caused by: java.lang.NoSuchMethodError: clojure.lang.Numbers.lt(II)Z

Is there a way to run gendoc on a 1.3 build without too much hassle ? If not, is there an ETA for its provision ?

thanks for the plugin, I use it all the time,

Jules

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.