You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by dr...@apache.org on 2015/07/13 01:42:02 UTC

directory-kerby git commit: DIRKRB-351 Create the kerb client api uber jar using the maven shade plugin for fine-grained control

Repository: directory-kerby
Updated Branches:
  refs/heads/master e7300c5a2 -> a19368291


DIRKRB-351 Create the kerb client api uber jar using the maven shade plugin for fine-grained control


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/a1936829
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/a1936829
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/a1936829

Branch: refs/heads/master
Commit: a193682915170464f5ce81e0b48c1c1256bb7fd1
Parents: e7300c5
Author: drankye <ka...@intel.com>
Authored: Mon Jul 13 07:41:20 2015 +0800
Committer: Drankye <dr...@gmail.com>
Committed: Mon Jul 13 07:41:20 2015 +0800

----------------------------------------------------------------------
 kerby-kerb/kerb-client-api-all/pom.xml | 71 ++++++++++++-----------------
 1 file changed, 30 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a1936829/kerby-kerb/kerb-client-api-all/pom.xml
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client-api-all/pom.xml b/kerby-kerb/kerb-client-api-all/pom.xml
index d672636..c813dd5 100644
--- a/kerby-kerb/kerb-client-api-all/pom.xml
+++ b/kerby-kerb/kerb-client-api-all/pom.xml
@@ -31,38 +31,6 @@
       <groupId>org.apache.kerby</groupId>
       <artifactId>kerb-client</artifactId>
       <version>${project.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.slf4j</groupId>
-          <artifactId>slf4j-api</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.kerby</groupId>
-      <artifactId>kerb-common</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.kerby</groupId>
-      <artifactId>kerb-core</artifactId>
-      <version>${project.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.kerby</groupId>
-          <artifactId>kerby-asn1</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.kerby</groupId>
-      <artifactId>kerb-crypto</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.kerby</groupId>
-      <artifactId>kerb-util</artifactId>
-      <version>${project.version}</version>
     </dependency>
   </dependencies>
 
@@ -73,25 +41,46 @@
         <plugins>
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-assembly-plugin</artifactId>
-            <version>2.2</version>
+            <artifactId>maven-shade-plugin</artifactId>
+            <version>2.4</version>
             <executions>
               <execution>
-                <id>package-all</id>
                 <phase>package</phase>
                 <goals>
-                  <goal>single</goal>
+                  <goal>shade</goal>
                 </goals>
                 <configuration>
-                  <descriptorRefs>
-                    <descriptorRef>jar-with-dependencies</descriptorRef>
-                  </descriptorRefs>
-                  <finalName>kerb-client-api-all-${project.version}</finalName>
-                  <appendAssemblyId>false</appendAssemblyId>
+                  <finalName>kerb-client-api-all-${project.version}.jar</finalName>
+                  <artifactSet>
+                    <excludes>
+                      <exclude>junit:junit</exclude>
+                      <exclude>org.slf4j:slf4j-api</exclude>
+                      <exclude>org.apache.kerby:kerby-asn1</exclude>
+                    </excludes>
+                  </artifactSet>
                 </configuration>
               </execution>
             </executions>
           </plugin>
+          <plugin>
+            <!-- A temp work around to correct the generated jar file name -->
+            <artifactId>maven-antrun-plugin</artifactId>
+            <version>1.7</version>
+            <executions>
+              <execution>
+                <phase>package</phase>
+                <configuration>
+                  <tasks>
+                    <rename src="target/kerb-client-api-all-${project.version}.jar.pom"
+                            dest="target/kerb-client-api-all-${project.version}.jar" />
+                  </tasks>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
         </plugins>
       </build>
     </profile>


RE: FW: directory-kerby git commit: DIRKRB-351 Create the kerb client api uber jar using the maven shade plugin for fine-grained control

Posted by "Zheng, Kai" <ka...@intel.com>.
Like a dry-run to show all the steps. Good idea! 

-----Original Message-----
From: Emmanuel Lécharny [mailto:elecharny@gmail.com] 
Sent: Monday, July 13, 2015 1:46 PM
To: Apache Directory Developers List
Subject: Re: FW: directory-kerby git commit: DIRKRB-351 Create the kerb client api uber jar using the maven shade plugin for fine-grained control

Le 13/07/15 07:37, Zheng, Kai a écrit :
> Anyway perhaps the plugin should give a warning in this case before generating the strange *.pom (in fact a jar) file ...

Maven just does whet you tell it to do. It would be so fine if we could have a debugger that shows what Maven is going to do based on the pom file, with the possibibilty to step :-)

Re: FW: directory-kerby git commit: DIRKRB-351 Create the kerb client api uber jar using the maven shade plugin for fine-grained control

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 13/07/15 07:37, Zheng, Kai a écrit :
> Anyway perhaps the plugin should give a warning in this case before generating the strange *.pom (in fact a jar) file ...

Maven just does whet you tell it to do. It would be so fine if we could
have a debugger that shows what Maven is going to do based on the pom
file, with the possibibilty to step :-)

