You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Arpita Chattopadhyay <c_...@yahoo.com> on 2001/09/18 21:37:32 UTC

Ant 1.4 question with usage in JBoss

I am trying to run the existing example "interest" of JBoss. I am running JBoss2.4 and Ant1.4 on windows 2000 platform. I tested both application, they work fine. But when I try to build the "interest" example I get an exception. the following was received when debug is set to on.

Setting ro project property: ant.file -> C:\jb_tom\jboss2_4\jboss\examples\build
\build.xml
parsing buildfile C:\jb_tom\jboss2_4\jboss\examples\build\build.xml with URI = f
ile:C:/jb_tom/jboss2_4/jboss/examples/build/build.xml
Setting ro project property: ant.project.name -> CMP
Adding reference: CMP -> org.apache.tools.ant.Project@8b819f
Setting project property: basedir -> C:\jb_tom\jboss2_4\jboss\examples
Project base dir set to: C:\jb_tom\jboss2_4\jboss\examples
   +Task: property

BUILD FAILED

C:\jb_tom\jboss2_4\jboss\examples\build\build.xml:16: You must specify value, lo
cation or refid with the name attribute
        at org.apache.tools.ant.taskdefs.Property.execute(Property.java:165)
        at org.apache.tools.ant.ProjectHelper$TaskHandler.finished(ProjectHelper
.java:489)
        at org.apache.tools.ant.ProjectHelper$AbstractHandler.endElement(Project
Helper.java:204)
        at org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java
:347)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1525)
        at org.apache.crimson.parser.Parser2.content(Parser2.java:1768)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1496)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)

        at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)

        at javax.xml.parsers.SAXParser.parse(SAXParser.java:326)
        at org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java:117)
        at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.jav
a:85)
        at org.apache.tools.ant.Main.runBuild(Main.java:442)
        at org.apache.tools.ant.Main.start(Main.java:153)
        at org.apache.tools.ant.Main.main(Main.java:176)

--------------------------------------------------

Can anyone advise as to what is wrong with the build.xml. 

Thank you

AC



---------------------------------
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information inYahoo! News.

Re: Ant 1.4 question with usage in JBoss

Posted by T Master <tm...@iknowledgeinc.com>.
You seem to have a  refid=  with no value.  My first guess.

RefIds are using to refer to a previously declared patternset or path.

do a search in your build.xml file for "refid".

It should have a value assigned.

T Master

----- Original Message -----
From: "Arpita Chattopadhyay" <c_...@yahoo.com>
To: <an...@jakarta.apache.org>
Sent: Tuesday, September 18, 2001 4:00 PM
Subject: Re: Ant 1.4 question with usage in JBoss


>
> Hi Diane,
>
> do you know anything about this exception below ?
>
> C:\jb_tom\jboss2_4\jboss\examples\build>ant intro-interest-compile
> Buildfile: build.xml
>
> BUILD FAILED
> C:\jb_tom\jboss2_4\jboss\examples\build\build.xml:16: You must specify
value, lo
> cation or refid with the name attribute
> Thank you for your help
> AC



Re: Ant 1.4 question with usage in JBoss

Posted by jp Morgan <jp...@yahoo.com>.
IT WORKED !!!!

--- Diane Holt <ho...@yahoo.com> wrote:
> --- jp Morgan <jp...@yahoo.com> wrote:
> > I had problem with the same exception. But when I
> > changed line 16 to the following line everything
> > worked. I just added the value attribute.
> > 
> >  <property name="env" environment="env"
> value="env" />
> 
> That's not the right solution, and probably
> shouldn't really work
> (although it does save typing another <property>
> task :) What you've done
> in the above is to both load your environment
> variables in as properties
> that are prefixed with "env" (eg., you'd reference
> your HOME environment
> variable as ${env.HOME}), as well as to set an
> actual property called
> "env" to the value "env".  (Guess we need to decide
> whether it's okay to
> allow a single <property> task to both set a
> property and load in the
> environment vars or to beef up the error-checking
> for <property>.)
> 
> Diane
> 
> 
> =====
> (holtdl@yahoo.com)
> 
> 
> 
> __________________________________________________
> Terrorist Attacks on U.S. - How can you help?
> Donate cash, emergency relief information
>
http://dailynews.yahoo.com/fc/US/Emergency_Information/


__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

Re: Ant 1.4 question with usage in JBoss

Posted by Diane Holt <ho...@yahoo.com>.
--- jp Morgan <jp...@yahoo.com> wrote:
> I had problem with the same exception. But when I
> changed line 16 to the following line everything
> worked. I just added the value attribute.
> 
>  <property name="env" environment="env" value="env" />

