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 @@ ...@@ -1241,15 +1241,17 @@
<mkdir dir="${plugin.dest.dir}"/> <mkdir dir="${plugin.dest.dir}"/>
<!-- Get a list of subdirs of the main plugins dir. This tells us which plugins to make. --> <!-- Get a list of subdirs of the main plugins dir. This tells us which plugins to make. Exclude the
<subdirinfo dir="${plugin.src.dir}" property="dirlist" ifexists="plugin.xml" admin plugin (which is created by a different Ant task) as well as the clustering plugin (which
except="admin"/> 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"/> <antcall target="-plugins-impl"/>
<!-- Update/create target/openfire directory --> <!-- Update/create target/openfire directory -->
<antcall target="openfireHome"/> <antcall target="openfireHome"/>
</target> </target>
<target name="-plugins-impl" if="dirlist"> <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) --> <!-- First, do all plugins that do not have a parent plugin (some of them could be parents of others) -->
...@@ -1281,6 +1283,7 @@ ...@@ -1281,6 +1283,7 @@
</for> </for>
</target> </target>
<target name="plugin" description="build one plugin"> <target name="plugin" description="build one plugin">
<mkdir dir="${plugin.dest.dir}"/> <mkdir dir="${plugin.dest.dir}"/>
......
...@@ -25,6 +25,9 @@ import org.apache.tools.ant.BuildException; ...@@ -25,6 +25,9 @@ import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project; import org.apache.tools.ant.Project;
import java.io.File; 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. * 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 { ...@@ -89,6 +92,12 @@ public class SubDirInfoTask extends Task {
public void execute() throws BuildException { public void execute() throws BuildException {
// Get the siblings of the given directory, add sub directory names to the property // 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(); File[] subdirs = dir.listFiles();
StringBuffer buf = new StringBuffer(); StringBuffer buf = new StringBuffer();
String value = null; String value = null;
...@@ -108,7 +117,7 @@ public class SubDirInfoTask extends Task { ...@@ -108,7 +117,7 @@ public class SubDirInfoTask extends Task {
add = true; add = true;
} }
} }
if (add && !subdir.getName().equals(except)) { if (add && !excepts.contains(subdir.getName())) {
buf.append(sep).append(subdir.getName()); buf.append(sep).append(subdir.getName());
sep = getDelimiter(); 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