You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Rauf, Saleem" <Ra...@wamu.net> on 2003/11/09 09:10:27 UTC

NEWBEE Question

Hi
 
I am getting following error:
 
C:\mavensporty2g>maven
 __  __
|  \/  |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
|_|  |_\__,_|\_/\___|_||_|  v. 1.0-rc2-SNAPSHOT
Fatal Error [line 8, row 67]: The prefix "i" for element "i:ask" is not bound.
An XML error occurred parsing the file 'C:\mavensporty2g\maven.xml' plugin
org.xml.sax.SAXParseException: The prefix "i" for element "i:ask" 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:546)
        at org.apache.maven.cli.App.main(App.java:1113)
        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 "i" for element "i:ask" 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:546)
        at org.apache.maven.cli.App.main(App.java:1113)
        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: Sun Nov 09 02:06:20 CST 2003
 
Here is what my maven.xml file looks like:
 
<project xmlns:j="jelly:core"
  xmlns:m="maven"
  xmlns:u="jelly:util"
  xmlns:maven="jelly:maven" default ="myGoal">
  <goal name="myGoal">
    <echo>Hello Maven!</echo>
<!--    <ant inheritAll="false" antfile="my_project_1/build.xml" target="compile"/> -->
<i:ask question="Which thing are you using: This, Other? (t,o) "/>
<log:warn>User typed: '${interact.answer}'</log:warn>
<j:choose>
  <j:when test="${interact.answer.equalsIgnoreCase('t')}">
    <echo message="Using This"/>
  </j:when>
  <j:when test="${interact.answer == 'o'}">
    <echo message="Using Other"/>
  </j:when>
  <j:otherwise>
    <echo message="None chosen"/>
  </j:otherwise>
</j:choose>
  </goal>
 
 
</project>    
 

	 



Re: NEWBEE Question

Posted by Ben Walding <be...@walding.com>.
You need to declare the i: namespace in the same manner that the 
jelly:core and jelly:util tag libraries usage (via the namespace) is 
declared
i.e.

  xmlns:u="jelly:interactive"

or wherever the interactive tag lib comes from.

Rauf, Saleem wrote:

>Hi
> 
>I am getting following error:
> 
>C:\mavensporty2g>maven
> __  __
>|  \/  |__ _Apache__ ___
>| |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
>|_|  |_\__,_|\_/\___|_||_|  v. 1.0-rc2-SNAPSHOT
>Fatal Error [line 8, row 67]: The prefix "i" for element "i:ask" is not bound.
>An XML error occurred parsing the file 'C:\mavensporty2g\maven.xml' plugin
>org.xml.sax.SAXParseException: The prefix "i" for element "i:ask" 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:546)
>        at org.apache.maven.cli.App.main(App.java:1113)
>        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 "i" for element "i:ask" 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:546)
>        at org.apache.maven.cli.App.main(App.java:1113)
>        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: Sun Nov 09 02:06:20 CST 2003
> 
>Here is what my maven.xml file looks like:
> 
><project xmlns:j="jelly:core"
>  xmlns:m="maven"
>  xmlns:u="jelly:util"
>  xmlns:maven="jelly:maven" default ="myGoal">
>  <goal name="myGoal">
>    <echo>Hello Maven!</echo>
><!--    <ant inheritAll="false" antfile="my_project_1/build.xml" target="compile"/> -->
><i:ask question="Which thing are you using: This, Other? (t,o) "/>
><log:warn>User typed: '${interact.answer}'</log:warn>
><j:choose>
>  <j:when test="${interact.answer.equalsIgnoreCase('t')}">
>    <echo message="Using This"/>
>  </j:when>
>  <j:when test="${interact.answer == 'o'}">
>    <echo message="Using Other"/>
>  </j:when>
>  <j:otherwise>
>    <echo message="None chosen"/>
>  </j:otherwise>
></j:choose>
>  </goal>
> 
> 
></project>    
> 
>
>	 
>
>
>  
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>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: NEWBEE Question

Posted by di...@multitask.com.au.
"Rauf, Saleem" <Ra...@wamu.net> wrote on 09/11/2003 07:10:27 PM:

> Hi
> 
> I am getting following error:
> 
> C:\mavensporty2g>maven
>  __  __
> |  \/  |__ _Apache__ ___
> | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
> |_|  |_\__,_|\_/\___|_||_|  v. 1.0-rc2-SNAPSHOT
> Fatal Error [line 8, row 67]: The prefix "i" for element "i:ask" is not 
bound.
> An XML error occurred parsing the file 'C:\mavensporty2g\maven.xml' 
plugin
[snip]
> Total time: 2 seconds
> Finished at: Sun Nov 09 02:06:20 CST 2003
> 
> Here is what my maven.xml file looks like:
> 
> <project xmlns:j="jelly:core"
>   xmlns:m="maven"
>   xmlns:u="jelly:util"
>   xmlns:maven="jelly:maven" default ="myGoal">

You've declared the j:, m:, u:, and maven: namespaces.

>   <goal name="myGoal">
>     <echo>Hello Maven!</echo>
> <!--    <ant inheritAll="false" antfile="my_project_1/build.xml" 
> target="compile"/> -->
> <i:ask question="Which thing are you using: This, Other? (t,o) "/>

Where is the i: namespace declared above?

Go declare it.

> <log:warn>User typed: '${interact.answer}'</log:warn>
> <j:choose>
>   <j:when test="${interact.answer.equalsIgnoreCase('t')}">
>     <echo message="Using This"/>
>   </j:when>
>   <j:when test="${interact.answer == 'o'}">
>     <echo message="Using Other"/>
>   </j:when>
>   <j:otherwise>
>     <echo message="None chosen"/>
>   </j:otherwise>
> </j:choose>
>   </goal>
> 
> 
> </project> 
--
dIon Gillard, Multitask Consulting
Blog:      http://blogs.codehaus.org/people/dion/
Pub Key:http://blogs.codehaus.org/people/dion/public-key.asc




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