You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Vinny <xa...@gmail.com> on 2006/07/07 18:31:39 UTC

Maven 2.0.4's 'package' not copying contents or main resources to WEB-INF/classes

Hello,
I thought the standard behavior for 'package' would be to copy
all files from src/main/resources to WEB-INF/classes. The issue
I'm facing is with my spring applicationContext.xml file.  I want to make that
file available to both my tests and to be put into my webapp. I though
having it in
src/main/resources would solve that problem,  but it's not being
copied into the
webapp anywhere. Currently  I have to keep 2 copies. Is this the
expected behaivior?

-- 
Ghetto Java: http://www.ghettojava.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven 2.0.4's 'package' not copying contents or main resources to WEB-INF/classes

Posted by Vinny <xa...@gmail.com>.
Thanks,
Good to know.
I normally use 'mvn package'

On 7/8/06, Pete Marvin King <la...@gmail.com> wrote:
>
>    btw, just make sure you compile first before you invoke war:war or
> just use the package phase just to be sure.
>    if you invoke war:war, it will not automatically compile the source.
> see the war plugin documentation for
>    more details.
>
>
> Vinny wrote:
> > yes, it is set to war
> >
> > On 7/7/06, Mykel Alvis <my...@weirdness.com> wrote:
> >> Is  your packaging in the pom set to "war" instead of the default "jar"?
> >>
> >> On 7/7/06, Vinny <xa...@gmail.com> wrote:
> >> >
> >> > One additional datapoint: the files are being copied
> >> > to target/classes correctly just not to
> >> target/<webapp>/WEB-INF/classes
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Ghetto Java: http://www.ghettojava.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven 2.0.4's 'package' not copying contents or main resources to WEB-INF/classes

Posted by Pete Marvin King <la...@gmail.com>.
   btw, just make sure you compile first before you invoke war:war or
just use the package phase just to be sure.
   if you invoke war:war, it will not automatically compile the source.
see the war plugin documentation for
   more details. 
  

Vinny wrote:
> yes, it is set to war
>
> On 7/7/06, Mykel Alvis <my...@weirdness.com> wrote:
>> Is  your packaging in the pom set to "war" instead of the default "jar"?
>>
>> On 7/7/06, Vinny <xa...@gmail.com> wrote:
>> >
>> > One additional datapoint: the files are being copied
>> > to target/classes correctly just not to 
>> target/<webapp>/WEB-INF/classes
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven 2.0.4's 'package' not copying contents or main resources to WEB-INF/classes

Posted by Vinny <xa...@gmail.com>.
yes, it is set to war

On 7/7/06, Mykel Alvis <my...@weirdness.com> wrote:
> Is  your packaging in the pom set to "war" instead of the default "jar"?
>
> On 7/7/06, Vinny <xa...@gmail.com> wrote:
> >
> > One additional datapoint: the files are being copied
> > to target/classes correctly just not to  target/<webapp>/WEB-INF/classes

-- 
Ghetto Java: http://www.ghettojava.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven 2.0.4's 'package' not copying contents or main resources to WEB-INF/classes

Posted by Mykel Alvis <my...@weirdness.com>.
Is  your packaging in the pom set to "war" instead of the default "jar"?

On 7/7/06, Vinny <xa...@gmail.com> wrote:
>
> One additional datapoint: the files are being copied
> to target/classes correctly just not to  target/<webapp>/WEB-INF/classes
>
> On 7/7/06, Vinny <xa...@gmail.com> wrote:
> > Hello,
> > I thought the standard behavior for 'package' would be to copy
> > all files from src/main/resources to WEB-INF/classes. The issue
> > I'm facing is with my spring applicationContext.xml file.  I want to
> make that
> > file available to both my tests and to be put into my webapp. I though
> > having it in
> > src/main/resources would solve that problem,  but it's not being
> > copied into the
> > webapp anywhere. Currently  I have to keep 2 copies. Is this the
> > expected behaivior?
> >
> > --
> > Ghetto Java: http://www.ghettojava.com
> >
>
>
> --
> Ghetto Java: http://www.ghettojava.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 

Never wear anything that panics the cat. -- P. J. O'Rourke

Re: Maven 2.0.4's 'package' not copying contents or main resources to WEB-INF/classes

Posted by Stephen Duncan <st...@gmail.com>.
No, src/main/resources is the correct location.

-Stephen

On 7/7/06, Jesse McConnell <je...@gmail.com> wrote:
> pretty sure you want to put that stuff in src/main/webapp/WEB-INF/classes
>
> On 7/7/06, Vinny <xa...@gmail.com> wrote:
> > One additional datapoint: the files are being copied
> > to target/classes correctly just not to  target/<webapp>/WEB-INF/classes
> >
> > On 7/7/06, Vinny <xa...@gmail.com> wrote:
> > > Hello,
> > > I thought the standard behavior for 'package' would be to copy
> > > all files from src/main/resources to WEB-INF/classes. The issue
> > > I'm facing is with my spring applicationContext.xml file.  I want to make that
> > > file available to both my tests and to be put into my webapp. I though
> > > having it in
> > > src/main/resources would solve that problem,  but it's not being
> > > copied into the
> > > webapp anywhere. Currently  I have to keep 2 copies. Is this the
> > > expected behaivior?
> > >
> > > --
> > > Ghetto Java: http://www.ghettojava.com
> > >
> >
> >
> > --
> > Ghetto Java: http://www.ghettojava.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> --
> jesse mcconnell
> jesse.mcconnell@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Stephen Duncan Jr
www.stephenduncanjr.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven 2.0.4's 'package' not copying contents or main resources to WEB-INF/classes

