[Scons-users] SCons Intermittent parallel build failures

Dirk Bächle tshortik at gmx.de
Mon Mar 31 16:58:34 EDT 2014


Hi Brady,

On 31.03.2014 21:35, Brady Johnson wrote:

>

> Hello all,

>

> I */occasionally /*get build failures when doing parallel builds while

> compiling java code.

>

> The dependencies are very clear, as follows:

> 1) WsCommon java code is compiled

> 2) The WsCommon.jar file is created, specifying the classes from 1) as

> the source

> 3) The WsCommon.jar target is used in the classpath to compile other

> java code, and also as a source to a WAR file builder.

>

> Here is an excerpt that I can show from the SConscript:

>

> tclass = env.SccfJava(target='WsCommon/classes',

> source='WsCommon/src/main/java',

> JAVACLASSPATH=ws_common_classpath)

> target_WsCommon_jar = env.SccfJar(target='WsCommon.jar',

> source='WsCommon/classes')

> tclass = env.SccfJava(target='DomainIpService/classes',

> source='DomainIpService/src/main/java',

> JAVACLASSPATH=[target_WsCommon_jar,

> ws_common_classpath,

> ...])

>

>


I'm no Java expert, but for this to work properly the JAR file would
have to get added as implicit dependency, based on appearing in the
JAVACLASSPATH variable. I checked the core sources for v2.3.1, but this
doesn't seem to be supported for the standard Java() builder.

I guess you'll either have to fix your SccfJava(), or explicitly add a
dependency as follows:

tclass = env.SccfJava(target='DomainIpService/classes',
source='DomainIpService/src/main/java',
JAVACLASSPATH=[target_WsCommon_jar,
ws_common_classpath,
...])
env.Depends(tclass, target_WsCommon_jar)

Hope this helps you any further.

Best regards,

Dirk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140331/c010f39c/attachment.html


More information about the Scons-users mailing list