maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Ewins <Brian.Ew...@btinternet.com>
Subject Re: Cactus Plugin Issues again
Date Wed, 04 Dec 2002 14:46:55 GMT
Yup, I've been wondering about it too - I expected it to be looking up 
the dependency 'id' (from your project.xml) - because the only 
'getDependencyPath()' method in the code is on Project.java, and it 
seems to work that way. But this is also used as the prefix for the jar 
name, unless you specify 'jar'.

But where does this leave you if you want to specify a dependency on 
packages with multiple jars? e.g. tomcat 4.1.9 at ibibilio has 2 jars[1].

I have used:
     <dependency>
       <id>tomcat</id>
       <version>4.1.12</version>
       <jar>catalina-ant-4.1.12.jar</jar>
       <properties>
         <classloader>root</classloader>
       </properties>
     </dependency>
in my tomcat plugin. Now I reckon because this is the only thing from 
tomcat I use, that
       <classpath>
         <pathelement path="${plugin.getDependencyPath('catalina-ant')}"/>
       </classpath>
should work.

However, I can't see /at all/ how I would express a dependency on 
multiple tomcat jars, or add them to the classpath in this way. The use 
of 'pathelement path=' rather than 'pathelement location=' in all the 
plugins suggests that maven is /supposed/ to be able to support multiple 
jars in a dependency? The obvious syntax would be to add multiple <jar> 
entries in my dependency, but it seems not according to the schema 
definition. Maybe I should try that and see.

-Baz

[1] Actually I've never been certain if maven is agressively repackaging 
stuff, or things are just missing, because eg tomcat 4.1.12 consists of 
15 jars, not 2:
catalina-*.jar, tomcat-*.jar, servlets-*.jar (13 jars total) from its 
server/lib and jasper-*.jar (2 jars) from common/lib (I know the jasper 
and coyote libs are debatable these days). It might have been nicer if 
maven's repository used a structure like:
{product-id}/{version}/{artifact} instead of
{product-id}/{product-id}-{version}.jar
to more easily support multiple artifacts in a product - eg grabbing 
every artifact for that version at once - but I guess thats been 
discussed to death.

