You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ni...@arsoe-trelaze.com on 2003/12/24 13:42:55 UTC

Réf. : error with war in Maven

In your maven.xml add the ant namespace : 
<project 
  xmlns:ant="jelly:ant">

Nicolas,





"Deepak Sable" <ds...@raftinternational.com>
24/12/2003 13:36
Veuillez répondre à "Maven Users List"

 
        Pour :  "Maven Users List" <us...@maven.apache.org>
        cc :    <sn...@kiala.com>
        Objet : error with  war in Maven



hi ,

I have created a .war file but i want it to be copied to the webapps 
directory .
but while doing it gives an error as below


C:\Radar>maven
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0-rc1-SNAPSHOT

Fatal Error [line 6, row 87]: The prefix "ant" for element "ant:copy" is 
not bound.
An XML error occurred parsing the file 'C:\Radar\maven.xml' plugin
org.xml.sax.SAXParseException: The prefix "ant" for element "ant:copy" is 
not bound.
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown 
Source)
        at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at 
org.apache.maven.plugin.PluginCacheManager.parse(PluginCacheManager.java:365)
        at 
org.apache.maven.plugin.PluginManager.loadJellyScript(PluginManager.java:481)
        at 
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:398)
        at 
org.apache.maven.MavenSession.attainGoals(MavenSession.java:348)
        at org.apache.maven.cli.App.doMain(App.java:543)
        at org.apache.maven.cli.App.main(App.java:1109)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.werken.forehead.Forehead.run(Forehead.java:551)
        at com.werken.forehead.Forehead.main(Forehead.java:581)
org.xml.sax.SAXParseException: The prefix "ant" for element "ant:copy" is 
not bound.
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown 
Source)
        at 
org.apache.commons.jelly.parser.XMLParser.parse(XMLParser.java:320)
        at 
org.apache.maven.jelly.JellyUtils.compileScript(JellyUtils.java:209)
        at 
org.apache.maven.jelly.JellyUtils.compileScript(JellyUtils.java:175)
        at 
org.apache.maven.jelly.JellyUtils.runScript(JellyUtils.java:112)
        at 
org.apache.maven.jelly.JellyUtils.runScript(JellyUtils.java:140)
        at 
org.apache.maven.plugin.PluginManager.loadJellyScript(PluginManager.java:491)
        at 
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:398)
        at 
org.apache.maven.MavenSession.attainGoals(MavenSession.java:348)
        at org.apache.maven.cli.App.doMain(App.java:543)
        at org.apache.maven.cli.App.main(App.java:1109)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.werken.forehead.Forehead.run(Forehead.java:551)
        at com.werken.forehead.Forehead.main(Forehead.java:581)
Total time: 2 seconds
Finished at: Wed Dec 24 17:27:14 GMT+05:30 2003

C:\Radar>


I am getting the above error beacuse I have added 

<goal name="war:install-local"> 
   <ant:copy file="target/Radar.war" toDir="C:\root\Apache Group\Tomcat 
4.1\webapps"/> 
</goal> 


in my maven.xml to move the copy of war.

------------------Imp -------------------
Also after  i copy the .war manually ...
 jsp  files are not included in the directory of webpps and in the .war 
file.
was wondering why am i not getting the jsp pages there.


Thanks in advance

Deepak

-----Original Message-----
From: Stephane Nicoll [mailto:snicoll@kiala.com]
Sent: Wednesday, December 24, 2003 5:11 PM
To: Maven Users List
Subject: RE: creatign war in Maven


Check the maven war plugin. 

in src creates a directory webapp/WEB-INF/ and put your web.xml in there.
Then type maven war and it will create your war. If you want to add
ressources or other libs, check the plugin documentation

(Well checking the plugin documentation would have given you all this 
without
asking)

http://maven.apache.org/reference/plugins/war/

(typing 'maven XXX plugin' in google is enough to get the XXX plugin's 
docs)

Regards,

Stephane


-----Original Message-----
From:            Deepak Sable [mailto:dsable@raftinternational.com]
Sent:            Wed 12/24/2003 10:39
To:              conradwt@runbox.com
Cc:              jeff@frenches.org; dion@multitask.com.au; 
mmaczka@interia.pl;
users@maven.apache.org; Neil.Blue@denovopharma.com
Subject:                 creatign war in Maven
hi ,

I want to build a war file from the project.

I have a porject called deepak 
c:\deepak 
so inside deepak a Target direcotry is create dby maven whcih creates all 
the
class and doc files.

Now i want to create a war file from this.

Help is needed

Thanks in advance



Deepak  Sable


---------------------------------------------------------------------
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