ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Levi Cook" <lc...@gr.com>
Subject RE: problem with propertyfile task
Date Wed, 03 Oct 2001 23:03:01 GMT
Hi Erik,
 
In case it provides any insight, here's a slightly less terse
description of my setup-
 
For executing ant on a day to day basis, I point ANT_HOME at an
installed 1.4 binary distribution. On my system this resides in:
"~/tools/jakarta-ant-1.4/". For convenience, I also add "$ANT_HOME/bin"
to the end of my $PATH. Incidentaly, to get the "test" or
"run-single-test" targets to execute, I had to place junit.jar in
"$ANT_HOME/lib".
 
Now, when I'm ready to work on the source distribution of ant, I allow
cvs to create a new directory under my projects folder. This leaves me
with the following directory: "~/projects/jakarta-ant/". The cvs
commands I run, from my projects directory are:

		cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic
login
		password: anoncvs
		cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic
checkout jakarta-ant

 
When I'm ready to build ant, from its sources, I run:
ant -buildfile ~/projects/jakarta-ant/build.xml
 
After I've placed my mods in the source tree, I am then able to run the
command I sent you.
 
I'm sure others have more intelligent setups, but this works pretty well
for me.
 
Hope its useful,
Levi
 
FYI; I don't appear to be recieving anything from the ant-dev list.. A
such, I don't know if you're already on track with this... ignore this
message if necessary :)

	-----Original Message----- 
	From: Erik Hatcher 
	Sent: Wed 10/3/2001 5:17 PM 
	To: ant-dev 
	Cc: Levi Cook 
	Subject: Fw: problem with propertyfile task
	
	

	How are ant-dev folks building Ant and running test cases?   I'm
having some
	environment issues in trying what Levi has provided.
	
	Here's what I've got:
	
	    - Win2k
	    - c:\jakarta\jakarta-ant - this is where I've checked out
the
	ANT_14_BRANCH (is there a different branch I should be using?)
	    - I've run 'build' successfully.
	    - I get errors running 'ant' after running the build.
	
	I'm sure my environment variables aren't correct.   How do you
configure
	your environment to actually run Ant from the "development
environment"
	(i.e. directory structure straight from CVS)?   Do you set
ANT_HOME?  to
	where?
	
	Is this an RTFM and I'm just not reading the FM?  :)   If so,
point me there
	gently!
	
	I could certainly just copy the resultant .jar files to my
c:\ant directory,
	but that is where I want to keep the release version 1.4 for
primary usage,
	but when I'm modifying the source I'd like to keep everything
under my CVS
	accessible directory.
	
	Many thanks,
	    Erik
	
	
	
	----- Original Message -----
	From: "Levi Cook" <lcook@gr.com>
	To: <ant-user@jakarta.apache.org>; "ant-dev"
<ant-dev@jakarta.apache.org>
	Sent: Wednesday, October 03, 2001 9:51 AM
	Subject: RE: problem with propertyfile task
	
	
	In case its useful, here's a fledgling unit test for excercising
the
	PropertyFile task- You should only need to unzip it onto your
ant source
	distribution and invoke it with the commands below.
	
	%ANT_HOME%$ ant run-single-test
	
-Dtestcase=org.apache.tools.ant.taskdefs.optional.PropertyFileTest
	
	
	Presently, it only confirms the tasks ability to update existing
	properties, but I have more plans for it in the future.
Eventually, I'll
	get ambitious and implement a PropertyFile.load(InputStream)
method that
	doesn't ignore comments and whitespace..
	
	Regards,
	Levi Cook
	
	
	-----Original Message-----
	From: Erik Hatcher [mailto:jakarta-ant@ehatchersolutions.com]
	Sent: Wednesday, October 03, 2001 11:31 AM
	To: ant-user@jakarta.apache.org; ant-dev
	Subject: Re: problem with propertyfile task
	
	
	Chuck,
	
	This looks and smells just like a bug to me!  :)   I've tried it
