public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* build.xml patch for building under RHEL6
@ 2016-07-20 17:18 Jamison Hope
  2016-07-21  6:38 ` Per Bothner
  0 siblings, 1 reply; 2+ messages in thread
From: Jamison Hope @ 2016-07-20 17:18 UTC (permalink / raw)
  To: kawa list

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]

It would appear that <echo file="a/b/c"> isn't guaranteed to work if the
subdirectories "a" and "a/b" don't exist yet.  In particular, when Kawa
is checked out under RHEL 6, building via Ant 1.7.1 and Java 1.6.0_24
(ugh, don't ask) fails with a FileNotFoundException attempting to open
META-INF/services/javax.script.ScriptEngineFactory.

The fix is to <mkdir dir="META-INF/services"/> before the <echo>, as
in the attached patch.

--
Jamison Hope
The PTR Group
www.theptrgroup.com



[-- Attachment #2: build-xml-j6.patch --]
[-- Type: application/octet-stream, Size: 1261 bytes --]

Index: build.xml
===================================================================
--- build.xml	(revision 8883)
+++ build.xml	(working copy)
@@ -855,11 +855,13 @@
   </target>
 
   <target name="script-factory-scheme" if="${-needs-scripting-inf}">
+    <mkdir dir="META-INF/services"/>
     <echo message="kawa.standard.SchemeScriptEngineFactory #Scheme&#xA;"
           append="true"
           file="META-INF/services/javax.script.ScriptEngineFactory"/>
   </target>
   <target name="script-factory-xquery" if="${-needs-scripting-inf-xquery}">
+    <mkdir dir="META-INF/services"/>
     <echo message="gnu.xquery.lang.XQueryScriptEngineFactory #XQuery&#xA;"
           append="true"
           file="META-INF/services/javax.script.ScriptEngineFactory"/>
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 8883)
+++ ChangeLog	(working copy)
@@ -1,3 +1,9 @@
+2016-07-20  Jamison Hope  <jrh@theptrgroup.com>
+
+	* build.xml (script-factory-scheme, script-factory-xquery): Make
+	sure META-INF/services directory exists before writing to
+	META-INF/services/javax.script.ScriptEngineFactory file.
+
 2016-07-13  Per Bothner  <per@bothner.com>
 
 	Replace use of JFreeSVG with VectorGraphics2D library.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: build.xml patch for building under RHEL6
  2016-07-20 17:18 build.xml patch for building under RHEL6 Jamison Hope
@ 2016-07-21  6:38 ` Per Bothner
  0 siblings, 0 replies; 2+ messages in thread
From: Per Bothner @ 2016-07-21  6:38 UTC (permalink / raw)
  To: kawa



On 07/20/2016 10:17 AM, Jamison Hope wrote:
> It would appear that <echo file="a/b/c"> isn't guaranteed to work if the
> subdirectories "a" and "a/b" don't exist yet.  In particular, when Kawa
> is checked out under RHEL 6, building via Ant 1.7.1 and Java 1.6.0_24
> (ugh, don't ask) fails with a FileNotFoundException attempting to open
> META-INF/services/javax.script.ScriptEngineFactory.
>
> The fix is to <mkdir dir="META-INF/services"/> before the <echo>, as
> in the attached patch.

Thanks - I checked this in.
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-21  6:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-20 17:18 build.xml patch for building under RHEL6 Jamison Hope
2016-07-21  6:38 ` Per Bothner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).