I just encountered a severe issue with v3 build. I had left a GlassFish
instance running while starting a fresh build. The build finished
successfully, but glassfish.zip did not have domain1 dir in it.
Scrolling the logs, I found the following message during nucleus
distribution build:
[INFO]
------------------------------------------------------------------------
[INFO] Building Glassfish v3 Nucleus Distribution
[INFO] task-segment: [install]
[INFO]
------------------------------------------------------------------------
...
create-domain:
[echo] Directory to run command from:
/space/ss141213/WS/gf/v3.trunk.new/distributions/nucleus/target/stage/glassfishv3/glassfish/bin
[echo] Command to run:
/space/ss141213/WS/gf/v3.trunk.new/distributions/nucleus/target/stage/glassfishv3/glassfish/bin/asadmin
[exec] Port for domain1 (4848) is in use. Try a different port number.
[exec] CLI130 Could not create domain, domain1
[exec] Command create-domain failed.
[exec] Result: 1
Despite this error, the build continued. How bad?
Looking at the build scripts, I see the following nucleus/build.xml:
<target name="create-domain-on-unix" depends="init" if="unix">
<ant antfile="../distributions.xml" target="create-domain">
<property name="exec.dir"
value="${basedir}/target/stage/${install.dir.name}/glassfish/bin"/>
<property name="exec.executable"
value="${basedir}/target/stage/${install.dir.name}/glassfish/bin/asadmin"/>
</ant>
</target>
A quick look at the documentation of ant task [1] does not reveal any
way to check the success status of the task. Any suggestion? I have just
filed issue #8438 [2].
Thanks,
Sahoo
[1]
http://ant.apache.org/manual/CoreTasks/ant.html
[2]
https://glassfish.dev.java.net/issues/show_bug.cgi?id=8438