out and
	was
	not able to use it in the manner you desire (with Ant 1.4).
There have
	been no changes in <propertyfile> from 1.3 to 1.4 - so that bug
has been
	there for a while.
	
	I'll file it in Bugzilla today, and attempt fixing it and
submitting a
	patch.   I'm copying ant-dev on this in case there is some known
	workaround
	and to alert them of the issue.
	
	    Erik
	
	
	----- Original Message -----
	From: <Chuck.Irvine@mail.sprint.com>
	To: <ant-user@jakarta.apache.org>
	Sent: Wednesday, October 03, 2001 8:55 AM
	Subject: RE: problem with propertyfile task
	
	
	> Hmm, maybe the functionality that I want doesn't exist. If the
	> property is not present (or not set), I want the property to
be added
	> with the default value. If the property is already in the
property
	> file (and it's value is not equal to the default), the value
should be
	
	> left unmodified. Is there a way to get this behavior?
	>
	> BTW I'm using ant 1.3 that comes with NetBeans. Does and 1.4
have
	> enhanced propertytype functionality and/or documentation?
	>
	> Thanks
	>
	> Chuck
	>
	> > -----Original Message-----
	> > From: jakarta-ant [mailto:jakarta-ant@ehatchersolutions.com]
	> > Sent: Wednesday, October 03, 2001 9:57 AM
	> > To: ant-user
	> > Cc: jakarta-ant
	> > Subject: Re: problem with propertyfile task
	> >
	> >
	> > Even though the documentation says that "value" is required
for the
	> > <entry> elements, its not 100% accurate.  It defaults int
values to
	> > 1.  Use 'value'
	> > to set the value, and use default to set a value if its not
	> > already set.
	> > This could probably be considered a bug, or at least is
	> > somewhat confusing.
	> > In your case you may want to use value and default,
depending
	> > on your needs.
	> >
	> >     Erik
	> >
	> >
	> > ----- Original Message -----
	> > From: <Chuck.Irvine@mail.sprint.com>
	> > To: <ant-user@jakarta.apache.org>
	> > Sent: Wednesday, October 03, 2001 7:46 AM
	> > Subject: help: problem with propertyfile task
	> >
	> >
	> > > I'm not able to get entry elements with default attributes
of the
	> > > optional propertyfile task to work correctly. For example,
and
	> > > entry element of:
	> > >
	> > > <entry key="CICS_TRANSACTION_GATEWAY_PORT"
default="2006"/>
	> > >
	> > > produces a property file entry of:
	> > >
	> > > CICS_TRANSACTION_GATEWAY_PORT=1  <--- expecting value of
2006 !?
	> > >
	> > > My complete propertyfile task and resulting property file
	> > are attached
	> > > below. Your help is greatly appreciated.
	> > >
	> > > Chuck
	> > >
	> > > ************************* propertyfile task
	> > > *************************************
	> > >
	> > > <propertyfile
	> > >
file="${classes.home}/com/sprint/fms/constants.properties">
	> > >      <entry key="CICS_TRANSACTION_GATEWAY_HOST"
	> > >             type="string"
	> > >     default="199.14.219.100"/>
	> > >      <entry key="CICS_TRANSACTION_GATEWAY_PORT"
default="2006"/>
	> > >      <entry key="CICS_SERVER_NAME" default="DA131"/>
	> > >      <entry key="CICS_PROGRAM_NAME" default="FHXM0P"/>
	> > >      <entry key="GetCktWfmList_MESSAGE_ID"
	> > value="GET-CKT-WFM-LIST"/>
	> > >      <entry key="GetCktWfmList_COPYBOOK_PREFIX"
value="FHXKC1"/>
	> > >      <entry key="GetCktWfmList_COPYBOOK_NAME"
value="FMFHXKC1"/>
	> > >      <entry key="GetCktWfmList_XSTL_STYLESHEET"
	> > >             value="GetCktWfmListStylesheet.xml"/>
	> > >      <entry key="GetFRPhysAssign_MESSAGE_ID"
	> > value="GET-FR-PHYS-ASGN"/>
	> > >      <entry key="GetFRPhysAssign_COPYBOOK_NAME"
value="FMFHXJC1"/>
	> > >      <entry key="GetFRPhysAssign_COPYBOOK_PREFIX"
value="FHXJC1"/>
	> > >      <entry key="GetFRPhysAssign_XSTL_STYLESHEET"
	> > >             value="GetFRPhysAssignStylesheet.xml"/>
	> > >      <entry key="UpdFRPhysAssign_MESSAGE_ID"
	> > value="UPD-FR-PHYS-ASGN"/>
	> > >      <entry key="UpdFRPhysAssign_COPYBOOK_NAME"
value="FMFHXJC1"/>
	> > >      <entry key="UpdFRPhysAssign_COPYBOOK_PREFIX"
value="FHXJC1"/>
	> > >      <entry key="UpdFRPhysAssign_XSTL_STYLESHEET"
	> > >             value="UpdFRPhysAssignStylesheet.xml"/>
	> > >      <entry key="LogonToFms_MESSAGE_ID"
value="LOGON-TO-FMS"/>
	> > >      <entry key="LogonToFms_COPYBOOK_PREFIX"
value="COMM06"/>
	> > >      <entry key="GENERIC_COPYBOOK_PREFIX" value="COMM06"/>
	> > >      <entry key="GENERIC_COPYBOOK_NAME" value="FMCOMM06"/>
	> > >      <entry key="GENERIC_XSTL_STYLESHEET"
	> > > value="GENERICStylesheet.xml"/>
	> > >    </propertyfile>
	> > >
	> > > ******************************** Generated property file
	> > > ****************************
	> > > #Tue Oct 02 21:03:42 CDT 2001
	> > >
UpdFRPhysAssign_XSTL_STYLESHEET=UpdFRPhysAssignStylesheet.xml
	> > > GetCktWfmList_COPYBOOK_NAME=FMFHXKC1
	> > > CICS_TRANSACTION_GATEWAY_PORT=1
CICS_TRANSACTION_GATEWAY_HOST=1
	> > > GetCktWfmList_MESSAGE_ID=GET-CKT-WFM-LIST
	> > > UpdFRPhysAssign_MESSAGE_ID=UPD-FR-PHYS-ASGN
	> > > GetCktWfmList_COPYBOOK_PREFIX=FHXKC1
	> > > GetFRPhysAssign_COPYBOOK_PREFIX=FHXJC1
	> > > GetFRPhysAssign_COPYBOOK_NAME=FMFHXJC1
	> > > GENERIC_COPYBOOK_PREFIX=COMM06
	> > > GetCktWfmList_XSTL_STYLESHEET=GetCktWfmListStylesheet.xml
	> > > LogonToFms_MESSAGE_ID=LOGON-TO-FMS
	> > > LogonToFms_COPYBOOK_PREFIX=COMM06
	> > >
GetFRPhysAssign_XSTL_STYLESHEET=GetFRPhysAssignStylesheet.xml
	> > > UpdFRPhysAssign_COPYBOOK_NAME=FMFHXJC1
	> > > GENERIC_XSTL_STYLESHEET=GENERICStylesheet.xml
	> > > GetFRPhysAssign_MESSAGE_ID=GET-FR-PHYS-ASGN
	> > > CICS_PROGRAM_NAME=1
	> > > GENERIC_COPYBOOK_NAME=FMCOMM06
	> > > UpdFRPhysAssign_COPYBOOK_PREFIX=FHXJC1
	> > > CICS_SERVER_NAME=1
	> > >
	> > >
	> >
	> >
	>
	>
	
	
	
	

Mime
View raw message