You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kenney Westerhof <fo...@neonics.com> on 2005/03/11 17:31:28 UTC

Subproject internal artifact dependencies

Hi,

I know there have been postings like this before, but I've never seen
a satisfying answer.

My project consists of several subprojects, each producing a jar artifact.
Some subprojects are dependent on other subprojects.

Until now i've been using the maven.jar.override mechanism to
specify the jar files produced by the subprojects, which works fine,
except its tedious and a bit awkward since all the information is
available in the project.xml files.

The only other way (that doesn't involve custom goals) to let subprojects
use other subprojects jars is using multiproject:install (or
artifact:install). However, this totally destroys up-to-date checks
with the sourcecode, so I'd still have to create custom goals.
Also I don't like 'installing' jars in my local repository while I'm
still developing.

Ideally I'd expect maven to use the overall project layout a bit better.
Since I specify the groupId and artifactId in a subproject, it should
be aware somehow that those artifacts are part of the current
'super-project'. The inter-project dependencies don't do what I'd like
them to; if a project depends on an artifact, it simply tries to download
it or find it in the local repository. I'd like it to use the 'project'
repository, and also see that in order for this project to compile,
the other project should produce the artifact first. This implicitly
creates a dependency on the sourcecode for the artifact it depends on.

Does anyone have a solution, preferrably one that does not involve
custom goals in maven.xml, or manually editing the root
project.properties, adding a jar override every time a new subproject is
added?

Or are there any plans to make a system like this work in maven?

Thanks in advance!

Greetings,

	Kenney

--
Kenney Westerhof

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Subproject internal artifact dependencies

Posted by Vincent Massol <vm...@pivolis.com>.
Actually, no, I can't because I don't know what it'll be...

I've heard words like "Unified Source Directory" but I don't know what it
means yet. I'm not following the m2 mailing list too closely yet (I'll
hopefully start this very soon now - I've wanted to do it for a while now).

But what I am sure of is that this need is taken care of in Maven2.

Maybe someone else can explain?

Thanks
-Vincent

> -----Original Message-----
> From: dan tran [mailto:dantran@gmail.com]
> Sent: samedi 12 mars 2005 20:10
> To: Maven Users List
> Subject: Re: Subproject internal artifact dependencies
> 
> Hi Vincent,
> 
> Could you elaborate on "better mechanism"?
> 
> -D
> 
> 
> On Fri, 11 Mar 2005 17:34:53 +0100, Vincent Massol <vm...@pivolis.com>
> wrote:
> > Hi Kenney,
> >
> > Publishing in your local repository is the only official solution for
> Maven
> > 1.x (apart from the jar override you mention). I didn't like it
> initially
> > too but I don't think it's that bad. What's important is that these
> internal
> > jars are not published to the outside world.
> >
> > Maven 2 will have some better mechanism to handle this.
> >
> > -Vincent
> >
> > > -----Original Message-----
> > > From: Kenney Westerhof [mailto:forge@neonics.com]
> > > Sent: vendredi 11 mars 2005 17:31
> > > To: users@maven.apache.org
> > > Subject: Subproject internal artifact dependencies
> > >
> > >
> > > Hi,
> > >
> > > I know there have been postings like this before, but I've never seen
> > > a satisfying answer.
> > >
> > > My project consists of several subprojects, each producing a jar
> artifact.
> > > Some subprojects are dependent on other subprojects.
> > >
> > > Until now i've been using the maven.jar.override mechanism to
> > > specify the jar files produced by the subprojects, which works fine,
> > > except its tedious and a bit awkward since all the information is
> > > available in the project.xml files.
> > >
> > > The only other way (that doesn't involve custom goals) to let
> subprojects
> > > use other subprojects jars is using multiproject:install (or
> > > artifact:install). However, this totally destroys up-to-date checks
> > > with the sourcecode, so I'd still have to create custom goals.
> > > Also I don't like 'installing' jars in my local repository while I'm
> > > still developing.
> > >
> > > Ideally I'd expect maven to use the overall project layout a bit
> better.
> > > Since I specify the groupId and artifactId in a subproject, it should
> > > be aware somehow that those artifacts are part of the current
> > > 'super-project'. The inter-project dependencies don't do what I'd like
> > > them to; if a project depends on an artifact, it simply tries to
> download
> > > it or find it in the local repository. I'd like it to use the
> 'project'
> > > repository, and also see that in order for this project to compile,
> > > the other project should produce the artifact first. This implicitly
> > > creates a dependency on the sourcecode for the artifact it depends on.
> > >
> > > Does anyone have a solution, preferrably one that does not involve
> > > custom goals in maven.xml, or manually editing the root
> > > project.properties, adding a jar override every time a new subproject
> is
> > > added?
> > >
> > > Or are there any plans to make a system like this work in maven?
> > >
> > > Thanks in advance!
> > >
> > > Greetings,
> > >
> > >       Kenney
> > >
> > > --
> > > Kenney Westerhof
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Subproject internal artifact dependencies

Posted by dan tran <da...@gmail.com>.
Hi Vincent,

Could you elaborate on "better mechanism"?

-D


On Fri, 11 Mar 2005 17:34:53 +0100, Vincent Massol <vm...@pivolis.com> wrote:
> Hi Kenney,
> 
> Publishing in your local repository is the only official solution for Maven
> 1.x (apart from the jar override you mention). I didn't like it initially
> too but I don't think it's that bad. What's important is that these internal
> jars are not published to the outside world.
> 
> Maven 2 will have some better mechanism to handle this.
> 
> -Vincent
> 
> > -----Original Message-----
> > From: Kenney Westerhof [mailto:forge@neonics.com]
> > Sent: vendredi 11 mars 2005 17:31
> > To: users@maven.apache.org
> > Subject: Subproject internal artifact dependencies
> >
> >
> > Hi,
> >
> > I know there have been postings like this before, but I've never seen
> > a satisfying answer.
> >
> > My project consists of several subprojects, each producing a jar artifact.
> > Some subprojects are dependent on other subprojects.
> >
> > Until now i've been using the maven.jar.override mechanism to
> > specify the jar files produced by the subprojects, which works fine,
> > except its tedious and a bit awkward since all the information is
> > available in the project.xml files.
> >
> > The only other way (that doesn't involve custom goals) to let subprojects
> > use other subprojects jars is using multiproject:install (or
> > artifact:install). However, this totally destroys up-to-date checks
> > with the sourcecode, so I'd still have to create custom goals.
> > Also I don't like 'installing' jars in my local repository while I'm
> > still developing.
> >
> > Ideally I'd expect maven to use the overall project layout a bit better.
> > Since I specify the groupId and artifactId in a subproject, it should
> > be aware somehow that those artifacts are part of the current
> > 'super-project'. The inter-project dependencies don't do what I'd like
> > them to; if a project depends on an artifact, it simply tries to download
> > it or find it in the local repository. I'd like it to use the 'project'
> > repository, and also see that in order for this project to compile,
> > the other project should produce the artifact first. This implicitly
> > creates a dependency on the sourcecode for the artifact it depends on.
> >
> > Does anyone have a solution, preferrably one that does not involve
> > custom goals in maven.xml, or manually editing the root
> > project.properties, adding a jar override every time a new subproject is
> > added?
> >
> > Or are there any plans to make a system like this work in maven?
> >
> > Thanks in advance!
> >
> > Greetings,
> >
> >       Kenney
> >
> > --
> > Kenney Westerhof
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Subproject internal artifact dependencies

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Kenney,

Publishing in your local repository is the only official solution for Maven
1.x (apart from the jar override you mention). I didn't like it initially
too but I don't think it's that bad. What's important is that these internal
jars are not published to the outside world.

Maven 2 will have some better mechanism to handle this.

-Vincent

> -----Original Message-----
> From: Kenney Westerhof [mailto:forge@neonics.com]
> Sent: vendredi 11 mars 2005 17:31
> To: users@maven.apache.org
> Subject: Subproject internal artifact dependencies
> 
> 
> Hi,
> 
> I know there have been postings like this before, but I've never seen
> a satisfying answer.
> 
> My project consists of several subprojects, each producing a jar artifact.
> Some subprojects are dependent on other subprojects.
> 
> Until now i've been using the maven.jar.override mechanism to
> specify the jar files produced by the subprojects, which works fine,
> except its tedious and a bit awkward since all the information is
> available in the project.xml files.
> 
> The only other way (that doesn't involve custom goals) to let subprojects
> use other subprojects jars is using multiproject:install (or
> artifact:install). However, this totally destroys up-to-date checks
> with the sourcecode, so I'd still have to create custom goals.
> Also I don't like 'installing' jars in my local repository while I'm
> still developing.
> 
> Ideally I'd expect maven to use the overall project layout a bit better.
> Since I specify the groupId and artifactId in a subproject, it should
> be aware somehow that those artifacts are part of the current
> 'super-project'. The inter-project dependencies don't do what I'd like
> them to; if a project depends on an artifact, it simply tries to download
> it or find it in the local repository. I'd like it to use the 'project'
> repository, and also see that in order for this project to compile,
> the other project should produce the artifact first. This implicitly
> creates a dependency on the sourcecode for the artifact it depends on.
> 
> Does anyone have a solution, preferrably one that does not involve
> custom goals in maven.xml, or manually editing the root
> project.properties, adding a jar override every time a new subproject is
> added?
> 
> Or are there any plans to make a system like this work in maven?
> 
> Thanks in advance!
> 
> Greetings,
> 
> 	Kenney
> 
> --
> Kenney Westerhof
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org