Skip to content

Commit

Permalink
changed syntax of :pom-plugins definition for pom task
Browse files Browse the repository at this point in the history
1. support of [:configuration ... ] was removed
2. it was replaced with map which contains arbitrary XML definitions,
syntax is the same as in pom-additions

3. also added use case in pom-plugins
  • Loading branch information
dominikdz committed Oct 8, 2013
1 parent 6a6cece commit 08fbda6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
10 changes: 8 additions & 2 deletions sample.project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,15 @@
;; 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.
;; 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"]]]]
;; this section is optional, values have the same syntax as pom-addition
{:configuration [:sourceDirectories [:sourceDirectory "src"]]
:extensions "true"
:executions ([:execution [:id "echodir"]
[:goals ([:goal "run"])]
[:phase "verify"]])
}]
[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
Expand Down
15 changes: 7 additions & 8 deletions src/leiningen/pom.clj
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,13 @@
[:directory (:target-path project)]
[:outputDirectory (:compile-path project)]
[:plugins
(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
[:configuration configuration]
(if-let [plugins (seq (:pom-plugins project))]
(for [[dep version plugin-addition] plugins]
[:plugin
[:groupId (or (namespace dep) (name dep))]
[:artifactId (name dep)]
[:version version]
(if (map? plugin-addition) (seq plugin-addition))
]
))

Expand Down

0 comments on commit 08fbda6

Please sign in to comment.