You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by thomas2004 <th...@yahoo.de> on 2008/07/21 16:12:27 UTC
How to include the .xml file in WAR?
I use maven1.
In a package I have some .java files and an .xml file. After I run "maven
war:war" I got a WAR file. But in the package I see just the .class files,
no .xml file. How can I configue maven sothat the .xml will be included just
like the .class? I think I should write an own maven.xml. Correct? If yes,
how?
--
View this message in context: http://www.nabble.com/How-to-include-the-.xml-file-in-WAR--tp18569458p18569458.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to include the .xml file in WAR?
Posted by Dennis Lundberg <de...@apache.org>.
Have a look at the available properties for the Maven 1 War Plugin
http://maven.apache.org/maven-1.x/plugins/war/properties.html
thomas2004 wrote:
> I use maven1.
>
> In a package I have some .java files and an .xml file. After I run "maven
> war:war" I got a WAR file. But in the package I see just the .class files,
> no .xml file. How can I configue maven sothat the .xml will be included just
> like the .class? I think I should write an own maven.xml. Correct? If yes,
> how?
--
Dennis Lundberg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: How to include the .xml file in WAR?
Posted by Thomas Darbois <Th...@edifixio.com>.
You should read :
http://maven.apache.org/maven-1.x/maven.pdf
and
http://maven.apache.org/maven-1.x/plugins/war/ (especially http://maven.apache.org/maven-1.x/plugins/war/properties.html )
Tomas Darbois
Edifixio Grenoble - Projet ScorWare
04 76 29 89 27
thomas.darbois@edifixio.com
-----Message d'origine-----
De : thomas2004 [mailto:thomas2004ch@yahoo.de]
Envoyé : lundi 21 juillet 2008 16:12
À : users@maven.apache.org
Objet : How to include the .xml file in WAR?
I use maven1.
In a package I have some .java files and an .xml file. After I run "maven
war:war" I got a WAR file. But in the package I see just the .class files,
no .xml file. How can I configue maven sothat the .xml will be included just
like the .class? I think I should write an own maven.xml. Correct? If yes,
how?
--
View this message in context: http://www.nabble.com/How-to-include-the-.xml-file-in-WAR--tp18569458p18569458.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
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: How to include the .xml file in WAR?
Posted by thomas2004 <th...@yahoo.de>.
I've solved the problem right after I put my message here. And I try to
delete my message but seems I can't.
I simply put the following code in "project.xml" and this will include the
.xml files in the WAR.
...
<resource>
<directory>src/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
...
--
View this message in context: http://www.nabble.com/Re%3A-How-to-include-the-.xml-file-in-WAR--tp18569912p18571391.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to include the .xml file in WAR?
Posted by Dmitry Kudrenko <dm...@ardas.dp.ua>.
thomas2004 пишет:
> I use maven1.
>
> In a package I have some .java files and an .xml file. After I run "maven
> war:war" I got a WAR file. But in the package I see just the .class files,
> no .xml file. How can I configue maven sothat the .xml will be included just
> like the .class? I think I should write an own maven.xml. Correct? If yes,
> how?
>
Use the standard directory layout which is recomended by maven:
web/src/main/java - Standard location for application sources.
web/src/main/webapp - directory for locating Web application resources
such as HTML pages, JSPs, WEB-INF configuration files, etc.
web/src/main/resources- Standard location for application resources.
Refer to the following article for details:
http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
--
Dmitry Kudrenko
ARDAS group
http://www.ardas.dp.ua
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org