Help building Lucee 5

I’d really like to test Lucee 5 on my app, but I want to be able to build
it before I start using it. Unfortunately, the maven/ant build fails on
addBundles.

I’ve documented all my steps to create the build environment. I’m on
windows 10 x64

install newest versions:

clone Lucee 5 repo to C:\ServerData\Lucee5 (also tried these releases:

update environment variables

  • ANT_HOME to C:\apache-ant-1.9.6
  • MAVEN_HOME to C:\apache-maven-3.3.9
  • M2_HOME to C:\apache-maven-3.3.9
  • JAVA_HOME to C:\Program Files\Java\jdk1.8.0_73

add to PATH:

  • %ANT_HOME%/bin
  • %M2_HOME%/bin
  • %JAVA_HOME%/bin

test in command prompt:

  • ant -v
  • maven -version
  • java -version

disabled testbox tests because 3 of them failed:

loader/pom.xml
<property name="testcases" value="false" />
loader/build.xml
<property name="testcases" value="false"/>
cd C:\ServerData\Lucee5\Lucee\loader
mvn -e -l ../../maven-build-log7-2.txt clean install

after 2 minutes, the failure output is:

addBundles:
     [echo] ---------- 2016-03-19 12:42:00 - add bundles ----------
[INFO]------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] 
------------------------------------------------------------------------
[INFO] Total time: 01:55 min
[INFO] Finished at: 2016-03-19T12:42:00-04:00
[INFO] Final Memory: 23M/393M
[INFO] 
------------------------------------------------------------------------
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-antrun-plugin:1.8:run (ant-magic) on project 
lucee: An Ant BuildException has occured: The following error occurred 
while executing this line:
[ERROR] C:\ServerData\Lucee5\Lucee\ant\build-core.xml:975: 
java.lang.RuntimeException: java.io.FileNotFoundException: C (The system 
cannot find the file specified)
[ERROR] around Ant part ...<ant antfile="../ant/build-core.xml" 
target="buildLoaderMaven"/>... @ 15:67 in 
C:\ServerData\Lucee5\Lucee\loader\target\antrun\build-main.xml
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, 
please read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

However, all these files seem to exist, so i can’t tell what it means by

FileNotFound.
C:\ServerData\Lucee5\Lucee\ant\build-core.xml
C:\ServerData\Lucee5\Lucee\loader\target\antrun\build-main.xml
D:\Downloads\Lucee-5.0.0.222\Lucee-5.0.0.222\core\src\main\java\META-INF\MANIFEST.MF

I attached the full maven build logs for both java 7 and java 8. I tried
to a variety of things with many builds for an hour. Including rebooting,
and using an elevated command prompt. I ran this on Java 8.0.73 and Java
7.0.25 with same problem.

For testbox, there is a failure with the DateAdd and LSDateFormat tests but
that doesn’t appear to stop the build process.

Ran into the same error with similar settings. More recent versions and PATH listings have C:\Progra~1.… rather than root.

Please post output. I doubt that it is exactly the same as the one from 15 months ago. There was a bug at the time that caused an issue with Windows paths. It was fixed long ago.

1 Like

Thanks @21Solutions
I isolated build from my Windows machine to an Ubuntu workstation with a Vagrant Ubuntu VM running the following. My Windows machine had Failures 3 Errors 1. This build has 2 and 2.

Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-119-generic x86_64)

 mvn -version
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /usr/local/java/jdk1.8.0_131/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-119-generic", arch: "amd64", family: "unix"

