Code Monkey home page Code Monkey logo

ant-shade-task's Introduction

What is it?

ant-shade-task is a wrapper of Apache Maven Shade Plugin (or maven-shade-plugin) for Ant.

Requirements

  • Use: Java 8 and Apache Ant.
  • Build: Java 8 and Apache Maven.

How to use

  • Build with mvn clean package.
  • Pick ant-shade-task-0.1-SNAPSHOT.jar or ant-shade-task-0.1-SNAPSHOT-jar-with-dependencies.jar from the target directory and copy it to elsewhere.
  • Register the picked up JAR file in build.xml:
<taskdef
	classpath="ant-shade-task-0.1-SNAPSHOT-jar-with-dependencies.jar"
	resource="org/apache/tools/ant/taskdefs/shade.properties"
/>
<shade jar="foo-bar.jar" uberJar="foo-bar-shaded.jar">
	<relocation pattern="org.codehaus.plexus.util" shadedPattern="org.shaded.plexus.util">
		<exclude value="org.codehaus.plexus.util.xml.Xpp3Dom"/>
		<exclude value="org.codehaus.plexus.util.xml.pull.*"/>
	</relocation>
</shade>

The snippet above is an Ant adaptation of the following Maven Shade Plugin configuration snippet:

<relocations>
	<relocation>
	<pattern>org.codehaus.plexus.util</pattern>
		<shadedPattern>org.shaded.plexus.util</shadedPattern>
		<excludes>
			<exclude>org.codehaus.plexus.util.xml.Xpp3Dom</exclude>
			<exclude>org.codehaus.plexus.util.xml.pull.*</exclude>
		</excludes>
	</relocation>
</relocations>

What's supported

  • Only <relocations> are exposed through the <shade> task so far.

Version history

Nothing tagged yet.

Known issues

  • ant-shade-task-0.1-SNAPSHOT.jar does not include any dependencies and the dependencies should be picked up either manually or using ant-shade-task-0.1-SNAPSHOT-jar-with-dependencies.jar that's currently large (about 8.7MB).
  • Not a part of the standard Apache Ant taskdef library, but occupies the org.apache.tools.ant.taskdefs.Shade class, and probably should be moved to another non-Apache package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.