public class CopyJarsUsingProductFile extends DefaultTask
THIS CLASS IS EXPERIMENTAL AND SUBJECT TO CHANGE.
Copies jars into a folder, using a product file and an
ExplicitVersionPolicy
to decide which jars to copy.
Useful for passing jars to analysis tools.
task copyJars(type: CopyJarsUsingProductFile) {
// uses jars from the given folders / installations
from TARGETMAVEN_PLUGINS_DIR
from TARGETP2_RUNNABLE_DIR
// uses the given product file to determine which jars to copy
productFile rootProject.file('com.diffplug.rcpdemo/rcpdemo.product')
// adds plugins which aren't included by the productFile
extra('org.jsr-305')
// destination for the copied jars
into COPY_PRODUCT_JARS
// determines which version to use when multiple versions are available
explicitVersionPolicy {
resolve('com.jcraft.jsch', '0.1.53.autowrapped', '0.1.53.v201508180515').withFirst()
resolve('org.apache.commons.codec', '1.6.0', '1.6.0.v201305230611').withFirst()
resolve('org.apache.commons.logging', '1.1.3', '1.1.1.v201101211721').withFirst()
resolve('org.apache.httpcomponents.httpclient', '4.3.6.autowrapped', '4.3.6.v201411290715').withFirst()
resolve('org.apache.httpcomponents.httpcore', '4.3.3.autowrapped', '4.3.3.v201411290715').withFirst()
resolve('org.hamcrest.core', '1.3.0.autowrapped', '1.3.0.v201303031735').withFirst()
resolve('org.tukaani.xz', '1.4.0', '1.3.0.v201308270617').withFirst()
}
}
Task.Namer
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
Constructor and Description |
---|
CopyJarsUsingProductFile() |
Modifier and Type | Method and Description |
---|---|
void |
action() |
void |
explicitVersionPolicy(Action<ExplicitVersionPolicy> action) |
void |
extra(String extra) |
void |
from(Object from) |
void |
into(Object dest) |
void |
productFile(Object file) |
appendParallelSafeAction, compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getRequiredServices, getServices, getSharedResources, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTaskIdentity, getTemporaryDir, getTemporaryDirFactory, getTimeout, hasProperty, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, replaceLogger, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toString, usesService
public void from(Object from)
public void productFile(Object file)
public void explicitVersionPolicy(Action<ExplicitVersionPolicy> action)
public void into(Object dest)
public void extra(String extra)
public void action() throws IOException
IOException