Commit fdd5bcfe authored by Guus der Kinderen's avatar Guus der Kinderen

OF-935: Restored: Clustering plugin should not be build by default.

parent 427a660e
......@@ -1241,15 +1241,17 @@
<mkdir dir="${plugin.dest.dir}"/>
<!-- Get a list of subdirs of the main plugins dir. This tells us which plugins to make. -->
<subdirinfo dir="${plugin.src.dir}" property="dirlist" ifexists="plugin.xml"
except="admin"/>
<!-- Get a list of subdirs of the main plugins dir. This tells us which plugins to make. Exclude the
admin plugin (which is created by a different Ant task) as well as the clustering plugin (which
requires non-free JAR-files to be added to its library path, which most users won't do). -->
<subdirinfo dir="${plugin.src.dir}" property="dirlist" ifexists="plugin.xml" except="admin,clustering"/>
<antcall target="-plugins-impl"/>
<!-- Update/create target/openfire directory -->
<antcall target="openfireHome"/>
</target>
<target name="-plugins-impl" if="dirlist">
<!-- First, do all plugins that do not have a parent plugin (some of them could be parents of others) -->
......@@ -1281,6 +1283,7 @@
</for>
</target>
<target name="plugin" description="build one plugin">
<mkdir dir="${plugin.dest.dir}"/>
......
......@@ -25,6 +25,9 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import java.io.File;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/**
* A simple ant task to return the sub directories of a given dir as a comma delimited string.
......@@ -89,6 +92,12 @@ public class SubDirInfoTask extends Task {
public void execute() throws BuildException {
// Get the siblings of the given directory, add sub directory names to the property
List excepts;
if (except != null) {
excepts = Arrays.asList( except.split( getDelimiter() ) );
} else {
excepts = Collections.EMPTY_LIST;
}
File[] subdirs = dir.listFiles();
StringBuffer buf = new StringBuffer();
String value = null;
......@@ -108,7 +117,7 @@ public class SubDirInfoTask extends Task {
add = true;
}
}
if (add && !subdir.getName().equals(except)) {
if (add && !excepts.contains(subdir.getName())) {
buf.append(sep).append(subdir.getName());
sep = getDelimiter();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment