Hi,

1: it's a bug I've seen in JIRA but I don't remember.
2: I prefer adding the tlds to the jar under /META-INF -> only one artifact

Regards

Carlos Sanchez
A Coru�a, Spain

Oness Project
http://oness.sourceforge.net
 

> -----Original Message-----
> From: Marcin Maciukiewicz [mailto:[EMAIL PROTECTED] 
> Sent: Monday, August 02, 2004 10:56 AM
> To: [EMAIL PROTECTED]
> Subject: artifact for jsp taglib: bug? bad practice? or what?
> 
> Hello guys.
> 
> All is about taglib artifact created by my own.
> Good taglib has two parts: jar and tld
> Here is my recipe for artifact:
> goals jar:* - generates jar lib with tag impl.
> goals tld:* - created by me in maven.xml; those goals are for 
> generating (with xdoclet) and install in local repo the tld 
> files for my tags.
> 
> jar and tld files have that same groupId, artifactId and version (same
> project.xml) but they exists in local repo under different 
> types ("jars" 
> and "tlds" respectively).
> 
> PROBLEM:
> when I'm using this taglib in webapp project I have to declare
> 2 dependencies in project.xml.
> let's see example:
> 
> ...
> <dependecies>
>    <dependency>
>      <groupId>mytaglibs</groupId>
>      <artifactId>basic-taglib</artifactId>
>      <version>SNAPSHOT</version>
>      <type>jar</type>
>      <properties>
>        <war.bundle>true</war.bundle>
>      </properties>
>    </dependency>
>    <dependency>
>      <groupId>mytaglibs</groupId>
>      <artifactId>basic-taglib</artifactId>
>      <version>SNAPSHOT</version>
>      <type>tld</type>
>    </dependency>
> </dependecies>
> ...
> 
> because it seems that tld files are not placed automagically 
> by war:webapp in correct dir I've created postGoal for it.
> in postGoal I'm iterating over ${pom.dependencies} and when 
> dependency type is "tld" I'm copying it form local repo to 
> the correct dir in webapp structure.
> 
> and here we go... when two dependencies have that same 
> groupId,artifactId and version then the iterator over 
> ${pom.dependencies} gives me only one of them. (looks like 
> dependency type doesn't cause any diff between deps)
> 
> I had to change artifactId for tld - the only workaround that 
> I had in my head.
> 
> scenario tested on maven-1.0-rc3 and maven-1.0.
> 
> Question 1: Is described behaviour bug or not?
> Question 2: Is described case good practice or not? 
> (generating jar and tld from that same artifact) - creating 
> separate artifact for jar and for tld seems to me as problem, 
> because: a) tld is generated from sources with xdoclet, b) 
> I'd like to have that same artifactId and version for taglib 
> and tld - this will be easier to maintain for long term.
> 
> 
> Thanks
> while(true){System.out.println("Maven: Great idea, great job");}
> 
> --
> Marcin Maciukiewicz
> [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to