> -----Original Message-----
> From: Rafal Krzewski [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 08, 2003 10:41 AM
> To: Turbine Maven Users List
> Subject: Re: Dependency on ejb-jar
>
>
> Michal Maczka wrote:
> <snip>
>
> > As I understand (correct me if I am wrong):
> > If you use <jar>NAME-OF_YOUR_FILE</jar> file specified by
> this tag will be
> > searched in location jars/NAME-OF_YOUR_FILE
> > while ejb plugin installs them (correctly) in folder 'ejbs'.
>
> Nope. Look at the org.apache.maven.project.Dependency, line #241
> If you use <jar> it will be used as the file name, but it does not
> affect which diretory the file is searched in. Directory is determined
> in org.apache.maven.repository.AbstractArtifact lines #127,
> #135 & #143
> It depends on the <type> of the dependency.
> Going back to Dependency lines #249 & #254 you'll see the dependency
> <type> is used as the file extension when <jar> tag is not present.
> This is what causes your trouble in the first place.
>
I know. I already studied those source files. Thing is that even if I use
<jar> tag
it's just not working.
My POM in this place looks like this (I am hoping to remove <jar> tag soon.
That's why I keep some unnecessary information there)
<dependency>
<groupId>myprojectname</groupId>
<id>myprojectname+sequencegenerator</id>
<type>ejb</type>
<version>1.0.0</version>
<jar>myprojectname-sequencegenerator.jar</jar>
</dependency>
And this is not working. I start to feel that problem is somewhere else.
Maybe artifacts of type other that plain jars are not added to classpath?
Becouse it seems that artifact is located properly, but simply later
compilation fails becouse classes provided in my ejb-jar are not seen.
So maybe there is a matter to force maven to add ejb-jar to compilation
classpath? I have no idea how to make it and very liitle time
to serach for it...
[..]
> I see what you mean. I have a similar idea that chimes with
> the current
> way of handling things in maven. The following interface
> could be created:
>
> public interface ArtifactFactory
> {
> /**
> * @return an artifact instance of <code>null</code> if type not
> * supported.
> */
> public Artifact createArtifact(String type);
>
> public void registerFactory(ArtifactFactory factory);
> }
>
> the DefaultArtifactFactory would be changed to have a static
> getInstance() method, and non-static createArtifact method.
>
> This scheme of things would allow plugins (like EJB) plugin register
> artifact factories during initialization time. An Artifact instnace
> handles the details of directory/file naming so it provides most of
> the funcitonality you request above.
>
>
I personally don't subscribe to the point of view that classes like:
JarArtifact, JarArtifactFactories, EJBArrtifact should exists.
There is no need to multiply such entities, when it's just possible to make
is through
config file as I have proposed. It will just make it more powerful while it
will stay simple and more extendible.
There is set of common artifact properties which is already represented by
dedicated XML tags and other properties are
stored in <properties> section of POM e.g.
<dependency>
<id>domaintest</id>
<version>1.0.0</version>
<properties>
<ear.bundle.jar>true</ear.bundle.jar>
<war.manifest.classpath>true</war.manifest.classpath>
<ejb.manifest.classpath>true</ejb.manifest.classpath>
</properties>
</dependency>
So I think that just one Artifact class and one ArtifactFactory can do...
If artifact(s) has/will have some extra information this can be already
expressed and I see no need to differentiated artifacts by introducing
new classes.
> > 2. Multiple dependencies
> >
> > It will be nice if one can set dependency for group of
> files. Then it will
> > be possible to set dependencies for entire frameworks like
> struts-1.1b3
> > without a need of making it file by file.
>
> You are getting close to the dependency metadata subject that
> has caused
> some heated discussion lately... I'm not juping into it ATM :)
>
> R.
I know :)
regards (pozdrowienia :) )
Michal
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>