commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: svn commit: r1744720 - /commons/proper/codec/trunk/pom.xml
Date Fri, 20 May 2016 17:19:48 GMT
On Fri, May 20, 2016 at 10:13 AM, sebb <sebbaz@gmail.com> wrote:

> On 20 May 2016 at 18:05, Gary Gregory <garydgregory@gmail.com> wrote:
> > Hi,
> >
> > Can't the shade plugin could do the pruning with its minimize feature?
>
> It's more than just a prune; the manifest also needs to be updated
> with the main class.
>
> But if you want to try it, go ahead.
>
> Note that you would still need much of the above patch.
> The new jar still needs to be signed, and the code dropped from normal
> jars.
>

Hm, seems just as tricky as what you have now. Let's stick with what you've
got.

Gary

>
> > Gary
> >
> > ---------- Forwarded message ----------
> > From: <sebb@apache.org>
> > Date: Fri, May 20, 2016 at 4:42 AM
> > Subject: svn commit: r1744720 - /commons/proper/codec/trunk/pom.xml
> > To: commits@commons.apache.org
> >
> >
> > Author: sebb
> > Date: Fri May 20 11:42:18 2016
> > New Revision: 1744720
> >
> > URL: http://svn.apache.org/viewvc?rev=1744720&view=rev
> > Log:
> > Add support for creating cli jar (currently only Digest)
> >
> > Modified:
> >     commons/proper/codec/trunk/pom.xml
> >
> > Modified: commons/proper/codec/trunk/pom.xml
> > URL:
> >
> http://svn.apache.org/viewvc/commons/proper/codec/trunk/pom.xml?rev=1744720&r1=1744719&r2=1744720&view=diff
> >
> ==============================================================================
> > --- commons/proper/codec/trunk/pom.xml (original)
> > +++ commons/proper/codec/trunk/pom.xml Fri May 20 11:42:18 2016
> > @@ -252,6 +252,101 @@ limitations under the License.
> >        </plugins>
> >      </pluginManagement>
> >      <plugins>
> > +
> > +      <!-- Exclude cli from source jar -->
> > +      <plugin>
> > +          <groupId>org.apache.maven.plugins</groupId>
> > +          <artifactId>maven-source-plugin</artifactId>
> > +          <configuration>
> > +              <excludes>
> > +                  <exclude>**/cli/**</exclude>
> > +              </excludes>
> > +          </configuration>
> > +      </plugin>
> > +
> > +      <!-- Exclude cli from binary jar -->
> > +      <plugin>
> > +          <groupId>org.apache.maven.plugins</groupId>
> > +          <artifactId>maven-jar-plugin</artifactId>
> > +          <configuration>
> > +              <excludes>
> > +                  <exclude>**/cli/**</exclude>
> > +              </excludes>
> > +          </configuration>
> > +      </plugin>
> > +
> > +      <!-- Create CLI jar -->
> > +      <plugin>
> > +          <artifactId>maven-antrun-plugin</artifactId>
> > +          <executions>
> > +              <execution>
> > +                  <phase>package</phase>
> > +                  <configuration>
> > +                      <target>
> > +                          <!--
> > +                              Create the binary cli jar, which will be
> > added to the binary zip/tgz,
> > +                              but not deployed independently to Maven
> > +                          -->
> > +                          <jar
> > destfile="target/commons-codec-cli-${project.version}.jar">
> > +                              <metainf dir="${basedir}"
> > includes="NOTICE.txt,LICENSE.txt" />
> > +                              <manifest>
> > +                                  <attribute name="Extension-Name"
> value="
> > org.apache.commons.net" />
> > +                                  <attribute name="Specification-Title"
> > value="${project.name}" />
> > +                                  <attribute name="Implementation-Title"
> > value="${project.name}" />
> > +                                  <attribute
> name="Implementation-Vendor"
> > value="${project.organization.name}" />
> > +                                  <attribute
> name="Implementation-Version"
> > value="${project.version}" />
> > +                                  <attribute
> > name="Implementation-Vendor-Id" value="org.apache" />
> > +                                  <attribute name="Implementation-Build"
> > value="${implementation.build}"/>
> > +                                  <attribute name="X-Compile-Source-JDK"
> > value="${maven.compiler.source}" />
> > +                                  <attribute name="X-Compile-Target-JDK"
> > value="${maven.compiler.target}" />
> > +                                  <attribute name="Main-Class"
> > value="org.apache.commons.codec.cli.Digest" />
> > +                              </manifest>
> > +                              <fileset dir="target/classes"
> > includes="org/apache/commons/codec/cli/**"/>
> > +                              <fileset dir="target/classes"
> > includes="org/apache/commons/codec/BinaryDecoder.class"/>
> > +                              <fileset dir="target/classes"
> > includes="org/apache/commons/codec/BinaryEncoder.class"/>
> > +                              <fileset dir="target/classes"
> > includes="org/apache/commons/codec/Charsets.class"/>
> > +                              <fileset dir="target/classes"
> > includes="org/apache/commons/codec/Decoder.class"/>
> > +                              <fileset dir="target/classes"
> > includes="org/apache/commons/codec/DecoderException.class"/>
> > +                              <fileset dir="target/classes"
> > includes="org/apache/commons/codec/Encoder.class"/>
> > +                              <fileset dir="target/classes"
> > includes="org/apache/commons/codec/EncoderException.class"/>
> > +                              <fileset dir="target/classes"
> > includes="org/apache/commons/codec/binary/Hex.class"/>
> > +                              <fileset dir="target/classes"
> > includes="org/apache/commons/codec/digest/DigestUtils.class"/>
> > +                              <fileset dir="target/classes"
> >
> includes="org/apache/commons/codec/digest/MessageDigestAlgorithms.class"/>
> > +                          </jar>
> > +                      </target>
> > +                  </configuration>
> > +                  <goals>
> > +                      <goal>run</goal>
> > +                  </goals>
> > +              </execution>
> > +          </executions>
> > +      </plugin>
> > +
> > +      <!--  Attaches the cli JAR to the Maven lifecycle
> > +            to ensure it will be signed and deployed as normal -->
> > +      <plugin>
> > +          <groupId>org.codehaus.mojo</groupId>
> > +          <artifactId>build-helper-maven-plugin</artifactId>
> > +          <executions>
> > +              <execution>
> > +                  <id>attach-artifacts</id>
> > +                  <phase>package</phase>
> > +                  <goals>
> > +                      <goal>attach-artifact</goal>
> > +                  </goals>
> > +                  <configuration>
> > +                      <artifacts>
> > +                          <artifact>
> > +
> > <file>target/commons-codec-cli-${project.version}.jar</file>
> > +                              <type>jar</type>
> > +                              <classifier>cli</classifier>
> > +                          </artifact>
> > +                      </artifacts>
> > +                  </configuration>
> > +              </execution>
> > +          </executions>
> > +      </plugin>
> > +
> >        <plugin>
> >          <groupId>org.apache.maven.plugins</groupId>
> >          <artifactId>maven-surefire-plugin</artifactId>
> >
> >
> >
> >
> >
> > --
> > E-Mail: garydgregory@gmail.com | ggregory@apache.org
> > Java Persistence with Hibernate, Second Edition
> > <http://www.manning.com/bauer3/>
> > JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> > Spring Batch in Action <http://www.manning.com/templier/>
> > Blog: http://garygregory.wordpress.com
> > Home: http://garygregory.com/
> > Tweet! http://twitter.com/GaryGregory
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message