RE: FW: directory-kerby git commit: DIRKRB-351 Create the kerb client api uber jar using the maven shade plugin for fine-grained control

Posted by "Zheng, Kai" <ka...@intel.com>.
Yeah, I was hanging there for quite some time. I was thinking it's the plugin's bug so ... Anyway perhaps the plugin should give a warning in this case before generating the strange *.pom (in fact a jar) file ...

-----Original Message-----
From: Emmanuel Lécharny [mailto:elecharny@gmail.com] 
Sent: Monday, July 13, 2015 1:28 PM
To: Apache Directory Developers List
Subject: Re: FW: directory-kerby git commit: DIRKRB-351 Create the kerb client api uber jar using the maven shade plugin for fine-grained control

Le 13/07/15 07:12, Zheng, Kai a écrit :
> You're absolutely right, thanks a lot, Emmanuel!

I have been hit by the same problem, banged my head against wall for hours, before someone pointed me to this very simple mistake. Your turn ;-)


Re: FW: directory-kerby git commit: DIRKRB-351 Create the kerb client api uber jar using the maven shade plugin for fine-grained control

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 13/07/15 07:12, Zheng, Kai a écrit :
> You're absolutely right, thanks a lot, Emmanuel!

I have been hit by the same problem, banged my head against wall for
hours, before someone pointed me to this very simple mistake. Your turn ;-)


RE: FW: directory-kerby git commit: DIRKRB-351 Create the kerb client api uber jar using the maven shade plugin for fine-grained control

Posted by "Zheng, Kai" <ka...@intel.com>.
You're absolutely right, thanks a lot, Emmanuel!

Regards,
Kai

-----Original Message-----
From: Emmanuel Lécharny [mailto:elecharny@gmail.com] 
Sent: Monday, July 13, 2015 12:46 PM
To: Apache Directory Developers List
Subject: Re: FW: directory-kerby git commit: DIRKRB-351 Create the kerb client api uber jar using the maven shade plugin for fine-grained control

Le 13/07/15 01:45, Zheng, Kai a écrit :
> Hello all,
>
> Would anybody look at this change and give me any hint how to get rid 
> of the temp work around? I'm using maven shade plugin to generate the uber jar, but the generated jar file is ended with '.pom' instead of '.jar' so I have to append extra ant task to rename/correct it. The ant task is just a work around and I wish to get rid of it. Thanks.
Change the packaging from 'pom' to 'jar' :

<packaging>pom</packaging> -> <packaging>jar</packaging>

That should do the trick


Re: FW: directory-kerby git commit: DIRKRB-351 Create the kerb client api uber jar using the maven shade plugin for fine-grained control

Posted by Emmanuel Lécharny <el...@gmail.com>.
Le 13/07/15 01:45, Zheng, Kai a écrit :
> Hello all,
>
> Would anybody look at this change and give me any hint how to get rid of the temp work around? I'm using maven shade plugin to generate the uber jar, but the generated jar file is ended with '.pom' instead of '.jar' so I have to append extra
> ant task to rename/correct it. The ant task is just a work around and I wish to get rid of it. Thanks.
Change the packaging from 'pom' to 'jar' :

<packaging>pom</packaging> -> <packaging>jar</packaging>

That should do the trick


FW: directory-kerby git commit: DIRKRB-351 Create the kerb client api uber jar using the maven shade plugin for fine-grained control

