[Scons-users] SCons Intermittent parallel build failures

Brady Johnson bradyallenjohnson at gmail.com
Tue Apr 1 04:41:41 EDT 2014


Dirk,

Thanks for the info.

One of the main reasons I created the SccfJava() builder was to add every
entry in the JAVACLASSPATH as a Depends(), as follows:

for item in classpath_list:
if type(item) is str:
for classpath in item.split(':'):
env.Depends(java_target, classpath)
else:
# Then its a target
env.Depends(java_target, item)

Regards,

Brady


On Mon, Mar 31, 2014 at 10:58 PM, Dirk Bächle <tshortik at gmx.de> wrote:


> 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

>

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>

>

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


More information about the Scons-users mailing list