That's not the right solution, and probably shouldn't really work
(although it does save typing another <property> task :) What you've done
in the above is to both load your environment variables in as properties
that are prefixed with "env" (eg., you'd reference your HOME environment
variable as ${env.HOME}), as well as to set an actual property called
"env" to the value "env".  (Guess we need to decide whether it's okay to
allow a single <property> task to both set a property and load in the
environment vars or to beef up the error-checking for <property>.)

Diane


=====
(holtdl@yahoo.com)



__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

Re: Ant 1.4 question with usage in JBoss

Posted by jp Morgan <jp...@yahoo.com>.
I had problem with the same exception. But when I
changed line 16 to the following line everything
worked. I just added the value attribute.


 <property name="env" environment="env" value="env" />




--- Diane Holt <ho...@yahoo.com> wrote:
> --- Arpita Chattopadhyay <c_...@yahoo.com> wrote:
> > do you know anything about this exception below ? 
> > 
> > C:\jb_tom\jboss2_4\jboss\examples\build>ant
> intro-interest-compile
> > Buildfile: build.xml
> > 
> > BUILD FAILED
> >
>
C:\jb_tom\jboss2_4\jboss\examples\build\build.xml:16:
> You must specify
> > value, location or refid with the name attribute
> 
> Ant prints that error when the <property> task is
> missing a "value",
> "location", or "refid" attribute to go with the
> "name" attribute. In other
> words, if there's a <property> task like:
> 
>   <property name="foo"/>
> 
> instead of like one of:
> 
>   <property name="foo" value="bar"/>
> or
>   <property name="foo"
> location="/usr/local/foofile"/>
> or
>   <property name="foo" refid="fooID"/>
> 
> I can't say why the build.xml file would have a
> broken <property>, or what
> the actual correction should be, since I don't know
> anything about the
> JBoss stuff or what the copy of the build.xml you
> have looks like.
> 
> Diane
> 
> =====
> (holtdl@yahoo.com)
> 
> 
> 
> __________________________________________________
> Terrorist Attacks on U.S. - How can you help?
> Donate cash, emergency relief information
>
http://dailynews.yahoo.com/fc/US/Emergency_Information/


__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

Re: Ant 1.4 question with usage in JBoss

Posted by Diane Holt <ho...@yahoo.com>.
--- Arpita Chattopadhyay <c_...@yahoo.com> wrote:
> do you know anything about this exception below ? 
> 
> C:\jb_tom\jboss2_4\jboss\examples\build>ant intro-interest-compile
> Buildfile: build.xml
> 
> BUILD FAILED
> C:\jb_tom\jboss2_4\jboss\examples\build\build.xml:16: You must specify
> value, location or refid with the name attribute

Ant prints that error when the <property> task is missing a "value",
"location", or "refid" attribute to go with the "name" attribute. In other
words, if there's a <property> task like:

  <property name="foo"/>

instead of like one of:

  <property name="foo" value="bar"/>
or
  <property name="foo" location="/usr/local/foofile"/>
or
  <property name="foo" refid="fooID"/>

I can't say why the build.xml file would have a broken <property>, or what
the actual correction should be, since I don't know anything about the
JBoss stuff or what the copy of the build.xml you have looks like.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

Re: Ant 1.4 question with usage in JBoss

Posted by Arpita Chattopadhyay <c_...@yahoo.com>.
Hi Diane,

do you know anything about this exception below ? 

C:\jb_tom\jboss2_4\jboss\examples\build>ant intro-interest-compile
Buildfile: build.xml

BUILD FAILED
C:\jb_tom\jboss2_4\jboss\examples\build\build.xml:16: You must specify value, lo
cation or refid with the name attribute
Thank you for your help
AC
  Diane Holt <ho...@yahoo.com> wrote: Off-hand I'd say there could be something wrong with your copy of it. I'm
