buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <>
Subject Re: Specify custom POM for uploading
Date Thu, 13 Jan 2011 17:44:41 GMT
On Thu, Jan 13, 2011 at 1:14 AM, Mathias <> wrote:

> In the definition of a Java-based sub project I can then do:
> package(:jar).pom.from create_pom(package(:jar), compile.dependencies)
> and the generated pom.xml is correctly being used.
> However, from a Scala-based sub project the same does not work.
> Firstly, the temporary pom.xml in the target sub directory is only created
> if it doesn't exist yet. For some reason in the Java-based sub project this
> is not the case.
> Secondly, the compile.dependencies array for Scala projects contains just a
> list of Strings (namely the file systems paths to the artifacts rather than
> actual artifact objects responding to "group", "id", etc.)
> Why is this the case?

Because compile.dependencies are not required to be artifacts.   Some of the
elements may be but not necessarily all of them.  Any code that processes
compile.dependencies must therefore take that into account.   The code can
easily filter out artifacts if desired by running the list through
Buildr.artifacts() and filtering based on "artifactness" (i.e., elements
that respond to :to_spec / :to_spec_hash)

Also: Do I really have to take the ugly way of generating a temporary
> pom.xml on the file system rather than using the XML builder to generate a
> string which can then be used as the pom content? For some reason
> "package(:jar).pom.content('...pom content...')" does not seem to work as
> expected....

Not that should not be necessary.  If you want to post code illustrating a
case that doesn't work, I'll be happy to review it.

(Of course closing issue BUILDR-486 would be even better... :)

Agreed.  It's high on my list but I'm in the last leg of a project crunch at
work so it will have to wait a little bit.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message