EPugh@upstate.com wrote:
> I had wondered about that as well, but it returns just "path" as well..  I
> am not sure about the whole getDependencyPath syntax.  I admittedly have not
> dug into the docs for it.  I tried it with junit as well, and it fails
> too...
> 
> Eric
> 
> -----Original Message-----
> From: Brian Ewins [mailto:Brian.Ewins@btinternet.com]
> Sent: Wednesday, December 04, 2002 8:28 AM
> To: Turbine Maven Users List
> Subject: Re: Cactus Plugin Issues again
> 
> 
> Shouldn't that be:
> <echo message="path${plugin.getDependencyPath('cactus')}"/>
> 
> EPugh@upstate.com wrote:
> 
>>Hi all,
>>
>>I saw some refactoring patches went in last night, but it seems that the
>>getDependencyPath still fails..  I am testing this by:
>>
>><echo message="path${plugin.getDependencyPath('cactus:cactus')}"/>
>>
>>And getting just "path"...
>>
>>I just want to confirm that other people are still getting the same
> 
> issues.
> 
>>I don't want to get too far ahead of my test cases while writing code!
>>
>>Eric
>>
>>-----Original Message-----
>>From: Jason van Zyl [mailto:jason@zenplex.com]
>>Sent: Tuesday, December 03, 2002 9:49 AM
>>To: Turbine Maven Users List
>>Subject: RE: Cactus Plugin Issues again
>>
>>
>>On Tue, 2002-12-03 at 09:36, EPugh@upstate.com wrote:
>>
>>
>>>Terrific..  If you have a fix, I'll be very happy to test it.  I looked
>>>around at some other plugin.getDependencyPath, and other ones fail as
>>
>>well,
>>
>>
>>>so it looks like it is larger then just the cactus plugin.
>>
>>
>>Yup, it is. I added a test last night but still won't pass yet. I'll
>>probably find it tonight.
>>
>>
>>
>>>Eric Pugh
>>>
>>>-----Original Message-----
>>>From: Jason van Zyl [mailto:jason@zenplex.com]
>>>Sent: Monday, December 02, 2002 9:41 PM
>>>To: Turbine Maven Users List
>>>Subject: RE: Cactus Plugin Issues again
>>>
>>>
>>>On Mon, 2002-12-02 at 19:16, EPugh@upstate.com wrote:
>>>
>>>
>>>>It seems that the plugin is not finding the path to the jars required...
>>>>
>>>>>From the plugin.jelly:
>>>>
>>>><echo message="file:${plugin.getDependencyPath('cactus:cactus')}"/>
>>>>   <!-- Copy Cactus jars -->
>>>>   <copy todir="${maven.cactus.build.dir}/${pom.id}/WEB-INF/lib"
>>>>     file="${plugin.getDependencyPath('cactus:cactus')}">
>>>>     
>>>>
>>>>I added the echo, and the file doesn't seem to exist, or can't be found,
>>>>hence the error..
>>>
>>>I'll take a peek, I'm sure it has to do with the refactoring I did. I'll
>>>add a test and fix it.
>>>
>>>
>>>
>>>>Eric Pugh
>>>>
>>>>
>>>>
>>>>-----Original Message-----
>>>>From: EPugh@upstate.com [mailto:EPugh@upstate.com]
>>>>Sent: Monday, December 02, 2002 7:02 PM
>>>>To: turbine-maven-user@jakarta.apache.org
>>>>Subject: Cactus Plugin Issues again
>>>>
>>>>
>>>>Hi all,
>>>>
>>>>Using a fresh CVS checkout from Maven, my cactus tests have started
>>>
>>>failing.
>>>
>>>
>>>>I am running cactus:webapp, and all the imports of the cactus classes
>>
>>are
>>
>>
>>>>failing.  Do I need to define the cactus jar's in my project.xml?  I
>>
>>don't
>>
>>
>>>>seem to remember having to do that before. 
>>>>
>>>>Here is my error:
>>>>   [unwar] Expanding: C:\portal\target\portal.war into
>>>>C:\portal\target\cactus\
>>>>portal
>>>>java:prepare-filesystem:
>>>>
>>>>java:compile:
>>>>
>>>>cactus:compile:
>>>>   [mkdir] Created dir: C:\portal\target\cactus\classes
>>>>   [javac] Compiling 1 source file to C:\portal\target\cactus\classes
>>>>   [javac] [ERROR]
>>>>C:\portal\src\test-cactus\com\upstate\customerservice\credit
>>>>cards\service\CactusTestJetspeedCreditCardTransactionService.java:63:
>>>
>>>cannot
>>>
>>>
>>>>res
>>>>olve symbol
>>>>   [javac] [ERROR] symbol  : class ServletTestCase
>>>>   [javac] [ERROR] location: package cactus
>>>>   [javac] [ERROR] import org.apache.cactus.ServletTestCase;
>>>>   [javac] [ERROR]                          ^
>>>>   [javac] [ERROR]
>>>>C:\portal\src\test-cactus\com\upstate\customerservice\credit
>>>>cards\service\CactusTestJetspeedCreditCardTransactionService.java:64:
>>>
>>>cannot
>>>
>>>
>>>>res
>>>>olve symbol
>>>>   [javac] [ERROR] symbol  : class WebRequest
>>>>   [javac] [ERROR] location: package cactus
>>>>   [javac] [ERROR] import org.apache.cactus.WebRequest;
>>>>   [javac] [ERROR]                          ^
>>>>   [javac] [ERROR]
>>>>C:\portal\src\test-cactus\com\upstate\customerservice\credit
>>>>cards\service\CactusTestJetspeedCreditCardTransactionService.java:83:
>>>
>>>cannot
>>>
>>>
>>>>res
>>>>olve symbol
>>>>   [javac] [ERROR] symbol  : class ServletTestCase
>>>>   [javac] [ERROR] location: class
>>>>com.upstate.customerservice.creditcards.serv
>>>>ice.CactusTestJetspeedCreditCardTransactionService
>>>>   [javac] [ERROR] public class
>>>>CactusTestJetspeedCreditCardTransactionService
>>>>extends ServletTestCase {
>>>>   [javac] [ERROR]
>>>>       ^
>>>>   [javac] [ERROR] Note:
>>>>C:\portal\src\test-cactus\com\upstate\customerservice\
>>>>creditcards\service\CactusTestJetspeedCreditCardTransactionService.java
>>>
>>>uses
>>>
>>>
>>>>or
>>>>overrides a deprecated API.
>>>>   [javac] [ERROR] Note: Recompile with -deprecation for details.
>>>>   [javac] [ERROR] 3 errors
>>>>
>>>>[ERROR] BUILD FAILED
>>>>[ERROR] Compile failed; see the compiler error output for details.
>>>>Total time:  4 seconds
>>>>
>>>>
>>>>C:\portal>
>>>>
>>>>
>>>>Thanks,
>>>>Eric Pugh
> 
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:turbine-maven-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:turbine-maven-user-help@jakarta.apache.org>
> 


Mime
View raw message