Bug 56988 - Allow to use relative paths in base.path setting when building Tomcat, e.g. "base.path=../libraries"
Summary: Allow to use relative paths in base.path setting when building Tomcat, e.g. "...
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Packaging (show other bugs)
Version: 7.0.55
Hardware: PC All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-17 12:27 UTC by Konstantin Kolinko
Modified: 2014-10-18 11:26 UTC (History)
0 users



Attachments
2014-09-22_tc6_56988.patch (1.07 KB, patch)
2014-09-22 10:40 UTC, Konstantin Kolinko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Kolinko 2014-09-17 12:27:06 UTC
Someone has configured ASF Buildbot for Tomcat with
'echo base.path=../basepath > build.properties'

It resulted in failure at step "extras-commons-logging",
http://ci.apache.org/builders/tomcat-7-trunk/builds/296

Some log file snippets:

[[[
testexist:
     [echo] Testing  for ../basepath/avalon-framework-4.1.5/avalon-framework-4.1.5.jar

downloadfile:

]]]

[[[
extras-commons-logging:
   [gunzip] Expanding /home/buildslave32/slave32/tomcat-7-trunk/basepath/commons-logging-1.1.3/commons-logging-1.1.3-src.tar.gz to /home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-src.tar
    [untar] Expanding: /home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-src.tar into /home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging
    [mkdir] Created dir: /home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src/src/main/java/org/apache/juli
     [move] Moving 16 files to /home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src/src/main/java/org/apache/juli
     [copy] Copying 1 file to /home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src
     [copy] Copying 4 files to /home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src

init:
     [echo] -------- Logging Wrapper Library 1.1.3 --------

prepare:
     [echo] 
     [echo]     Log4j12: log4j-1.2.17.jar
     [echo]     
     [echo]     
     [echo]     LogKit: ../basepath/logkit-1.0.1/logkit-1.0.1.jar
     [echo]     Avalon-Framework: ../basepath/avalon-framework-4.1.5/avalon-framework-4.1.5.jar
     [echo]     
    [mkdir] Created dir: /home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src/target
    [mkdir] Created dir: /home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src/target/classes
    [mkdir] Created dir: /home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src/target/conf
    [mkdir] Created dir: /home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src/target/tests

static:
     [copy] Copying 1 file to /home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src/target/conf

discovery:

log4j12-warning:

log4j13-warning:

logkit-warning:
     [echo] 
     [echo]     *** WARNING ***
     [echo]     LogKit not found: Cannot Build LogKitLogger
     [echo]     

jdk1.4-warning:

avalon-framework-warning:
     [echo] 
     [echo]     *** WARNING ***
     [echo]     Avalon-Framework not found: Cannot Build AvalonLogger
     [echo]     

compile-non-log4j:
    [javac] /home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src/build2.xml:362: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 11 source files to /home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src/target/classes
    [javac] /home/buildslave32/slave32/tomcat-7-trunk/build/output/extras/logging/commons-logging-1.1.3-src/src/main/java/org/apache/juli/logging/impl/ServletContextCleaner.java:23: package javax.servlet does not exist
    [javac] import javax.servlet.ServletContextEvent;
    [javac]                     ^
]]]

So,
1. avalon-framework-4.1.5.jar was present and has not been downloaded
2. commons-logging build script failed to detect it,
with "Avalon-Framework not found: Cannot Build AvalonLogger"

Compilation is performed by 

    <ant antfile="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src/build2.xml"
         dir="${tomcat.extras}/logging/commons-logging-${commons-logging.version}-src"
         target="compile" />

So dir is a different directory.


Fix
====
I was able to fix this issue by adding inheritAll="false" to the above <ant> command.
Comment 1 Konstantin Kolinko 2014-09-17 14:18:23 UTC
Fixed by r1625599 and r1625606. The fix will be in 8.0.12, 7.0.56 onwards.
Comment 2 Konstantin Kolinko 2014-09-22 10:40:49 UTC
Created attachment 32041 [details]
2014-09-22_tc6_56988.patch

Patch for Tomcat 6
Tested with Ant 1.8.0
Comment 3 Konstantin Kolinko 2014-10-18 11:26:21 UTC
Fixed in Tomcat 6 by r1632761 and will be in 6.0.43 onwards.