You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Charles Harvey III <ch...@alloy.com> on 2006/07/28 00:21:45 UTC
maven-war-plugin 2.0.1 not copying xml files
Hello.
I am trying to build a war with:
> mvn war:exploded
> mvn war:inplace
> mvn war:war
And, no matter how I configure it, only .properties files get copied from
my src/main/resources directory into the webapp/WEB-INF/classes/.
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0.1</version>
<configuration>
<webResources>
<resource>
<directory>src/main/resources</directory>
<targetPath>WEB-INF/classes</targetPath>
<filtering>true</filtering>
<includes>
<include>**/*</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
When I set it up this way, it copes all the files from src/main/resources
into the root directory of the webapp. If I don't have this <plugin>
declaration
(which I should not need because everything is in the default location),
only
.properties files are copied over.
Is there something I am doing wrong? When I put this config in, it says:
"Copy webapp webResources to
workspace\projectname\target\projectname-1.0" TWICE.
If I leave it out, I only see it once. It doesn't say it is copying it
to the
WEB-INF/classes directory.
Any help is much appreciated.
Charlie
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven-war-plugin 2.0.1 not copying xml files
Posted by Charles Harvey III <ch...@alloy.com>.
D'oh! Knew it was going to be something stupid like not reading
the instructions.
Thanks.
Charlie
Pete Marvin King said the following on 7/27/2006 9:08 PM:
> hello,
>
> the src/main/resources is handled by the resource plugin, by default the
> resource plugin copies the contents to
> target/classes. =) you need to explicitly invoke the compile phase
> before using the war goals.
>
> check the war plugin documentation for the details :
> http://maven.apache.org/plugins/maven-war-plugin/usage.html
>
>
> pete marvin
>
> Charles Harvey III wrote:
>
>> Hello.
>> I am trying to build a war with:
>>
>>
>>> mvn war:exploded
>>> mvn war:inplace
>>> mvn war:war
>>>
>> And, no matter how I configure it, only .properties files get copied from
>> my src/main/resources directory into the webapp/WEB-INF/classes/.
>>
>> <plugins>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-war-plugin</artifactId>
>> <version>2.0.1</version>
>> <configuration>
>> <webResources>
>> <resource>
>> <directory>src/main/resources</directory>
>> <targetPath>WEB-INF/classes</targetPath>
>> <filtering>true</filtering>
>> <includes>
>> <include>**/*</include>
>> </includes>
>> </resource>
>> </webResources>
>> </configuration>
>> </plugin>
>> </plugins>
>>
>> When I set it up this way, it copes all the files from src/main/resources
>> into the root directory of the webapp. If I don't have this <plugin>
>> declaration
>> (which I should not need because everything is in the default
>> location), only
>> .properties files are copied over.
>>
>> Is there something I am doing wrong? When I put this config in, it says:
>> "Copy webapp webResources to
>> workspace\projectname\target\projectname-1.0" TWICE.
>> If I leave it out, I only see it once. It doesn't say it is copying
>> it to the
>> WEB-INF/classes directory.
>>
>> Any help is much appreciated.
>>
>>
>> Charlie
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: maven-war-plugin 2.0.1 not copying xml files
Posted by Pete Marvin King <la...@gmail.com>.
hello,
the src/main/resources is handled by the resource plugin, by default the
resource plugin copies the contents to
target/classes. =) you need to explicitly invoke the compile phase
before using the war goals.
check the war plugin documentation for the details :
http://maven.apache.org/plugins/maven-war-plugin/usage.html
pete marvin
Charles Harvey III wrote:
> Hello.
> I am trying to build a war with:
>
> > mvn war:exploded
> > mvn war:inplace
> > mvn war:war
>
> And, no matter how I configure it, only .properties files get copied from
> my src/main/resources directory into the webapp/WEB-INF/classes/.
>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-war-plugin</artifactId>
> <version>2.0.1</version>
> <configuration>
> <webResources>
> <resource>
> <directory>src/main/resources</directory>
> <targetPath>WEB-INF/classes</targetPath>
> <filtering>true</filtering>
> <includes>
> <include>**/*</include>
> </includes>
> </resource>
> </webResources>
> </configuration>
> </plugin>
> </plugins>
>
> When I set it up this way, it copes all the files from src/main/resources
> into the root directory of the webapp. If I don't have this <plugin>
> declaration
> (which I should not need because everything is in the default
> location), only
> .properties files are copied over.
>
> Is there something I am doing wrong? When I put this config in, it says:
> "Copy webapp webResources to
> workspace\projectname\target\projectname-1.0" TWICE.
> If I leave it out, I only see it once. It doesn't say it is copying
> it to the
> WEB-INF/classes directory.
>
> Any help is much appreciated.
>
>
> Charlie
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org