[Scons-users] Problems with the Java builder
Brady Johnson
bradyallenjohnson at gmail.com
Wed Jan 15 09:23:01 EST 2014
Hello all,
I remember some months back there were some emails on this list that
mentioned that the SCons Java builder was lacking and needed improvements.
Im wondering if the problems im seeing are related.
Here is the situation: I am trying to compile some java source files that
are generated using Apache Thrift, and subsequently cant modify them. Im
compiling as follows:
tgt = env.Java(target='classes', source='ServiceMmasClApi.java')
for t in target: print 'java target %s' % (t)
This compiles as expected, but the result from the print statement is not
expected:
java target: classes/ServiceMmasClApi.class
But the actual compiled targets are as follows:
$ tree classes/
classes/
`-- com
`-- ericsson
`-- sccf
`-- thrift
`-- gen
|-- ServiceMmasClApi$1.class
|-- ServiceMmasClApi$AsyncClient$Factory.class
|--
ServiceMmasClApi$AsyncClient$assign_subscriber_profile_call.class
|--
ServiceMmasClApi$AsyncClient$create_domain_reporting_call.class
|--
ServiceMmasClApi$AsyncClient$remove_subscriber_profile_call.class
|-- ServiceMmasClApi$AsyncClient.class
|-- ServiceMmasClApi$AsyncIface.class
and lots more...
Subsequently, the ServiceMmasClApi.java file is always compiled, since
classes/ServiceMmasClApi.class doesnt exist.
The problem seems simple:
- SCons is not taking into account the package definition when creating
the target, hence the com sub-directory tree
- SCons is not correctly considering inner classes in the source file
Perhaps Im doing something wrong?? Has anyone else seen this, and know how
to fix it?
Im considering just writing my own builder, but maybe we should instead get
this fixed.
BTW: Im using the following version:
$ scons --version
SCons by Steven Knight et al.:
script: v2.3.0.rel_2.3.0:2870:c8dbbaa4598e, 2013/07/31 13:02:49, by
bdbaddog on Williams-MacBook
engine: v2.3.0.rel_2.3.0:2870:c8dbbaa4598e, 2013/07/31 13:02:49, by
bdbaddog on Williams-MacBook
engine path:
['/tmp/ebrjohn/pythonbrew/venvs/Python-2.7.2/py_master/lib/scons-2.3.0/SCons']
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
2011, 2012, 2013 The SCons Foundation
Thanks in advance,
Brady
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140115/9683de8b/attachment.htm
More information about the Scons-users
mailing list