From 862575f8597385d5f7a9546ab0a44655d2be2056 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Mon, 17 Oct 2011 12:23:48 -0500 Subject: [PATCH] Preliminary fix for ReadyForUpload with ij.jar This needs to be done properly. Later. Signed-off-by: Johannes Schindelin --- .../Script_Editor/fiji/scripting/ReadyForUpload.java | 7 ++++++- src-plugins/fake/fiji/build/Rule.java | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src-plugins/Script_Editor/fiji/scripting/ReadyForUpload.java b/src-plugins/Script_Editor/fiji/scripting/ReadyForUpload.java index 3bc1c0471e..988642167d 100644 --- a/src-plugins/Script_Editor/fiji/scripting/ReadyForUpload.java +++ b/src-plugins/Script_Editor/fiji/scripting/ReadyForUpload.java @@ -100,8 +100,13 @@ protected String getSourcePathForTarget(boolean fromSubFakefile) throws FakeExce if (rule.getLastPrerequisite().equals("mpicbg/")) return fijiDir + "mpicbg/"; File fakefile = ((SubFake)rule).getFakefile(); - if (fakefile == null) + if (fakefile == null) { + // TODO: this really needs to go into a new Rule.isClean() method, checking also for resources + File mavenSrc = new File(rule.getWorkingDirectory(), rule.getLastPrerequisite() + "src/main/java"); + if (mavenSrc.exists()) + return mavenSrc.getAbsolutePath(); return null; + } Fake fake = new Fake(); File cwd = new File(fijiDir, rule.getLastPrerequisite()); if (!new File(cwd, ".git").exists()) { diff --git a/src-plugins/fake/fiji/build/Rule.java b/src-plugins/fake/fiji/build/Rule.java index a9a1f9ccd8..a154eca486 100644 --- a/src-plugins/fake/fiji/build/Rule.java +++ b/src-plugins/fake/fiji/build/Rule.java @@ -503,4 +503,8 @@ public String getStripPath() { } return s.substring(0, stars + 1); } + + public File getWorkingDirectory() { + return parser.cwd; + } } \ No newline at end of file