You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@gump.apache.org by Konstantin Kolinko <kn...@gmail.com> on 2011/04/03 08:23:14 UTC

Dependency on checkstyle.jar in tomcat-trunk-validate returns glob instead of actual name

Hi!

I am trying to troubleshoot the build of tomcat-trunk-validate
project, which currently fails.

Project metadata:
[1] http://svn.apache.org/repos/asf/gump/metadata/project/tomcat-trunk.xml

To successfully run the build, the full path to checkstyle.jar is needed.

The problem is that instead of the actual path to the jar file, the
build script gets what is
written in checkstyle project metadata: a glob pattern of the name.


The build fails: Build output, from [2]:
[[[
testexist:
     [echo] Testing  for
/srv/gump/public/workspace/checkstyle/target/checkstyle-*[0-9T].jar

downloadzip:
      [get] Getting:
http://downloads.sourceforge.net/checkstyle/checkstyle-5.3-bin.zip
      [get] To: /usr/share/java/file.zip
]]]

[2] http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-validate/gump_work/build_tomcat-trunk_tomcat-trunk-validate.html

The testexists target of the build file fails and the build goes on
trying to download the file (which it should not do).

[[[
  <target name="testexist">
    <echo message="Testing  for ${destfile}"/>
    <available file="${destfile}" property="exist"/>
  </target>
]]]


The dependency is specified as follows [1]:
[[[
 <project name="tomcat-trunk-validate">
    (...)
   <ant target="validate">
      <depend property="checkstyle.jar" project="checkstyle"/>
      (...)
   </ant>
    (...)
  </project>
]]]

Another project, tomcat-trunk-test in [1] uses
[[[
      <property name="checkstyle.jar" project="checkstyle"
         reference="jarpath" />
]]]
but it does not make any difference it resolves to the same
(...)/checkstyle-*[0-9T].jar pattern, as can be seen in [3].

[3] http://vmgump.apache.org/gump/public/tomcat-trunk/tomcat-trunk-test/details.html


According to the build output of checkstyle project [4], the actual
name should be:
    /srv/gump/public/workspace/checkstyle/target/checkstyle-5.3-SNAPSHOT.jar

[4] http://vmgump.apache.org/gump/public/checkstyle/checkstyle/gump_work/build_checkstyle_checkstyle.html


Why <depend property="checkstyle.jar" project="checkstyle"/> in an
<ant> builder does
not resolve to the full path to the actual jar file, but glob pattern
is returned instead?

Is there a way to get the actual name of the jar file?


Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Re: Dependency on checkstyle.jar in tomcat-trunk-validate returns glob instead of actual name

Posted by Stefan Bodewig <bo...@apache.org>.
On 2011-04-03, Konstantin Kolinko wrote:

> Why <depend property="checkstyle.jar" project="checkstyle"/> in an
> <ant> builder does not resolve to the full path to the actual jar
> file, but glob pattern is returned instead?

Looks like a Bug to me that so far has remained unnoticed.  And I'm not
sure how easy it would be to fix right now since properties are likely
resolved beforeGump even starts building and thus before it knows the
full jar name.

I'll look into it, but can't promise a quick solution.

As a workaround you could specify the full path explicitly using 

<property name="..." project="checkstyle"
          path="target/checkstyle-5.3-SNAPSHOT.jar"/>

with a separate <depend/> outside of your <ant/> tag.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org