On Apr 12, 2009, at 10:35 AM, Paul Speed wrote:
Hans Dockter wrote:
On Apr 10, 2009, at 12:21 PM, PSpeed wrote:
Not sure if this is a known issue or not, though I did search
around a bit.
Section 15.3.1 of the user guide suggests a way to set the
pom.artifactId to
change the name of the archive that us used to generate the
pom.xml, etc..
The default value for the name of the pom.artifactId is based on
then name of its corresponding archive. To customize the
pom.artifactId value (and only the artifactId value), you can
assign it an explicit name (as shown in 15.3.1). This has no effect
on the name of the (local) archive. If you deploy to a Maven
repository, It has of course an effect on the remote archive name.
In multi-module builds, I find that the pom dependencies are using
the
directory (project) name instead.
The name of the artifactId is based on the name of the archive
which is by default based on the name of the project.
I was able to work around it in my settings.gradle file by
changing all of
my project names to match the artifactId and remapping the
directories.
That's kind of painful in the long run.
Wondering if I've missed something simple or if this is a bug or
something.
If you want to change the name of the archives (which of courses
changes also the name of the pomArtifactId), you can set the
defaultArchivesBaseName property within a project. See user's
guide, section 10.7, on how the names for archives are set.
Yeah, I played with all of that. I think I wasn't being very
clear... which is happening to me a lot lately. :)
Let's use the following directory structure:
myproject
settings.gradle
/foo
build.gradle
/bar
build.gradle
Now, let's say that "bar" depends on "foo". Now let's also say that
I've modified the pom.artifactId in both projects to be "myproject-
foo" and "myproject-bar" respectively.
foo's pom.xml gets generated with artifactId "myproject-foo". Good.
bar's pom.xml gets generated with artifactId "myproject-bar". Also
good.
The problem is that the "foo" dependency _in_ "bar" is using
artifactId "foo"... and so maven users trying to use "bar" will
never find it.
<dependency>
<groupId>mygroup</groupId>
<artifactId>foo</artifactId>
<version>1.0</version>
</dependency>
This is a bug. Could you file a Jira with fix for 0.6?
Thanks
- Hans
Thanks for your help.
-Paul
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
--
Hans Dockter
Gradle Project lead
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email