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 2013/11/16 02:46:53 UTC

[Bug 55785] New: Always show verison 1.9.0

https://issues.apache.org/bugzilla/show_bug.cgi?id=55785

            Bug ID: 55785
           Summary: Always show verison 1.9.0
           Product: Ant
           Version: 1.9.2
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Other
          Assignee: notifications@ant.apache.org
          Reporter: itjbl@sina.com

Hello everybody 


OS:centos 64bit

packet:apache-ant-1.9.2.tar.gz
1.tar -zxvf apache-ant-1.9.2.tar.gz
2.vi /etc/profie
3 export JAVA_HOME=/usr/software/jdk
  export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH
  export CLASSPATH=.:/usr/software/jdk/lib:/usr/software/jdk/jre/lib:$CLASSPATH
  export ANT_HOME=/usr/software/apache-ant-1.9.2
4 JAVA-VERSION is okay .
5.why when i execute ant -version always show version 1.9.0
 ./ant -version
Apache Ant(TM) version 1.9.0 compiled on March 5 2013

so who can help me fixed this issue. thanks.

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

[Bug 55785] Always show verison 1.9.0

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

--- Comment #1 from Stefan Bodewig <bo...@apache.org> ---
most likely what you see is a system installed version of Ant taking
precedence.

Try putting $ANT_HOME/bin at the front of your PATH.

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

[Bug 55785] Always show verison 1.9.0

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

--- Comment #5 from Stefan Bodewig <bo...@apache.org> ---
I'm sorry for the delay, but to be honest I have no idea.

Ant determines its own version by looking at a file located in ant.jar - you
can verify org/apache/tools/ant/version.txt inside your ant.jar (which is just
a ZIP file) actually contains 1.9.2.  I've just confirmed the tarball on the
ASF download server contains the proper version.

If you get any version other than that then it must be coming from a different
version of Ant loaded from somewhere on your system.

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

[Bug 55785] Always show verison 1.9.0

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

Antoine Levy-Lambert <an...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|1.9.2                       |1.9.3

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

[Bug 55785] Always show verison 1.9.0

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

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

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

--- Comment #8 from Stefan Bodewig <bo...@apache.org> ---
have you found time to run my suggestion?

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

[Bug 55785] Always show verison 1.9.0

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

--- Comment #4 from 金sir <it...@sina.com> ---
(In reply to Stefan Bodewig from comment #3)
> What does "which ant" say?
> 
> What happens if you run the Ant shell script explicitly
> 
> /usr/bin/apache-ant-1.9.2/bin/ant -version
> 
> Is there something about ant in /etc that might make Ant look for things in
> a different place?


[root@localhost bin]# pwd
/usr/bin/apache-ant-1.9.2/bin
[root@localhost bin]# ./ant -version
Apache Ant(TM) version 1.9.0 compiled on March 5 2013

this issue again,i had check about ll /etc  anyfiles didnt find with ant .
so bad.

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

[Bug 55785] Always show verison 1.9.0

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

Antoine Levy-Lambert <an...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|1.9.3                       |1.9.4

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

[Bug 55785] Always show verison 1.9.0

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

--- Comment #6 from Stefan Bodewig <bo...@apache.org> ---
Ah, yes, that may work:

stefanb@brick:/tmp$ cat version.xml 
<project>
  <whichresource property="versionloc"
                 resource="org/apache/tools/ant/version.txt"/>
  <echo>Version read from ${versionloc}</echo>
</project>
stefanb@brick:/tmp$ ant -f version.xml 
Buildfile: /tmp/version.xml
     [echo] Version read from
jar:file:/home/stefanb/dev/ASF/ant-core/trunk/bootstrap/lib/ant.jar!/org/apache/tools/ant/version.txt

BUILD SUCCESSFUL
Total time: 0 seconds

I.e. have Ant tell you where it reads its version from.

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

[Bug 55785] Always show verison 1.9.0

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

--- Comment #7 from Jan Mat <ja...@materne.de> ---
Created attachment 31093
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31093&action=edit
Sample Jar providing wrong version information

Loading wrong resources make me always think of classpath problems.
I did a small check:
- created a jar with wrong/old version information (attached)
- save that in the local dir
- set classpath=.
- run 'ant -version'

C:\temp\ant-55785_wrongVersion>ant -version
Apache Ant(TM) version WrongVersion compiled on Bug-55785


Have you checked your classpath settings?

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

[Bug 55785] Always show verison 1.9.0

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

--- Comment #2 from 金sir <it...@sina.com> ---
(In reply to Stefan Bodewig from comment #1)
> most likely what you see is a system installed version of Ant taking
> precedence.
> 
> Try putting $ANT_HOME/bin at the front of your PATH.



hello stefan

i had try you method but execute ant -version again.

export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$ANT_HOME
setup is not show current version 
this i execute find all about with ant files 
[root@localhost ~]# find / -name ant
/usr/bin/apache-ant-1.9.2/manual/api/org/apache/tools/ant
/usr/bin/apache-ant-1.9.2/bin/ant
/home/11/android_client/sdk/tools/ant
/home/11/android_client/sdk/tools/proguard/ant
/home/11/android_client/sdk/tools/proguard/examples/ant

could not find old version with ANT 1.9.0

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

[Bug 55785] Always show verison 1.9.0

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

--- Comment #3 from Stefan Bodewig <bo...@apache.org> ---
What does "which ant" say?

What happens if you run the Ant shell script explicitly

/usr/bin/apache-ant-1.9.2/bin/ant -version

Is there something about ant in /etc that might make Ant look for things in a
different place?

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