You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Michal Maczka <mm...@interia.pl> on 2003/04/15 23:16:17 UTC

Artifact Factory -> question


> -----Original Message-----
> From: Jason van Zyl [mailto:jason@zenplex.com]
> Sent: Tuesday, April 15, 2003 3:38 PM
> To: dev@maven.apache.org
> Subject: Artifact Factory
>
>
> Hi Michal,
>
> If you wanted to take another whack at the artifact factory you'll
> probably want to code it in the form of an Avalon component. This is how
> it will be integrated into Maven. So you might want to familiarize
> yourself with Plexus as that's what we'll be using to run Maven.
>

I am looking maven-new source tree and trying to figure out how to integrate
my
ArtifactFactory with the new code. It seems to be very easy now!!

but still I have a bunch of open questions:

a) are we going to exchange one to one relation:
 Dependency  - Artifact -
   with one to many relation
List - Dependency (what type this list should have just java.util.List?)

I think that it is rather clear and obvious that single
dependency can be mapped to list of artifacts?

Am  I right?


ArtifactFactory then can look like this:

public interface ArtifactFactory
{
   public java.util.List createArtifacts(Dependency dependency);
}

There is only one tricky thing then (such switch will be invisible for other
classes then
ArtifactListBuilder)

How "JAR OVERRIDE" feature can look like then?
Maybe not to make to big steps I just should make it compatible with old
version
and not change this at all?


b) How to get things like MAVEN HOME and $basedir (of Project) inside of
plexus?

c) What is the way of reading the configuration file? Is Configurable
interface a way to go?
   (I don't think so as POMUnmarshaler is making it differently and probably
much faster)

Once I know the answers I hope I shall quickly rewrite my code and to make
it work with Plexus.
thanks in advance for any response!

Michal


----------------------------------------------------------------------
KLIKNIJ 2 razy TAK >>> http://link.interia.pl/f170d



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


RE: Artifact Factory -> question

Posted by "michal.maczka" <mi...@cqs.ch>.

> -----Original Message-----
> From: Jason van Zyl [mailto:jason@zenplex.com]
> Sent: Tuesday, April 15, 2003 11:57 PM
> To: Maven Developers List
> Subject: Re: Artifact Factory -> question
>
>
> On Tue, 2003-04-15 at 17:16, Michal Maczka wrote:
> > > -----Original Message-----
> > > From: Jason van Zyl [mailto:jason@zenplex.com]
> > > Sent: Tuesday, April 15, 2003 3:38 PM
> > > To: dev@maven.apache.org
> > > Subject: Artifact Factory
> > >
> > >
> > > Hi Michal,
> > >
> > > If you wanted to take another whack at the artifact factory you'll
> > > probably want to code it in the form of an Avalon component.
> This is how
> > > it will be integrated into Maven. So you might want to familiarize
> > > yourself with Plexus as that's what we'll be using to run Maven.
> > >
> >
> > I am looking maven-new source tree and trying to figure out how
> to integrate
> > my
> > ArtifactFactory with the new code. It seems to be very easy now!!
> >
> > but still I have a bunch of open questions:
> >
> > a) are we going to exchange one to one relation:
> >  Dependency  - Artifact -
> >    with one to many relation
> > List - Dependency (what type this list should have just java.util.List?)
> >
> > I think that it is rather clear and obvious that single
> > dependency can be mapped to list of artifacts?
> >
> > Am  I right?
>
> No, not the way I think of it. It's a 1:1 relation. If we want some
> something to signify a group of dependencies then that's a different
> thing all together. There is a dependency which is a rather abstract
> thing. A dependency while taking into consideration the local repo, JAR
> overrides, along with any future transformations, is an artifact -- the
> concrete thing.
>
> >
> > ArtifactFactory then can look like this:
> >
> > public interface ArtifactFactory
> > {
> >    public java.util.List createArtifacts(Dependency dependency);
> > }
>
> No ... are you thinking of transitive dependencies or trying to grab a
> group of dependencies say for a whole project?
>
> > There is only one tricky thing then (such switch will be
> invisible for other
> > classes then
> > ArtifactListBuilder)
> >
> > How "JAR OVERRIDE" feature can look like then?
> > Maybe not to make to big steps I just should make it compatible with old
> > version
> > and not change this at all?
>
> You can't do things like JAR override when you have a 1:m relation. At
> least not very easily.
>
> >
> > b) How to get things like MAVEN HOME and $basedir (of Project) inside of
> > plexus?
>
> There is a setMavenHome( home ) method in the model that is used to set
> the home.
>
> > c) What is the way of reading the configuration file? Is Configurable
> > interface a way to go?
>
> We will definitely be using the Configurable, and possibly the
> Parameterizable interfaces for configuration. If you're trying to make a
> component and test it look at the plexus-components for some examples on
> how you might setup a configuration. What you setup for a test is what
> the component entry will look like in the plexus.conf file.
>
> >    (I don't think so as POMUnmarshaler is making it differently
> and probably
> > much faster)
>
> The tests work for the new PomUnmarshaller and it uses the xpp3 xmlpull
> parser so it should perform well. At least a lot better than the
> betwixt/digester/beanutils/commons-collections combination.
>
> > Once I know the answers I hope I shall quickly rewrite my code
> and to make
> > it work with Plexus.
> > thanks in advance for any response!
>
> No problem. We're in IRC to if you want to chat:
>
> irc.werken.com:6667 #maven
>
> > Michal
> >
> >
> > ----------------------------------------------------------------------
> > KLIKNIJ 2 razy TAK >>> http://link.interia.pl/f170d
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> --
> jvz.
>
> Jason van Zyl
> jason@zenplex.com
> http://tambora.zenplex.org
>
> In short, man creates for himself a new religion of a rational
> and technical order to justify his work and to be justified in it.
>
>   -- Jacques Ellul, The Technological Society
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>


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


