It all depends how you invoke Jetty using the maven plugin. More details can
be found here here: http://www.mortbay.org/maven-plugin/index.html, but
basically:

1) mvn jetty:run will use the target/classes directory (./target/classes).
2) mvn jetty:run-war will use the war file directly under target
3) mvn jetty:run-exploded will use exploded web-app under target.
(./target/aclproject-1.0-SNAPSHOT and sub-directories including
WEB-INF/classes).

The directory ./target/work/ and sub directories is Jetty's temporary work
area. The directory ./target/war/work is used by the Maven war plugin to
handle overlays (see
http://maven.apache.org/plugins/maven-war-plugin/examples/war-overlay.html).
The target/classes directory is where the Maven compiler compiles classes
to.

The target directory is used by Maven as its work area. If you run mvn clean
it will be deleted, so as a rule I would advise you not to do any work in
the target area you mind losing. Also be aware that the jetty plugin runs
other tasks in the background, including compiling, building wars, etc. so
you may get some surprising results if you copy files across. Far better to
get Maven to do the dirty work for you ;-)!

Mike

On 4/30/07, Nathan Anderson <[EMAIL PROTECTED]> wrote:

I would guess it does, but I'm not sure.  Guess we'll have to wait until
someone else weighs in on this one.. :/

Nathan

----- Original Message -----
From: "nmall" <[EMAIL PROTECTED]>
To: [email protected]
Sent: Sunday, April 29, 2007 2:05:18 PM (GMT-0800) America/Los_Angeles
Subject: Re: [appfuse-user] classes directories


Nathan,

Thanks for clarifying.

Does Jetty WebClassLoader look in these directories for a certain class at
runtime. I am getting the following error stack when I am running my
webapp
and I have already put my application specific classes manually under each
of these directoires ( just to try it out) bu that didn't help resolving
this error. So where does it look? Thanks for your help.

java.lang.ClassNotFoundException:
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
       at java.security.AccessController.doPrivileged(Native Method)
       at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
       at
org.codehaus.classworlds.RealmClassLoader.loadClassDirect(
RealmClassLoader.java:195)
       at
org.codehaus.classworlds.DefaultClassRealm.loadClass(
DefaultClassRealm.java:255)
       at
org.codehaus.classworlds.DefaultClassRealm.loadClass(
DefaultClassRealm.java:274)
       at
org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java
:214)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
       at
org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(
WebAppClassLoader.java:358)
       at
org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(
WebAppClassLoader.java:320)
       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:164)





melinate wrote:
>
> Hi nmall,
>
> For the most part you can ignore everything in the "./target"
folder.  But
> to answer your question, the "./target" folder is used by maven to
build,
> test, extract .war files, create .war files, etc.  That is why you are
> finding many of the same classes in each of the folders you found.
>
> Nathan
>
>
> ----- Original Message -----
> From: "nmall" <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Sunday, April 29, 2007 1:43:54 PM (GMT-0800) America/Los_Angeles
> Subject: [appfuse-user] classes directories
>
>
> Hi,
>
>  When I create a basic struts archetype, I have all of the following
> classes
> directories. Pardon my ignorance, but what is the purpose of these
> directories since they seem to have the same content. Thanks for your
> clairification !
>
> ./target/aclproject-1.0-SNAPSHOT/WEB-INF/classes
> ./target/classes
> ./target/war/work/appfuse-struts-2.0-m4/WEB-INF/classes
> ./target/war/work/appfuse-web-common-2.0-m4/WEB-INF/classes
> ./target/work/webapp/WEB-INF/classes
>
> --
> View this message in context:
> http://www.nabble.com/classes-directories-tf3666715s2369.html#a10245297
> Sent from the AppFuse - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> 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]
>
>
>

--
View this message in context:
http://www.nabble.com/classes-directories-tf3666715s2369.html#a10245478
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
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