You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2017/08/17 20:37:31 UTC

[Bug 61442] New: echoproperties ant 1.6.1 vs ant 1.10.1

https://bz.apache.org/bugzilla/show_bug.cgi?id=61442

            Bug ID: 61442
           Summary: echoproperties ant 1.6.1 vs ant 1.10.1
           Product: Ant
           Version: 1.10.1
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
          Assignee: notifications@ant.apache.org
          Reporter: chandra.chekuri@here.com
  Target Milestone: ---

Created attachment 35248
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35248&action=edit
was unable to attach to files so both output from 1.6.1 and 1.10.1 are in this
files

we are migrating our ant version from 1.6.1 to 1.10.1 which was due since ages.

when we use ant 1.6.2 the following code generates file as shown in
echopropeties.txt ( in attachments) , and when we use ant 1.10.1  generates the
file as echopropeties.txt(in attachments).

The issue we are having is that in 1.10.1 it is writing the properties with
empty string into the .txt file(refer echopropeties_1_10_1.txt ), is there way
to omit these values in the destfile?

for example 
in .xml file 
     <ExcludedFeatureTypeList>
                               <ExcludedFeatureType></ExcludedFeatureType>
                               <ExcludedFeatureType></ExcludedFeatureType>
                               <ExcludedFeatureType></ExcludedFeatureType>
                               <ExcludedFeatureType></ExcludedFeatureType>
                                <ExcludedFeatureType></ExcludedFeatureType>
      </ExcludedFeatureTypeList>

in ant 1.6.2 , there was no entry in .txt file but in 1.10.1

ConversionSpec.ExcludedFeatureTypeList.ExcludedFeatureType=,,,,
ConversionSpec.Midpoint.SGMidpoint.MidpointInputFile=


<echoproperties destfile="echoproperties.txt" failonerror="false">
  <propertyset>
      <propertyref prefix="ProductSpec."/>
      <propertyref prefix="ConversionSpec."/>
      <propertyref prefix="ExtendedListingsSpec."/>
      <propertyref prefix="Has."/>
      <propertyref name="DATA_RELDATE"/>
      <propertyref name="VOICE_RELDATE"/>
      <propertyref name="UK_RELDATE"/>
      <propertyref name="CAN_RELDATE"/>
          <propertyref name="SGP_RELDATE"/>
          <propertyref name="BRA_RELDATE"/>
      <propertyref name="OracleServerHostName"/>
      <propertyref name="OracleDBInstance"/>
      <propertyref name="oracleNetServiceName"/>
      <propertyref name="rdfUserName"/>
      <propertyref name="rdfPassword"/>
      <propertyref name="xmobUserName"/>
      <propertyref name="xmobPassword"/>
      <propertyref name="xmobSID"/>
      <propertyref name="xmobUserNameSec"/>
      <propertyref name="xmobPasswordSec"/>
      <propertyref name="IS_CMOB"/>
      <propertyref name="ExcludedCIFeature"/>
      <propertyref name="ExcludedCIValue"/>
      <propertyref name="PublishDiscoverCities"/>
      <propertyref name="PublishXtdl"/>
      <propertyref name="Publish4WD"/>
      <propertyref name="PublishCityModels"/>
      <propertyref name="Publish3DJunctions"/>
      <propertyref name="PublishPriority"/>
          <propertyref name="AdminCountryInclude"/>       
          <propertyref name="AdminCountryExclude"/>               
    </propertyset>
</echoproperties>

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61442] echoproperties ant 1.6.1 vs ant 1.10.1

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61442

Stefan Bodewig <bo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #4 from Stefan Bodewig <bo...@apache.org> ---
is there anything we can do to resolve this?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61442] echoproperties ant 1.6.1 vs ant 1.10.1

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61442

--- Comment #2 from Chandra shekar r chekuri <ch...@here.com> ---
sorry for not being clear.

when i run using ant 1.6.1 , I do not see the properties which are empty .

but now when we are using ant 1.10.1 , we are seeing the properties which are
empty and thats causing our existing workflow to fail.

as shown in attachment the output of 1.6.1 and 1.10.1 

ConversionSpec.ExcludedFeatureTypeList.ExcludedFeatureType=,,,,

the above property was not echoed when used with 1.6.1

my question is there a option not to echo properties which are empty?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61442] echoproperties ant 1.6.1 vs ant 1.10.1

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61442

--- Comment #1 from Stefan Bodewig <bo...@apache.org> ---
I'm afraid I don't see what you describe - or misunderstand what you are saying

$ cat 61442.xml 
<project default="test">
  <property name="a" value=""/>
  <property name="b" value="x"/>
  <target name="test">
    <echoproperties>
      <propertyset>
        <propertyref name="ant.version"/>
        <propertyref name="a"/>
        <propertyref name="b"/>
        <propertyref name="c"/>
      </propertyset>
    </echoproperties>
  </target>
</project>

I echo ant.version just to be sure, a non-existent property with "c", a
property with an empty value with "a" and a "normal" property with "b". Here
are the results

$ /devel/ASF/apache-ant-1.6.1/bin/ant -f /tmp/61442.xml 
Buildfile: /tmp/61442.xml

test:
[echoproperties] #Ant properties
[echoproperties] #Fri Aug 18 15:57:22 CEST 2017
[echoproperties] b=x
[echoproperties] a=
[echoproperties] ant.version=Apache Ant version 1.6.1 compiled on February 12
2004

BUILD SUCCESSFUL
Total time: 0 seconds

$ ant -f /tmp/61442.xml 
Buildfile: /tmp/61442.xml

test:
[echoproperties] #Ant properties
[echoproperties] #Fri Aug 18 15:57:41 CEST 2017
[echoproperties] a=
[echoproperties] ant.version=Apache Ant(TM) version 1.10.2alpha compiled on
July 23 2017
[echoproperties] b=x

BUILD SUCCESSFUL
Total time: 0 seconds

As you can see 1.6.1 both seem to behave the same, both echo the property a
with an empty value and neither echoes anything for a non-existent property.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61442] echoproperties ant 1.6.1 vs ant 1.10.1

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61442

Chandra shekar r chekuri <ch...@here.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |chandra.chekuri@here.com

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61442] echoproperties ant 1.6.1 vs ant 1.10.1

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61442

--- Comment #3 from Stefan Bodewig <bo...@apache.org> ---
As I've shown I do see properties with empty values in 1.6.1 a well.

There must be something different going on in your case, can you create a small
self-contained example like the one I've shown that creates different results
for 1.6.1 and 1.10.1?

Similar to bug 61315 I suspect it is the way you set properties (and you don't
tell us how it happens).

Back in bug 61315 I suspected you'd use xmlproperty to read properties and bug
26286 could indeed explain why you see properties with empty values now that
you didn't see in 1.6.1. If this is the case then the properties simply don't
exist in your 1.6.1 build and the reason is not whether their values is empty.
So in this case we would simply be looking at the wrong task and we'd need to
talk about xmlproperty reading things rather than echoproperties writing
things.

-- 
You are receiving this mail because:
You are the assignee for the bug.