RE: Artifact Factory -> question

Posted by Jason van Zyl <ja...@zenplex.com>.
On Wed, 2003-04-16 at 06:44, michal.maczka wrote:
> Jason,
> 
> Yes I was thinking about both. Specially of the second type dependicies.
> 
> I have alredy much better idea how to do this and I completly agree
> that 1:1 realation is just sufficient .. but still will try 
> to hide this fact in API in case we change our mind.
> 
> Once I am ready with 
> API proposition for ArtifactFactory I will send next post.
> 
> I guess that my work probably is overlappiing with yours,
> but anyway 

Nope, I haven't done anything in that respect after seeing your original
proposal. I certainly have a idea or two but I'll take whatever you whip
up and work with that. The artifact factory is all yours if you want it.

> regards
> 
> Michal
> 
> P.S.
> 
> Cannnot rather use IRC while travelling..
> BTW: Why IRC conversation are not any more logged?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
-- 
jvz.

Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


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


RE: Artifact Factory -> question

Posted by "michal.maczka" <mi...@cqs.ch>.
Jason,

> > 
> > ArtifactFactory then can look like this:
> > 
> > public interface ArtifactFactory
> > {
> >    public java.util.List createArtifacts(Dependency dependency);
> > }
> 
> No ... are you thinking of transitive dependencies or trying to grab a
> group of dependencies say for a whole project?
> 

Yes I was thinking about both. Specially of the second type dependicies.

I have alredy much better idea how to do this and I completly agree
that 1:1 realation is just sufficient .. but still will try 
to hide this fact in API in case we change our mind.

Once I am ready with 
API proposition for ArtifactFactory I will send next post.

I guess that my work probably is overlappiing with yours,
but anyway 

regards

Michal

P.S.

Cannnot rather use IRC while travelling..
BTW: Why IRC conversation are not any more logged?

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


Re: Artifact Factory -> question

Posted by Jason van Zyl <ja...@zenplex.com>.
On Tue, 2003-04-15 at 17:16, Michal Maczka wrote:
> > -----Original Message-----
> > From: Jason van Zyl [mailto:jason@zenplex.com]
> > Sent: Tuesday, April 15, 2003 3:38 PM
> > To: dev@maven.apache.org
> > Subject: Artifact Factory
> >
> >
> > Hi Michal,
> >
> > If you wanted to take another whack at the artifact factory you'll
> > probably want to code it in the form of an Avalon component. This is how
> > it will be integrated into Maven. So you might want to familiarize
> > yourself with Plexus as that's what we'll be using to run Maven.
> >
> 
> I am looking maven-new source tree and trying to figure out how to integrate
> my
> ArtifactFactory with the new code. It seems to be very easy now!!
> 
> but still I have a bunch of open questions:
> 
> a) are we going to exchange one to one relation:
>  Dependency  - Artifact -
>    with one to many relation
> List - Dependency (what type this list should have just java.util.List?)
> 
> I think that it is rather clear and obvious that single
> dependency can be mapped to list of artifacts?
> 
> Am  I right?

No, not the way I think of it. It's a 1:1 relation. If we want some
something to signify a group of dependencies then that's a different
thing all together. There is a dependency which is a rather abstract
thing. A dependency while taking into consideration the local repo, JAR
overrides, along with any future transformations, is an artifact -- the
concrete thing.

> 
> ArtifactFactory then can look like this:
> 
> public interface ArtifactFactory
> {
>    public java.util.List createArtifacts(Dependency dependency);
> }

No ... are you thinking of transitive dependencies or trying to grab a
group of dependencies say for a whole project?

> There is only one tricky thing then (such switch will be invisible for other
> classes then
> ArtifactListBuilder)
> 
> How "JAR OVERRIDE" feature can look like then?
> Maybe not to make to big steps I just should make it compatible with old
> version
> and not change this at all?

You can't do things like JAR override when you have a 1:m relation. At
least not very easily.

> 
> b) How to get things like MAVEN HOME and $basedir (of Project) inside of
> plexus?

There is a setMavenHome( home ) method in the model that is used to set
the home.

> c) What is the way of reading the configuration file? Is Configurable
> interface a way to go?

We will definitely be using the Configurable, and possibly the
Parameterizable interfaces for configuration. If you're trying to make a
component and test it look at the plexus-components for some examples on
how you might setup a configuration. What you setup for a test is what
the component entry will look like in the plexus.conf file.

>    (I don't think so as POMUnmarshaler is making it differently and probably
> much faster)

The tests work for the new PomUnmarshaller and it uses the xpp3 xmlpull
parser so it should perform well. At least a lot better than the
betwixt/digester/beanutils/commons-collections combination.

> Once I know the answers I hope I shall quickly rewrite my code and to make
> it work with Plexus.
> thanks in advance for any response!

No problem. We're in IRC to if you want to chat:

irc.werken.com:6667 #maven

> Michal
> 
> 
> ----------------------------------------------------------------------
> KLIKNIJ 2 razy TAK >>> http://link.interia.pl/f170d
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
-- 
jvz.

Jason van Zyl
jason@zenplex.com
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


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