Updated google reflections due to stale slf4j version conflicting with other projects also trying to use Queue as a component.
Added targets to build.xml to effectively 'mvn install' packaged GATK/Queue from ant. TODO: Versions during 'mvn install' are hardcoded at 0.0.1 until a better versioning scheme that works with maven dependencies has been identified.
This commit is contained in:
parent
6c0e4895f0
commit
9fcf71c031
42
build.xml
42
build.xml
|
|
@ -22,7 +22,9 @@
|
|||
~ OTHER DEALINGS IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
<project name="Sting" default="dist" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
<project name="Sting" default="dist" basedir="."
|
||||
xmlns:artifact="antlib:org.apache.maven.artifact.ant"
|
||||
xmlns:ivy="antlib:org.apache.ivy.ant">
|
||||
<description>Compile and distribute the Sting toolkit</description>
|
||||
|
||||
<!-- ******************************************************************************** -->
|
||||
|
|
@ -250,11 +252,14 @@
|
|||
<property name="ivy.jar.file" value="ivy-${ivy.install.version}.jar"/>
|
||||
<property name="ivy.settings.dir" value="settings"/>
|
||||
<property file="${ivy.settings.dir}/ivysettings.properties"/>
|
||||
<property name="maven-ant-tasks.install.version" value="2.1.3"/>
|
||||
<property name="maven-ant-tasks.jar.file" value="maven-ant-tasks-${maven-ant-tasks.install.version}.jar"/>
|
||||
|
||||
<mkdir dir="${lib.dir}"/>
|
||||
<mkdir dir="${ivy.jar.dir}"/>
|
||||
|
||||
<!-- Comment out the following two lines to build the GATK without a network connection, assuming you have all of the libraries cached already -->
|
||||
<!-- Comment out the following lines to build the GATK without a network connection, assuming you have all of the libraries cached already -->
|
||||
|
||||
<get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/${ivy.jar.file}"
|
||||
dest="${ivy.jar.dir}/${ivy.jar.file}"
|
||||
usetimestamp="true"/>
|
||||
|
|
@ -262,6 +267,15 @@
|
|||
uri="antlib:org.apache.ivy.ant"
|
||||
classpath="${ivy.jar.dir}/${ivy.jar.file}"/>
|
||||
|
||||
<get src="http://repo1.maven.org/maven2/org/apache/maven/maven-ant-tasks/${maven-ant-tasks.install.version}/${maven-ant-tasks.jar.file}"
|
||||
dest="${ivy.jar.dir}/${maven-ant-tasks.jar.file}"
|
||||
usetimestamp="true"/>
|
||||
<taskdef resource="org/apache/maven/artifact/ant/antlib.xml"
|
||||
uri="antlib:antlib:org.apache.maven.artifact.ant"
|
||||
classpath="${ivy.jar.dir}/${maven-ant-tasks.jar.file}"/>
|
||||
|
||||
<!-- End network lines -->
|
||||
|
||||
<ivy:settings file="${ivy.settings.dir}/ivysettings.xml"/>
|
||||
<property name="init.resolve.done" value="true"/>
|
||||
</target>
|
||||
|
|
@ -295,7 +309,7 @@
|
|||
|
||||
<target name="git.rev-parse" depends="git.describe" unless="git.describe.succeeded">
|
||||
<exec executable="git" outputproperty="git.rev-parse.output" resultproperty="git.rev-parse.exit.value" failonerror="false">
|
||||
<arg line="rev-parse HEAD" />
|
||||
<arg line="rev-parse --short HEAD" />
|
||||
</exec>
|
||||
<condition property="git.rev-parse.succeeded">
|
||||
<equals arg1="${git.rev-parse.exit.value}" arg2="0" />
|
||||
|
|
@ -942,6 +956,28 @@
|
|||
</ant>
|
||||
</target>
|
||||
|
||||
<!-- Maven install a package consisting of all supporting files. Don't call this target directly. Call one of the specific packaging targets below -->
|
||||
<target name="mvninstall" depends="package" description="maven install a package into .m2/repository">
|
||||
<property name="mvn.build.version" value="0.0.1" />
|
||||
<!--
|
||||
We should use the build version or better yet a git tag version, but tags are currently missing. Alternatively how do we then depend on the LATEST?
|
||||
<property name="mvn.build.version" value="${build.version}" />
|
||||
-->
|
||||
<artifact:pom id="${executable}.pom" groupId="org.broadinstitute.sting" artifactId="${executable}" version="${mvn.build.version}" name="${executable}" />
|
||||
<artifact:writepom pomRefId="${executable}.pom" file="${package.output.dir}/${executable}-${build.version}/${executable}.pom.xml"/>
|
||||
<artifact:install file="${package.output.dir}/${executable}-${build.version}/${executable}.jar">
|
||||
<artifact:pom file="${package.output.dir}/${executable}-${build.version}/${executable}.pom.xml" />
|
||||
</artifact:install>
|
||||
</target>
|
||||
|
||||
<!-- Maven install specific versions of the GATK/Queue. ALWAYS do an ant clean before invoking these! -->
|
||||
<target name="mvninstall.gatk.full" depends="package.gatk.full,mvninstall" />
|
||||
|
||||
<target name="mvninstall.gatk.lite" depends="package.gatk.lite,mvninstall" />
|
||||
|
||||
<target name="mvninstall.queue.full" depends="package.queue.full,mvninstall" />
|
||||
|
||||
<target name="mvninstall.queue.lite" depends="package.queue.lite,mvninstall" />
|
||||
|
||||
<!-- ******************************************************************************** -->
|
||||
<!-- Clean -->
|
||||
|
|
|
|||
3
ivy.xml
3
ivy.xml
|
|
@ -46,7 +46,8 @@
|
|||
<dependency org="org.apache.bcel" name="bcel" rev="5.2"/>
|
||||
|
||||
<!-- Dependencies for reflections mvn repository -->
|
||||
<dependency org="org.reflections" name="reflections" rev="0.9.5-RC2"/>
|
||||
<dependency org="org.reflections" name="reflections" rev="0.9.8"/>
|
||||
<dependency org="org.slf4j" name="slf4j-log4j12" rev="1.6.1"/>
|
||||
|
||||
<!-- Matrix package from math.nist.gov -->
|
||||
<dependency org="gov.nist" name="Jama" rev="1.0.2"/>
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ import org.reflections.util.ClasspathHelper;
|
|||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.*;
|
||||
import java.net.URL;
|
||||
import java.util.*;
|
||||
|
|
@ -198,7 +197,7 @@ public class JVMUtils {
|
|||
* @return the list of class path urls.
|
||||
*/
|
||||
public static Set<URL> getClasspathURLs() {
|
||||
return ClasspathHelper.getUrlsForManifestsCurrentClasspath();
|
||||
return ClasspathHelper.forManifest();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -240,8 +239,8 @@ public class JVMUtils {
|
|||
/**
|
||||
* Returns a comma-separated list of the names of the interfaces implemented by this class
|
||||
*
|
||||
* @param covClass
|
||||
* @return
|
||||
* @param covClass class
|
||||
* @return names of interfaces
|
||||
*/
|
||||
public static String classInterfaces(final Class covClass) {
|
||||
final List<String> interfaces = new ArrayList<String>();
|
||||
|
|
|
|||
|
|
@ -25,8 +25,6 @@
|
|||
|
||||
package org.broadinstitute.sting.utils.classloader;
|
||||
|
||||
import ch.qos.logback.classic.Level;
|
||||
import ch.qos.logback.classic.Logger;
|
||||
import org.broadinstitute.sting.gatk.WalkerManager;
|
||||
import org.broadinstitute.sting.gatk.filters.FilterManager;
|
||||
import org.broadinstitute.sting.utils.exceptions.DynamicClassResolutionException;
|
||||
|
|
@ -35,7 +33,6 @@ import org.broadinstitute.sting.utils.exceptions.UserException;
|
|||
import org.reflections.Reflections;
|
||||
import org.reflections.scanners.SubTypesScanner;
|
||||
import org.reflections.util.ConfigurationBuilder;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Constructor;
|
||||
|
|
@ -57,9 +54,8 @@ public class PluginManager<PluginType> {
|
|||
private static final Reflections defaultReflections;
|
||||
|
||||
static {
|
||||
// turn off logging in the reflections library - they talk too much (to the wrong logger factory as well, logback)
|
||||
Logger logger = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(Reflections.class);
|
||||
logger.setLevel(Level.OFF);
|
||||
// turn off logging in the reflections library - they talk too much
|
||||
Reflections.log = null;
|
||||
|
||||
Set<URL> classPathUrls = new LinkedHashSet<URL>();
|
||||
|
||||
|
|
@ -179,9 +175,9 @@ public class PluginManager<PluginType> {
|
|||
/**
|
||||
* Sorts, in place, the list of plugins according to getName() on each element
|
||||
*
|
||||
* @param unsortedPlugins
|
||||
* @param unsortedPlugins unsorted plugins
|
||||
*/
|
||||
private final void sortPlugins(final List<Class<? extends PluginType>> unsortedPlugins) {
|
||||
private void sortPlugins(final List<Class<? extends PluginType>> unsortedPlugins) {
|
||||
Collections.sort(unsortedPlugins, new ComparePluginsByName());
|
||||
}
|
||||
|
||||
|
|
@ -235,7 +231,7 @@ public class PluginManager<PluginType> {
|
|||
* @param plugin Name of the plugin for which to search.
|
||||
* @return True if the plugin exists, false otherwise.
|
||||
*/
|
||||
public boolean exists(Class<?> plugin) {
|
||||
public boolean exists(Class<? extends PluginType> plugin) {
|
||||
return pluginsByName.containsValue(plugin);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
<artifact pattern="${repository.dir}/[organisation]/[artifact]-[revision].[ext]" />
|
||||
<ivy pattern="${repository.dir}/[organisation]/[module]-[revision].xml" />
|
||||
</filesystem>
|
||||
<ibiblio name="reflections-repo" m2compatible="true" root="http://reflections.googlecode.com/svn/repo" />
|
||||
<ibiblio name="maven" root="http://repo1.maven.org/maven2" m2compatible="true" />
|
||||
</chain>
|
||||
</resolvers>
|
||||
|
|
|
|||
Loading…
Reference in New Issue