Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-2403

Buggy compile target in struts-blank's build.xml

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.2.4
    • 1.2 Family
    • Example Applications
    • None
    • Operating System: All
      Platform: PC
    • 34032

    Description

      I was wondering for months why running "ant compile" on the build.xml file that
      comes with struts-blank web application always results in total recompilation
      of the whole project regardless of file modification times etc.
      At last I get bored with this (on a slow machine and a moderate project this
      tirfle can become a real pain-in-the-ass) and decided to look more closely at
      this stuff.
      I found following task declaration in WEB-INF/src/build.xml of struts-blank.war
      (that's both for struts 1.1 and 1.2.4):

      <target name="compile" depends="prepare,resources">
      <javac srcdir="src" destdir="classes">
      <classpath refid="compile.classpath"/>
      </javac>
      </target>

      That would result in following ant debug output:

      [javac] java\app\AppInitServlet.java added as java/app/AppInitServlet.class
      doesn't exist.
      [javac] java\app\ConfigureAction.java added as
      java/app/ConfigureAction.class doesn't exist.

      However, if we write in the javac task srcdir="src/java", all goes pretty well.
      As far as I understand things, source hierarchy should reside under "src/java"
      directory, not "src".

      Didn't looked for other wars bundled with struts installationg though, it may
      be worth of an effort to check them as well.

      Attachments

        Activity

          People

            Unassigned Unassigned
            a-thor@yandex.ru Artie Konin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: