You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Adam Hardy <ad...@cyberspaceroad.com> on 2005/07/13 15:23:48 UTC
[m2] i18n .properties files in war
I have exhausted the mailing list archives and the documentation on the
website and I cannot see why my .properties file is not being included
in my war, since my pom.xml appears to be correct. The file is not
copied into the target directory nor is it included in the war file.
I see from the archives that other people appear to be managing this fine.
Here is my pom.xml (shortened):
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mystuff</groupId>
<artifactId>mystuff-web</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>........
</dependency>
</dependencies>
<build>
<finalName>mystuff-web</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>ApplicationResources.properties</include>
</includes>
</resource>
</resources>
</build>
</project>
I tried it with a targetPath element too, but with no joy either.
Thanks
Adam
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
[m1] Basic POM Question
Posted by Christian Schlaefcke <cs...@wms-network.de>.
Hi Folks,
I created a brandnew project and added it to the internal repo: maven
pom:install
I wonder how I get this POM out of the repo again for example when
starting from scratch on a different machine?
Hope this question isn�t to silly :-)
Thanks for any help & Regards
Re: [m2] i18n .properties files in war
Posted by Dennis Geurts <de...@gmail.com>.
maven 1.x maybe ??
I was fooled myself too when I started getting to know maven 2...
Dennis
On 7/13/05, Adam Hardy <ad...@cyberspaceroad.com> wrote:
>
> I don't know where I picked up the instruction to run war:war. I see
> it's not on the list of common lifecycle phases on the website.
>
> Rather misleadingly (obviously in my case) the output from war:war
> contains this:
>
> [INFO] [war:war]
> [INFO] Copy webapp resources to
> /home/adam/java/projects/garg-web/target/garg-web
>
>
> Hence the reason I thought my pom was wrong, since it was carrying out
> the webapp resources copy operation. The 'resources' mentioned here then
> do not include *.properties files - I wish it had been clearer. It may
> save future maven users a bit of pain by changing that 'resources' to
> something more explicit (if anyone reading this is in such a position).
>
>
> Thanks for the help,
>
> Adam
>
>
>
>
> Dennis Geurts on 13/07/05 15:09, wrote:
> > Hi Adam,
> > what's the command you supply ??
> > 'm2 war:war' or 'm2 package' (it should be the latter)
> > this might be a stupid question, but is the '
> > ApplicationResources.properties' file
> > located at the 'src/main/resources' location in yout project ?
> > Dennis
> >
> >
> > On 7/13/05, Adam Hardy <ad...@cyberspaceroad.com> wrote:
> >
> >>I have exhausted the mailing list archives and the documentation on the
> >>website and I cannot see why my .properties file is not being included
> >>in my war, since my pom.xml appears to be correct. The file is not
> >>copied into the target directory nor is it included in the war file.
> >>
> >>I see from the archives that other people appear to be managing this
> fine.
> >>
> >>Here is my pom.xml (shortened):
> >>
> >><?xml version="1.0" encoding="UTF-8"?>
> >><project xmlns="http://maven.apache.org/POM/4.0.0"
> >>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> >>maven-v4_0_0.xsd">
> >><modelVersion>4.0.0</modelVersion>
> >><groupId>com.mystuff</groupId>
> >><artifactId>mystuff-web</artifactId>
> >><packaging>war</packaging>
> >><version>1.0-SNAPSHOT</version>
> >><dependencies>
> >><dependency>........
> >></dependency>
> >></dependencies>
> >><build>
> >><finalName>mystuff-web</finalName>
> >><resources>
> >><resource>
> >><directory>src/main/resources</directory>
> >><includes>
> >><include>ApplicationResources.properties</include>
> >></includes>
> >></resource>
> >></resources>
> >></build>
> >></project>
> >>
> >>
> >>I tried it with a targetPath element too, but with no joy either.
> >>
> >>Thanks
> >>Adam
> >>
> >>---------------------------------------------------------------------
> >>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: [m2] i18n .properties files in war
Posted by Adam Hardy <ad...@cyberspaceroad.com>.
I don't know where I picked up the instruction to run war:war. I see
it's not on the list of common lifecycle phases on the website.
Rather misleadingly (obviously in my case) the output from war:war
contains this:
[INFO] [war:war]
[INFO] Copy webapp resources to
/home/adam/java/projects/garg-web/target/garg-web
Hence the reason I thought my pom was wrong, since it was carrying out
the webapp resources copy operation. The 'resources' mentioned here then
do not include *.properties files - I wish it had been clearer. It may
save future maven users a bit of pain by changing that 'resources' to
something more explicit (if anyone reading this is in such a position).
Thanks for the help,
Adam
Dennis Geurts on 13/07/05 15:09, wrote:
> Hi Adam,
> what's the command you supply ??
> 'm2 war:war' or 'm2 package' (it should be the latter)
> this might be a stupid question, but is the '
> ApplicationResources.properties' file
> located at the 'src/main/resources' location in yout project ?
> Dennis
>
>
> On 7/13/05, Adam Hardy <ad...@cyberspaceroad.com> wrote:
>
>>I have exhausted the mailing list archives and the documentation on the
>>website and I cannot see why my .properties file is not being included
>>in my war, since my pom.xml appears to be correct. The file is not
>>copied into the target directory nor is it included in the war file.
>>
>>I see from the archives that other people appear to be managing this fine.
>>
>>Here is my pom.xml (shortened):
>>
>><?xml version="1.0" encoding="UTF-8"?>
>><project xmlns="http://maven.apache.org/POM/4.0.0"
>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>>maven-v4_0_0.xsd">
>><modelVersion>4.0.0</modelVersion>
>><groupId>com.mystuff</groupId>
>><artifactId>mystuff-web</artifactId>
>><packaging>war</packaging>
>><version>1.0-SNAPSHOT</version>
>><dependencies>
>><dependency>........
>></dependency>
>></dependencies>
>><build>
>><finalName>mystuff-web</finalName>
>><resources>
>><resource>
>><directory>src/main/resources</directory>
>><includes>
>><include>ApplicationResources.properties</include>
>></includes>
>></resource>
>></resources>
>></build>
>></project>
>>
>>
>>I tried it with a targetPath element too, but with no joy either.
>>
>>Thanks
>>Adam
>>
>>---------------------------------------------------------------------
>>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: [m2] i18n .properties files in war
Posted by Dennis Geurts <de...@gmail.com>.
Hi Adam,
what's the command you supply ??
'm2 war:war' or 'm2 package' (it should be the latter)
this might be a stupid question, but is the '
ApplicationResources.properties' file
located at the 'src/main/resources' location in yout project ?
Dennis
On 7/13/05, Adam Hardy <ad...@cyberspaceroad.com> wrote:
>
> I have exhausted the mailing list archives and the documentation on the
> website and I cannot see why my .properties file is not being included
> in my war, since my pom.xml appears to be correct. The file is not
> copied into the target directory nor is it included in the war file.
>
> I see from the archives that other people appear to be managing this fine.
>
> Here is my pom.xml (shortened):
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> maven-v4_0_0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>com.mystuff</groupId>
> <artifactId>mystuff-web</artifactId>
> <packaging>war</packaging>
> <version>1.0-SNAPSHOT</version>
> <dependencies>
> <dependency>........
> </dependency>
> </dependencies>
> <build>
> <finalName>mystuff-web</finalName>
> <resources>
> <resource>
> <directory>src/main/resources</directory>
> <includes>
> <include>ApplicationResources.properties</include>
> </includes>
> </resource>
> </resources>
> </build>
> </project>
>
>
> I tried it with a targetPath element too, but with no joy either.
>
> Thanks
> Adam
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>