[Scons-users] JDK 1.7 support?

William Deegan bill at baddogconsulting.com
Fri Sep 7 18:43:49 EDT 2012


Peter,

Can you describe what "flatten" does?

-Bill
On Sep 7, 2012, at 7:02 AM, Peter Steele <pwsteele at gmail.com> wrote:


> The env.Command() suggestion did what I needed. I don’t in fact create any jar files. My ant script has three targets: build, codegen, and copy. I’ve been able to reproduce the first two of these and have yet to tackle the third one. It will be a little tricky since I am using a feature of ant that doesn’t really have a direct parallel in Python, specifically the “flatten” option of the ant copy task. My ant code looks like this:

>

> <target name="copy">

> <copy todir="${libipc_to.dir}" overwrite="yes" flatten="yes">

> <fileset dir="${ipc_c_from.dir}">

> <include name = "**/**/*.*"/>

> <exclude name = "**/**/*proxy*"/>

> <exclude name = "**/**/*adapter*"/>

> </fileset>

> </copy>

> <copy todir="${libipc_to.dir}/proxy" overwrite="yes" flatten="yes">

> <fileset dir="${ipc_c_from.dir}">

> <include name = "**/**/*proxy*.*"/>

> </fileset>

> </copy>

> <copy todir="${libipc_to.dir}/adapter" overwrite="yes" flatten="yes">

> <fileset dir="${ipc_c_from.dir}">

> <include name = "**/**/*adapter*.*"/>

> </fileset>

> </copy>

> <copy todir="${javaipc_to_dir}" overwrite="yes">

> <fileset dir="${ipc_java_from.dir}" includes="**/**/*.*">

> </fileset>

> </copy>

> </target>

>

> To recode these copy tasks into Python will involve a bit of Python coding.

>

> From: scons-users-bounces at scons.org [mailto:scons-users-bounces at scons.org] On Behalf Of William Deegan

> Sent: Thursday, September 06, 2012 3:59 PM

> To: SCons users mailing list

> Subject: Re: [Scons-users] JDK 1.7 support?

>

> Peter,

>

> On Sep 6, 2012, at 1:46 PM, Peter Steele <pwsteele at gmail.com> wrote:

>

>

> I made this change locally to my JavaCommon.py file and that removed the “NotImplemented” error. I can submit a fix for this, or raise a bug. I’ve never done either before for the scons project. Is there a pointer to the procedure to follow?

>

> I am not taking my ant-to-scons exercise to the next step. After we compile our sources, we turn around and run the application that was just built. The ant task we use is this:

>

> <java classname="com.mydomain.MyApp" failonerror="true" fork="yes">

> <jvmarg value="-Darg1=value1"/>

>

> <jvmarg value="-DargN=valueN"/>

> <classpath refid="my.classpath"/>

> </java>

>

> I’m not sure how to represent this in scons. I tried something like this:

>

> env = Environment(

> JAVACLASSPATH = [

>

> ],

> JAVAVERSION = "1.7"

> )

>

> env.Java(“bin”, “src”)

>

> env.Execute(“java MyApp …”)

>

> but this ends up running “MyApp” before the code is compiled. What’s the proper way to convert the “java” Ant target to the equivalent scons command?

>

>

>

> Use env.Command(), the source would be the binary, does your MyApp output any file(s)?

> Do you build a jar?

> -Bill

>

>

>

> Peter

>

> From: Peter Steele [mailto:pwsteele at gmail.com]

> Sent: Thursday, September 06, 2012 10:35 AM

> To: 'SCons users mailing list'

> Subject: RE: [Scons-users] JDK 1.7 support?

>

> I’ll at least file a bug, but when I get a window in my dev time I’ll check out the source as well. We’re considering moving our ant scripts over to scons and this was the first problem I encountered. Hopefully it will be the last as well…

>

> Peter

>

> From: scons-users-bounces at scons.org [mailto:scons-users-bounces at scons.org] On Behalf Of William Deegan

> Sent: Thursday, September 06, 2012 9:18 AM

> To: SCons users mailing list

> Subject: Re: [Scons-users] JDK 1.7 support?

>

> Peter,

>

> On Sep 6, 2012, at 6:53 AM, Peter Steele <pwsteele at gmail.com> wrote:

>

>

> I just tried to build our Java project with scons and it complained that JDK 1.7 isn’t supported. Is this for real or is this “user error”? My SConscript looks like this:

>

> import os

>

> TOT = os.environ["TOT"]

>

> env = Environment(

> JAVACLASSPATH = [

>

> ],

> JAVAVERSION = "1.7"

> )

>

> env.Java('bin', 'src')

>

> The error I got was:

>

> NotImplementedError: Java version 1.7 not supported:

>

> Please file a bug (or even better a fix) at scons.tigris.org. We'll try to get some support in the next release.

>

> It may be as simple as just adding the version string into the list of supported versions which is in the following file:

> SCons/Tool/JavaCommon.py

>

> I believe we actually have a patch in the queue which may resolve this.

> You also could try downloading a package from.

> https://bitbucket.org/dirkbaechle/scons/changesets/tip/branch(%22default%22)

>

> -Bill

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

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

>

> _______________________________________________

> 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/20120907/3cd0b28c/attachment.htm>


More information about the Scons-users mailing list