Skip to content

ingesolvoll/lein-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lein-maven-plugin

Execute leiningen tasks from within maven. Uses leiningen as a library, no custom downloads.

Clojars Project

Usage

The plugin only has one goal, run. Its configuration, <command>, is the leiningen command line arguments.

<build>
    <plugins>
        <plugin>
            <groupId>ingesolvoll</groupId>
            <artifactId>lein-maven-plugin</artifactId>
            <version>1.0</version>
        
            <executions>
                <execution>
                    <id>compile-clojurescript</id>
                    <goals>
                        <goal>run</goal>
                    </goals>
                    <configuration>
                        <command>cljsbuild once min</command>
                    </configuration>
                    <phase>generate-resources</phase>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Limitations

The plugin implementation is simplistic for now, so there are some limitations. Those are:

  • No do. You can only use single lein plugins with args, like in the example.
  • No clean. You need to configure maven to do that.

Upcoming versions will hopefully remove these limitations.

Clojars

The plugin is hosted on clojars, so don't forget your repository definition!

<repositories>
    <repository>
        <id>clojars</id>
        <url>https://clojars.org/repo/</url>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
        <releases>
            <enabled>true</enabled>
        </releases>
    </repository>
</repositories>