not sure which build.xml it is, but I found one in the examples docs for
"interest", and ran with it (just to verify it parsed okay, since I knew
it wouldn't actually do anything beyond that). It parsed fine. The one I
tried is at:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/manual/src/examples/org/jboss/docs/interest/build.xml?rev=1.4&content-type=text/vnd.viewcvs-markup

If that's the one you have (not necessarily gotten from there), I'd
recommend checking your copy of the file and seeing if it got munged
somehow.

Diane

--- Arpita Chattopadhyay wrote:
> 
> I am trying to run the existing example "interest" of JBoss. I am
> running JBoss2.4 and Ant1.4 on windows 2000 platform. I tested both
> application, they work fine. But when I try to build the "interest"
> example I get an exception. the following was received when debug is set
> to on.
> 
> Setting ro project property: ant.file ->
> C:\jb_tom\jboss2_4\jboss\examples\build
> \build.xml
> parsing buildfile C:\jb_tom\jboss2_4\jboss\examples\build\build.xml with
> URI = f
> ile:C:/jb_tom/jboss2_4/jboss/examples/build/build.xml
> Setting ro project property: ant.project.name -> CMP
> Adding reference: CMP -> org.apache.tools.ant.Project@8b819f
> Setting project property: basedir -> C:\jb_tom\jboss2_4\jboss\examples
> Project base dir set to: C:\jb_tom\jboss2_4\jboss\examples
> +Task: property
> 
> BUILD FAILED
> 
> C:\jb_tom\jboss2_4\jboss\examples\build\build.xml:16: You must specify
> value, lo
> cation or refid with the name attribute
> at
> org.apache.tools.ant.taskdefs.Property.execute(Property.java:165)
> at
> org.apache.tools.ant.ProjectHelper$TaskHandler.finished(ProjectHelper
> .java:489)
> at
> org.apache.tools.ant.ProjectHelper$AbstractHandler.endElement(Project
> Helper.java:204)
> at
> org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java
> :347)
> at
> org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1525)
> at org.apache.crimson.parser.Parser2.content(Parser2.java:1768)
> at
> org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1496)
> at
> org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
> at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
> at
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
> 
> at
> org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
> 
> at javax.xml.parsers.SAXParser.parse(SAXParser.java:326)
> at
> org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java:117)
> at
> org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.jav
> a:85)
> at org.apache.tools.ant.Main.runBuild(Main.java:442)
> at org.apache.tools.ant.Main.start(Main.java:153)
> at org.apache.tools.ant.Main.main(Main.java:176)
> 
> --------------------------------------------------
> 
> Can anyone advise as to what is wrong with the build.xml. 
> 
> Thank you
> 
> AC
> 
> 
> 
> ---------------------------------
> Terrorist Attacks on U.S. - How can you help?
> Donate cash, emergency relief information inYahoo! News.


=====
(holtdl@yahoo.com)



__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/


---------------------------------
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information inYahoo! News.

Re: Ant 1.4 question with usage in JBoss

Posted by Diane Holt <ho...@yahoo.com>.
Off-hand I'd say there could be something wrong with your copy of it. I'm
not sure which build.xml it is, but I found one in the examples docs for
"interest", and ran with it (just to verify it parsed okay, since I knew
it wouldn't actually do anything beyond that). It parsed fine. The one I
tried is at:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/manual/src/examples/org/jboss/docs/interest/build.xml?rev=1.4&content-type=text/vnd.viewcvs-markup

If that's the one you have (not necessarily gotten from there), I'd
recommend checking your copy of the file and seeing if it got munged
somehow.

Diane

--- Arpita Chattopadhyay <c_...@yahoo.com> wrote:
> 
> I am trying to run the existing example "interest" of JBoss. I am
> running JBoss2.4 and Ant1.4 on windows 2000 platform. I tested both
> application, they work fine. But when I try to build the "interest"
> example I get an exception. the following was received when debug is set
> to on.
> 
> Setting ro project property: ant.file ->
> C:\jb_tom\jboss2_4\jboss\examples\build
> \build.xml
> parsing buildfile C:\jb_tom\jboss2_4\jboss\examples\build\build.xml with
> URI = f
> ile:C:/jb_tom/jboss2_4/jboss/examples/build/build.xml
> Setting ro project property: ant.project.name -> CMP
> Adding reference: CMP -> org.apache.tools.ant.Project@8b819f
> Setting project property: basedir -> C:\jb_tom\jboss2_4\jboss\examples
> Project base dir set to: C:\jb_tom\jboss2_4\jboss\examples
>    +Task: property
> 
> BUILD FAILED
> 
> C:\jb_tom\jboss2_4\jboss\examples\build\build.xml:16: You must specify
> value, lo
> cation or refid with the name attribute
>         at
> org.apache.tools.ant.taskdefs.Property.execute(Property.java:165)
>         at
> org.apache.tools.ant.ProjectHelper$TaskHandler.finished(ProjectHelper
> .java:489)
>         at
> org.apache.tools.ant.ProjectHelper$AbstractHandler.endElement(Project
> Helper.java:204)
>         at
> org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java
> :347)
>         at
> org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1525)
>         at org.apache.crimson.parser.Parser2.content(Parser2.java:1768)
>         at
> org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1496)
>         at
> org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
>         at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
>         at
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
> 
>         at
> org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
> 
>         at javax.xml.parsers.SAXParser.parse(SAXParser.java:326)
>         at
> org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java:117)
>         at
> org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.jav
> a:85)
>         at org.apache.tools.ant.Main.runBuild(Main.java:442)
>         at org.apache.tools.ant.Main.start(Main.java:153)
>         at org.apache.tools.ant.Main.main(Main.java:176)
> 
> --------------------------------------------------
> 
> Can anyone advise as to what is wrong with the build.xml. 
> 
> Thank you
> 
> AC
> 
> 
> 
> ---------------------------------
> Terrorist Attacks on U.S. - How can you help?
> Donate cash, emergency relief information inYahoo! News.


=====
(holtdl@yahoo.com)



__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/