ant -version
Apache Ant(TM) version 1.9.3 compiled on April 8 2014

     [java]    [script] TestBox Version: 2.2.0+00021
     [java]    [script] Global Stats (208396 ms)
     [java]    [script] =============================================================
     [java]    [script] ->[Bundles/Suites/Specs: 521/589/1492]
     [java]    [script] ->[Pass: 1440]
     [java]    [script] ->[Failures: 2]
     [java]    [script] ->[Errors: 2]
     [java]    [script] ->[Skipped: 48]
     [java]    [script] -------------------------------------------------------
     [java]    [script] Testcase failed
     [java]    [script] testbox could not sucessfull execute all testcases: failed 2;error 2
     [java]    [script] {"Extended_Info":"","Message":"testbox could not sucessfull execute all testcases: failed 2;error 2","Detail":"","additional":{},"TagContext":[],"ErrorCode":"","code":"","type":"application","StackTrace":"lucee.runtime.exp.CustomTypeException: testbox could not sucessfull execute all testcases: failed 2;error 2
     [java]    [script]         at lucee.runtime.tag.Throw._doStartTag(Throw.java:212)
     [java]    [script]         at lucee.runtime.tag.Throw.doStartTag(Throw.java:201)
     [java]    [script]         at n52srh4e7p11.call(Unknown Source)
     [java]    [script]         at lucee.runtime.compiler.Renderer.tag(Renderer.java:113)
     [java]    [script]         at lucee.runtime.compiler.Renderer.script(Renderer.java:101)
     [java]    [script]         at lucee.runtime.jsr223.ScriptEngineImpl.eval(ScriptEngineImpl.java:64)
     [java]    [script]         at lucee.runtime.jsr223.ScriptEngineImpl.eval(ScriptEngineImpl.java:200)
     [java]    [script]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]    [script]         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     [java]    [script]         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     [java]    [script]         at java.lang.reflect.Method.invoke(Method.java:498)
     [java]    [script]         at org.apache.tools.ant.util.ReflectUtil.invoke(ReflectUtil.java:109)
     [java]    [script]         at org.apache.tools.ant.util.ReflectWrapper.invoke(ReflectWrapper.java:81)
     [java]    [script]         at org.apache.tools.ant.util.optional.JavaxScriptRunner.evaluateScript(JavaxScriptRunner.java:103)
     [java]    [script]         at org.apache.tools.ant.util.optional.JavaxScriptRunner.executeScript(JavaxScriptRunner.java:67)
     [java]    [script]         at org.apache.tools.ant.taskdefs.optional.Script.execute(Script.java:53)
     [java]    [script]         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
     [java]    [script]         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]    [script]         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     [java]    [script]         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     [java]    [script]         at java.lang.reflect.Method.invoke(Method.java:498)
     [java]    [script]         at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
     [java]    [script]         at org.apache.tools.ant.Task.perform(Task.java:348)
     [java]    [script]         at org.apache.tools.ant.Target.execute(Target.java:435)
     [java]    [script]         at org.apache.tools.ant.Target.performTasks(Target.java:456)
     [java]    [script]         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
     [java]    [script]         at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
     [java]    [script]         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
     [java]    [script]         at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
     [java]    [script]         at org.apache.tools.ant.Main.runBuild(Main.java:853)
     [java]    [script]         at org.apache.tools.ant.Main.startAnt(Main.java:235)
     [java]    [script]         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
     [java]    [script]         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
     [java]    [script] ","ExtendedInfo":""}
     [java]    [script] -------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7:56.143s
[INFO] Finished at: Wed Jun 07 16:49:24 UTC 2017
[INFO] Final Memory: 25M/77M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (ant-magic) on project lucee: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /home/vagrant/Lucee/ant/build-core.xml:787: Java returned: 1
[ERROR] around Ant part ...<ant antfile="../ant/build-core.xml" target="buildLoaderMaven"/>... @ 15:67 in /home/vagrant/Lucee/loader/target/antrun/build-main.xml
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

OK, this is a testcase issue. Some testcases rely on environment settings for database connectivity, login credentials, etc.

It’d be easier for you to do the build without running the testcases.

If you’re building with ant, use the target “fast”, so issue the command

  ant fast

For maven, set the System Property testcases to false, e.g.

  mvn -Dtestcases=false install