No. There wasn't a misunderstanding. I did have the folder. This was a
workaround in my opinion. The war plugin should do this. I'm pretty sure
ant will copy empty folders as part of the war task. I'm not certain of
this though.

Personally, I think the war plugin is very incomplete. All is does is
copy a standard web-inf as is, puts any defined resources into the
web-inf/classes folder, and adds dependencies to the web-inf/lib folder.
In ant, I can specify other things that I want moved from one folder in
my source structure to the web-inf folder. 

Here is an example of what I mean:
        <war destfile="my.war" webxml="src/main/webapp/conf/web.xml">
                <webinf>
                        <fileset dir="src/main/scripts"/>
                </webinf>
        </war
In this example, anything that is in src/main/scripts would be included
in the war under web-inf. This kind of mechanism is missing from the war
plugin, or if it's not, then it's not documented clearly. 

Again, I'm not sure if this would have copied my empty folder, but it
would have copied my bin folder that contains my shell script files, and
I still could have used the mkdir command I used below. 

As far as building the rest of a webapp, for things like javascript,
images, css files, etc, I would like to have them in src/main/webapp/js,
etc, and then have them moved to the war's web-inf as they are above. As
of now, I have to have them in src/main/webapp/web-inf/js for them to be
war'd up properly.

How do the rest of you using this plugin feel? Any input from the
developers on your thoughts about this would be greatly appreciated as
well.

Thanks...

Frank Russo
Senior Developer
FX Alliance, LLC

> -----Original Message-----
> From: Brian E. Fox [mailto:[EMAIL PROTECTED] 
> Sent: Monday, December 19, 2005 6:42 PM
> To: Maven Users List
> Subject: RE: including empty directories in a war build
> 
> 
> Ah, I misunderstood you. I thought you already had the folder 
> but the war plugin was skipping the empty dirs. Glad you got 
> it working. 
> 
> -----Original Message-----
> From: Frank Russo [mailto:[EMAIL PROTECTED] 
> Sent: Monday, December 19, 2005 4:39 PM
> To: Maven Users List
> Subject: RE: including empty directories in a war build
> 
> I got it working using the antrun plugin as follows (not sure 
> if the best way, but it was the only way it worked):
>       <plugins>
>           <plugin>
>               <artifactId>maven-antrun-plugin</artifactId>
>               <executions>
>                   <execution>
>                       <phase>compile</phase>
>                       <configuration>
>                           <tasks>
>                               <mkdir
> dir="target/fxalladmin/WEB-INF/bigbrother"/>
>                           </tasks>
>                       </configuration>
>                       <goals>
>                           <goal>run</goal>
>                       </goals>
>                   </execution>
>               </executions>
>           </plugin>
>       </plugins>
> 
> Alternate solutions are welcome...
> 
> 
> Frank Russo
> Senior Developer
> FX Alliance, LLC
> 
> > -----Original Message-----
> > From: Brian E. Fox [mailto:[EMAIL PROTECTED]
> > Sent: Monday, December 19, 2005 4:10 PM
> > To: Maven Users List
> > Subject: RE: including empty directories in a war build
> > 
> > 
> > Bummer. I'm not sure how that would work without code changes then.
> > 
> > -----Original Message-----
> > From: Frank Russo [mailto:[EMAIL PROTECTED]
> > Sent: Monday, December 19, 2005 2:50 PM
> > To: Maven Users List
> > Subject: RE: including empty directories in a war build
> > 
> > I see where you meant. The includes element is for configuring a
> > resource. By doing that, if I could get it to work, that would 
> > automatically put it in web-inf/classes. All resources go into the 
> > web-inf/classes directory. I need it to go in web-inf.
> > 
> > Also, I tried a bunch of combinations with the includes 
> just to see if
> 
> > it would copy the empty folder, but it didn't work...
> > 
> > Frank Russo
> > Senior Developer
> > FX Alliance, LLC
> > 
> > > -----Original Message-----
> > > From: Frank Russo
> > > Sent: Monday, December 19, 2005 2:15 PM
> > > To: Maven Users List
> > > Subject: RE: including empty directories in a war build
> > > 
> > > 
> > > Do you mean for the <plugin> element in the pom? Just want
> > to clarify
> > > where you are suggesting this.
> > > 
> > > Thanks...
> > > 
> > > Frank Russo
> > > Senior Developer
> > > FX Alliance, LLC
> > > 
> > > > -----Original Message-----
> > > > From: Brian E. Fox [mailto:[EMAIL PROTECTED]
> > > > Sent: Monday, December 19, 2005 1:13 PM
> > > > To: Maven Users List
> > > > Subject: RE: including empty directories in a war build
> > > > 
> > > > 
> > > > Although hardly an expert, I have poked around in the war
> > plugin. It
> > 
> > > > uses the plexus directory scanner to gen a list of artifacts to
> > > > include. This is probably why it won't find empty
> > folders. You may
> > > > be able to override this using the includes/excludes
> > settings (note
> > > > that currently , separated lists don't work). (ie you
> > could add an
> > > > include to /foldername that you wanted to keep)
> > > > 
> > > > -----Original Message-----
> > > > From: Frank Russo [mailto:[EMAIL PROTECTED]
> > > > Sent: Monday, December 19, 2005 11:12 AM
> > > > To: Maven Users List
> > > > Subject: RE: including empty directories in a war build
> > > > 
> > > > It's an internal existing app. People who support it,
> > know why it's
> > > > there. A readme would just an added file to keep around 
> in source
> > > > control.
> > > > 
> > > > There has to be a way to do it without having a file. 
> This is very
> 
> > > > simple in ant. You just add a mkdir call to your task
> > prior to the
> > > > war command being called...
> > > > 
> > > > Frank Russo
> > > > Senior Developer
> > > > FX Alliance, LLC
> > > > 
> > > > > -----Original Message-----
> > > > > From: Jesse McConnell [mailto:[EMAIL PROTECTED]
> > > > > Sent: Monday, December 19, 2005 11:06 AM
> > > > > To: Maven Users List
> > > > > Subject: Re: including empty directories in a war build
> > > > > 
> > > > > 
> > > > > personally I would drop a README file in each directory
> > > and explain
> > > > > what that directory is doing there...it would help others
> > > > who stumble
> > > > > across the situation...
> > > > > 
> > > > > just a thought..
> > > > > 
> > > > > On 12/19/05, Frank Russo <[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > I'm creating a war file that will eventually be
> > > exploded into the
> > > > > > tomcat webapp directory. I have some shell script files
> > > that run
> > > > > > behind the scene's of my webapp. When the war is exploded,
> > > > > it needs to
> > > > > > have created a bin directory under the WEB-INF
> > directory of the
> > > > > > webapp. I haven't been able to figure out to do this with
> > > > > Maven. I'm
> > > > > > using 2.0.1. It seems to only include directories that
> > > have files.
> > > > > >
> > > > > > Is there a way to explicitly say to create an empty 
> directory?
> > > > > >
> > > > > > Thanks...
> > > > > >
> > > > > > Frank Russo
> > > > > > Senior Developer
> > > > > > FX Alliance, LLC
> > > > > > 900 Third Avenue, 3rd Floor
> > > > > > New York, NY 10022
> > > > > > 646.268.9949
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > 
> > > > > 
> > > > > --
> > > > > jesse mcconnell
> > > > > 
> > > > 
> > > > 
> > > 
> > 
> ---------------------------------------------------------------------
> > > > 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]
> > > > 
> > > > 
> > > 
> > > 
> > 
> ---------------------------------------------------------------------
> > > 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]
> > 
> > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > 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]
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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