Skip to content

Commit

Permalink
Maven plugins are now supported by :pom-plugins to avoid name conflict
Browse files Browse the repository at this point in the history
with Leiningen :plugins vector. 

Added maven <configuration/> tag inside of plugin definition.

Added usecase of :pom-plugins in sample.project.clj
  • Loading branch information
dominikdz committed Sep 11, 2013
1 parent b1529ed commit bac42c7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions sample.project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,12 @@
;; Extensions here will be propagated to the pom but not used by Leiningen.
:extensions [[org.apache.maven.wagon/wagon-webdav "1.0-beta-2"]
[foo/bar-baz "1.0"]]

;; Plugins here will be propagated to the pom but not used by Leiningen.
:pom-plugins [[com.theoryinpractise/clojure-maven-plugin "1.3.13"
[:configuration [:sourceDirectories [:sourceDirectory "src"]]]]
[org.apache.tomcat.maven/tomcat7-maven-plugin "2.1"]]

;; Include <scm> tag in generated pom.xml file. All key/value pairs
;; appear exactly as configured. If absent, Leiningen will try to
;; use information from a .git directory.
Expand Down
5 changes: 3 additions & 2 deletions src/leiningen/pom.clj
Original file line number Diff line number Diff line change
Expand Up @@ -237,13 +237,14 @@
[:directory (:target-path project)]
[:outputDirectory (:compile-path project)]
[:plugins
(if-let [plugins (seq (:plugins project))]
(if-let [plugins (seq (:pom-plugins project))]
(for [[dep version configuration] plugins]
[:plugin
[:groupId (or (namespace dep) (name dep))]
[:artifactId (name dep)]
[:version version]
;place for maven configuration tag
;place for maven configuration tag
[:configuration configuration]
]
))

Expand Down

0 comments on commit bac42c7

Please sign in to comment.