From 98e74fae6d212563a1558abce60ea5c73fcfc0c0 Mon Sep 17 00:00:00 2001 From: Jesse Gorzinski <17914061+ThePrez@users.noreply.github.com> Date: Fri, 2 Feb 2024 17:02:21 -0600 Subject: [PATCH] Fixup source for pcml builds Signed-off-by: Jesse Gorzinski <17914061+ThePrez@users.noreply.github.com> --- build/PCMLTask.java | 9 +++++- pom-dist.xml | 72 ++++++++++++++++++++++----------------------- pom.xml | 8 ++--- 3 files changed, 48 insertions(+), 41 deletions(-) diff --git a/build/PCMLTask.java b/build/PCMLTask.java index df0a510ec..28a10a87f 100644 --- a/build/PCMLTask.java +++ b/build/PCMLTask.java @@ -44,12 +44,13 @@ public void setDestdir(File destDir) public void execute() throws BuildException { DirectoryScanner scanner = getDirectoryScanner(srcDir_); + System.out.println("Source directory is "+srcDir_); String[] f = scanner.getIncludedFiles(); Java java = (Java)project.createTask("java"); java.clearArgs(); java.setClassname("com.ibm.as400.data.ProgramCallDocument"); - java.setClasspath(classpath_); + java.setFork(true); // Otherwise JDK 1.4 throws NoClassDefFoundError on sun/reflect/SerializationConstructorAccessorImpl Commandline.Argument arg1 = java.createArg(); arg1.setValue("-serialize"); @@ -62,9 +63,13 @@ public void execute() throws BuildException (dest.exists() && dest.lastModified() < source.lastModified())) { System.out.println("Processing "+f[i]); + System.out.println(" source: "+source.getAbsolutePath()); + System.out.println(" dest: "+dest.getAbsolutePath()); String name = f[i].replace('\\', '.').replace('/', '.'); arg2.setValue(name); + Path classpath = new Path(getProject(), classpath_+";"+dest.getParentFile().getAbsolutePath()); + java.setClasspath(classpath); java.execute(); Move move = (Move)project.createTask("move"); @@ -73,6 +78,8 @@ public void execute() throws BuildException move.setFile(outfile); move.setTofile(dest); move.execute(); + } else { + System.out.println("Not processing because source is unchanged: "+source); } } } diff --git a/pom-dist.xml b/pom-dist.xml index c6407137d..4d6ebd16c 100644 --- a/pom-dist.xml +++ b/pom-dist.xml @@ -317,9 +317,9 @@ @@ -336,9 +336,9 @@ @@ -355,9 +355,9 @@ @@ -374,9 +374,9 @@ @@ -393,9 +393,9 @@ @@ -412,9 +412,9 @@ @@ -431,9 +431,9 @@ @@ -450,9 +450,9 @@ @@ -469,9 +469,9 @@ @@ -488,9 +488,9 @@ @@ -507,9 +507,9 @@ @@ -526,9 +526,9 @@ diff --git a/pom.xml b/pom.xml index 110789df4..018e8984b 100644 --- a/pom.xml +++ b/pom.xml @@ -119,8 +119,8 @@ @@ -138,8 +138,8 @@