Denis,
Are you sure that the <dependencies> element is a valid element for
the <container> element? Shouldn't it be a direct child of the <plugin>
element instead? Also, I'm not sure about the <location> element - I've
never seen that before on standard maven dependencies. I've seen and used
<systemPath> to specify the location for a jar that does *not* exist in
the local maven repo.
cheers
Jan
Denis McCarthy wrote:
> Hi,
> I'm trying to use the cargo-maven2-plugin with jetty (embedded). When I
> try to start my container (I'm starting it as part of my integration
> test phase, to run selenium tests) I'm getting a noclassdeffounderror on
> log4j. Here's part of the trace:
>
> No suitable Log constructor [Ljava.lang.Class;@9db992 for
> org.apache.commons.logging.impl.Log4JLogger (Caused by
> java.lang.NoClassDefFoundError: org/apache/log4j/Category))
>
> As you can see, commons-logging seems to be picked up alright, so at
> least some dependencies seem to be available to jetty.
>
>
> Here's the appropriate section of the config in my pom:
>
> <plugin>
> <groupId>org.codehaus.cargo</groupId>
> <artifactId>cargo-maven2-plugin</artifactId>
> <configuration>
> <wait>false</wait>
> <container>
> <containerId>jetty6x</containerId>
> <type>embedded</type>
> <dependencies>
> <dependency>
> <groupId>log4j</groupId>
> <artifactId>log4j</artifactId>
> <location>
> /home/dmccarthy/.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar
> </location>
> </dependency>
> </dependencies>
> </container>
> <configuration>
> .
> .
> .
>
> As you can see I tried to put the log4j explicitly in as a dependency
> for the jetty instance, but it didn't work. I suspect I'm doing
> something wrong. Does anyone know how I should get embedded jetty to add
> log4j to its classpath?
> Thanks
> Denis
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>
http://xircles.codehaus.org/manage_email>
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email