Posted by "Zheng, Kai" <ka...@intel.com>.
Hello all,

Would anybody look at this change and give me any hint how to get rid of the temp work around? I'm using maven shade plugin to generate the uber jar, but the generated jar file is ended with '.pom' instead of '.jar' so I have to append extra
ant task to rename/correct it. The ant task is just a work around and I wish to get rid of it. Thanks.

Regards,
Kai

-----Original Message-----
From: drankye@apache.org [mailto:drankye@apache.org] 
Sent: Monday, July 13, 2015 7:42 AM
To: commits@directory.apache.org
Subject: directory-kerby git commit: DIRKRB-351 Create the kerb client api uber jar using the maven shade plugin for fine-grained control

Repository: directory-kerby
Updated Branches:
  refs/heads/master e7300c5a2 -> a19368291


DIRKRB-351 Create the kerb client api uber jar using the maven shade plugin for fine-grained control


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/a1936829
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/a1936829
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/a1936829

Branch: refs/heads/master
Commit: a193682915170464f5ce81e0b48c1c1256bb7fd1
Parents: e7300c5
Author: drankye <ka...@intel.com>
Authored: Mon Jul 13 07:41:20 2015 +0800
Committer: Drankye <dr...@gmail.com>
Committed: Mon Jul 13 07:41:20 2015 +0800

----------------------------------------------------------------------
 kerby-kerb/kerb-client-api-all/pom.xml | 71 ++++++++++++-----------------
 1 file changed, 30 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/a1936829/kerby-kerb/kerb-client-api-all/pom.xml
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client-api-all/pom.xml b/kerby-kerb/kerb-client-api-all/pom.xml
index d672636..c813dd5 100644
--- a/kerby-kerb/kerb-client-api-all/pom.xml
+++ b/kerby-kerb/kerb-client-api-all/pom.xml
@@ -31,38 +31,6 @@
       <groupId>org.apache.kerby</groupId>
       <artifactId>kerb-client</artifactId>
       <version>${project.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.slf4j</groupId>
-          <artifactId>slf4j-api</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.kerby</groupId>
-      <artifactId>kerb-common</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.kerby</groupId>
-      <artifactId>kerb-core</artifactId>
-      <version>${project.version}</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.kerby</groupId>
-          <artifactId>kerby-asn1</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.kerby</groupId>
-      <artifactId>kerb-crypto</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.kerby</groupId>
-      <artifactId>kerb-util</artifactId>
-      <version>${project.version}</version>
     </dependency>
   </dependencies>
 
@@ -73,25 +41,46 @@
         <plugins>
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-assembly-plugin</artifactId>
-            <version>2.2</version>
+            <artifactId>maven-shade-plugin</artifactId>
+            <version>2.4</version>
             <executions>
               <execution>
-                <id>package-all</id>
                 <phase>package</phase>
                 <goals>
-                  <goal>single</goal>
+                  <goal>shade</goal>
                 </goals>
                 <configuration>
-                  <descriptorRefs>
-                    <descriptorRef>jar-with-dependencies</descriptorRef>
-                  </descriptorRefs>
-                  <finalName>kerb-client-api-all-${project.version}</finalName>
-                  <appendAssemblyId>false</appendAssemblyId>
+                  <finalName>kerb-client-api-all-${project.version}.jar</finalName>
+                  <artifactSet>
+                    <excludes>
+                      <exclude>junit:junit</exclude>
+                      <exclude>org.slf4j:slf4j-api</exclude>
+                      <exclude>org.apache.kerby:kerby-asn1</exclude>
+                    </excludes>
+                  </artifactSet>
                 </configuration>
               </execution>
             </executions>
           </plugin>
+          <plugin>
+            <!-- A temp work around to correct the generated jar file name -->
+            <artifactId>maven-antrun-plugin</artifactId>
+            <version>1.7</version>
+            <executions>
+              <execution>
+                <phase>package</phase>
+                <configuration>
+                  <tasks>
+                    <rename src="target/kerb-client-api-all-${project.version}.jar.pom"
+                            dest="target/kerb-client-api-all-${project.version}.jar" />
+                  </tasks>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
         </plugins>
       </build>
     </profile>