/** * We put our project and our workspace on the macro path. */ @Override protected Object[] getMacroDomains() { return new Object[] { project, project.getWorkspace() }; }
/** * We put our project and our workspace on the macro path. */ @Override protected Object[] getMacroDomains() { return new Object[] { project, project.getWorkspace() }; }
public boolean isCnf() { try { return getBase().getCanonicalPath().equals(getWorkspace().buildDir.getCanonicalPath()); } catch (IOException e) { return false; } }
@Override public boolean isInteractive() { return getWorkspace().isInteractive(); } }
@Override protected void changedFile(File f) { project.getWorkspace() .changedFile(f); }
@Override public boolean isInteractive() { return getWorkspace().isInteractive(); } }
private File getTarget0() throws IOException { File target = getTargetDir(); if (!target.exists()) { if (!target.mkdirs()) { throw new IOException("Could not create directory " + target); } getWorkspace().changedFile(target); } return target; }
public boolean isCnf() { try { return getBase().getCanonicalPath() .equals(getWorkspace().getBuildDir() .getCanonicalPath()); } catch (IOException e) { return false; } }
/** * Actions to perform before a full workspace release. This is executed for * projects that describe the distribution */ public void preRelease() { for (ReleaseBracketingPlugin rp : getWorkspace().getPlugins(ReleaseBracketingPlugin.class)) { rp.begin(this); } }
/** * Actions to perform after a full workspace release. This is executed for * projects that describe the distribution */ public void postRelease() { for (ReleaseBracketingPlugin rp : getWorkspace().getPlugins(ReleaseBracketingPlugin.class)) { rp.end(this); } }
@Override public void created(Project p) throws IOException { Workspace workspace = p.getWorkspace(); copy("project", ".project", p); copy("classpath", ".classpath", p); }
private File getSrcOutput0() throws IOException { File output = getSrcOutput().getAbsoluteFile(); if (!output.exists()) { IO.mkdirs(output); getWorkspace().changedFile(output); } return output; }
public Map<String,Action> getActions() { Map<String,Action> all = newMap(); Map<String,Action> actions = newMap(); fillActions(all); getWorkspace().fillActions(all); for (Map.Entry<String,Action> action : all.entrySet()) { String key = getReplacer().process(action.getKey()); if (key != null && key.trim().length() != 0) actions.put(key, action.getValue()); } return actions; }
private File getTarget0() throws IOException { File target = getTargetDir(); if (!target.exists()) { IO.mkdirs(target); getWorkspace().changedFile(target); } return target; }
public Map<String,Action> getActions() { Map<String,Action> all = newMap(); Map<String,Action> actions = newMap(); fillActions(all); getWorkspace().fillActions(all); for (Map.Entry<String,Action> action : all.entrySet()) { String key = getReplacer().process(action.getKey()); if (key != null && key.trim().length() != 0) actions.put(key, action.getValue()); } return actions; }
@Override public void delete(Project p) throws IOException { File root = p.getWorkspace() .getFile("pom.xml"); String rootPom = IO.collect(root); if (rootPom.contains(getTag(p))) { rootPom = rootPom.replaceAll("\n\\s*" + getTag(p) + "\\s*", "\n"); IO.store(rootPom, root); } }
public void remove() throws Exception { getWorkspace().removeProject(this); IO.delete(getBase()); } }
@Override public void created(Project p) throws IOException { Workspace workspace = p.getWorkspace(); File source = workspace.getFile("ant/project.xml"); File dest = p.getFile("build.xml"); if (source.isFile()) IO.copy(source, dest); else IO.store(DEFAULT, dest); }
@Override public void created(Project p) throws IOException { Workspace workspace = p.getWorkspace(); File source = workspace.getFile("ant/project.xml"); File dest = p.getFile("build.xml"); if (source.isFile()) IO.copy(source, dest); else IO.store(DEFAULT, dest); }
@Override public void created(Project p) throws IOException { Workspace workspace = p.getWorkspace(); File source = workspace.getFile("ant/project.xml"); File dest = p.getFile("build.xml"); if (source.isFile()) IO.copy(source, dest); else IO.store(DEFAULT, dest); }