Posted by dan tran <da...@gmail.com>.
It works for me, like the doc says.  Could it be that you are using an older
version of plugin?

-D




On 7/7/06, Vinny <xa...@gmail.com> wrote:
>
> yeah, that will work but the docs for the war plugin do say:
>
> "The default resource directory for all maven2 projects is
> src/main/resources which will end up in target/classes and in
> WEB-INF/classes in the war"
>
>
> http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html
>
> On 7/7/06, Jesse McConnell <je...@gmail.com> wrote:
> > pretty sure you want to put that stuff in
> src/main/webapp/WEB-INF/classes
> >
> > On 7/7/06, Vinny <xa...@gmail.com> wrote:
> > > One additional datapoint: the files are being copied
> > > to target/classes correctly just not
> to  target/<webapp>/WEB-INF/classes
> > >
> > > On 7/7/06, Vinny <xa...@gmail.com> wrote:
> > > > Hello,
> > > > I thought the standard behavior for 'package' would be to copy
> > > > all files from src/main/resources to WEB-INF/classes. The issue
> > > > I'm facing is with my spring applicationContext.xml file.  I want to
> make that
> > > > file available to both my tests and to be put into my webapp. I
> though
> > > > having it in
> > > > src/main/resources would solve that problem,  but it's not being
> > > > copied into the
> > > > webapp anywhere. Currently  I have to keep 2 copies. Is this the
> > > > expected behaivior?
> > > >
> > > > --
> > > > Ghetto Java: http://www.ghettojava.com
> > > >
> > >
> > >
> > > --
> > > Ghetto Java: http://www.ghettojava.com
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
> >
> > --
> > --
> > jesse mcconnell
> > jesse.mcconnell@gmail.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> Ghetto Java: http://www.ghettojava.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Maven 2.0.4's 'package' not copying contents or main resources to WEB-INF/classes

Posted by Vinny <xa...@gmail.com>.
yeah, that will work but the docs for the war plugin do say:

"The default resource directory for all maven2 projects is
src/main/resources which will end up in target/classes and in
WEB-INF/classes in the war"

http://maven.apache.org/plugins/maven-war-plugin/examples/adding-filtering-webresources.html

On 7/7/06, Jesse McConnell <je...@gmail.com> wrote:
> pretty sure you want to put that stuff in src/main/webapp/WEB-INF/classes
>
> On 7/7/06, Vinny <xa...@gmail.com> wrote:
> > One additional datapoint: the files are being copied
> > to target/classes correctly just not to  target/<webapp>/WEB-INF/classes
> >
> > On 7/7/06, Vinny <xa...@gmail.com> wrote:
> > > Hello,
> > > I thought the standard behavior for 'package' would be to copy
> > > all files from src/main/resources to WEB-INF/classes. The issue
> > > I'm facing is with my spring applicationContext.xml file.  I want to make that
> > > file available to both my tests and to be put into my webapp. I though
> > > having it in
> > > src/main/resources would solve that problem,  but it's not being
> > > copied into the
> > > webapp anywhere. Currently  I have to keep 2 copies. Is this the
> > > expected behaivior?
> > >
> > > --
> > > Ghetto Java: http://www.ghettojava.com
> > >
> >
> >
> > --
> > Ghetto Java: http://www.ghettojava.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> --
> jesse mcconnell
> jesse.mcconnell@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Ghetto Java: http://www.ghettojava.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven 2.0.4's 'package' not copying contents or main resources to WEB-INF/classes

Posted by Jesse McConnell <je...@gmail.com>.
pretty sure you want to put that stuff in src/main/webapp/WEB-INF/classes

On 7/7/06, Vinny <xa...@gmail.com> wrote:
> One additional datapoint: the files are being copied
> to target/classes correctly just not to  target/<webapp>/WEB-INF/classes
>
> On 7/7/06, Vinny <xa...@gmail.com> wrote:
> > Hello,
> > I thought the standard behavior for 'package' would be to copy
> > all files from src/main/resources to WEB-INF/classes. The issue
> > I'm facing is with my spring applicationContext.xml file.  I want to make that
> > file available to both my tests and to be put into my webapp. I though
> > having it in
> > src/main/resources would solve that problem,  but it's not being
> > copied into the
> > webapp anywhere. Currently  I have to keep 2 copies. Is this the
> > expected behaivior?
> >
> > --
> > Ghetto Java: http://www.ghettojava.com
> >
>
>
> --
> Ghetto Java: http://www.ghettojava.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
--
jesse mcconnell
jesse.mcconnell@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven 2.0.4's 'package' not copying contents or main resources to WEB-INF/classes

Posted by Vinny <xa...@gmail.com>.
One additional datapoint: the files are being copied
to target/classes correctly just not to  target/<webapp>/WEB-INF/classes

On 7/7/06, Vinny <xa...@gmail.com> wrote:
> Hello,
> I thought the standard behavior for 'package' would be to copy
> all files from src/main/resources to WEB-INF/classes. The issue
> I'm facing is with my spring applicationContext.xml file.  I want to make that
> file available to both my tests and to be put into my webapp. I though
> having it in
> src/main/resources would solve that problem,  but it's not being
> copied into the
> webapp anywhere. Currently  I have to keep 2 copies. Is this the
> expected behaivior?
>
> --
> Ghetto Java: http://www.ghettojava.com
>


-- 
Ghetto Java: http://www.ghettojava.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org