You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2020/01/16 10:06:34 UTC

[tomcat-jakartaee-migration] branch master updated: Shade and add a main class

This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
     new 86bc4ee  Shade and add a main class
86bc4ee is described below

commit 86bc4eea2804fa5df6a5089dd4a232847b709c91
Author: remm <re...@apache.org>
AuthorDate: Thu Jan 16 11:06:25 2020 +0100

    Shade and add a main class
    
    It seems easier to use to me: "java -jar overlylongjarname.jar src
    dest". The overlylongjarname could be trimmed down a bit.
---
 pom.xml | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/pom.xml b/pom.xml
index 1370d14..ceeb2cf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -82,6 +82,18 @@
     </resources>   
     <plugins>
       <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <configuration>
+          <archive>
+            <manifest>
+              <addClasspath>true</addClasspath>
+              <mainClass>org.apache.tomcat.jakartaee.Migration</mainClass>
+            </manifest>
+          </archive>
+        </configuration>
+      </plugin>
+      <plugin>
         <!-- NOTE: We don't need a groupId specification because the group is
              org.apache.maven.plugins ...which is assumed by default.
          -->
@@ -93,6 +105,18 @@
           </descriptors>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-shade-plugin</artifactId>
+        <executions>
+          <execution>
+            <phase>package</phase>
+            <goals>
+              <goal>shade</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
     


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [tomcat-jakartaee-migration] branch master updated: Shade and add a main class

Posted by Mark Thomas <ma...@apache.org>.
On 16/01/2020 11:53, Rémy Maucherat wrote:
> On Thu, Jan 16, 2020 at 11:58 AM Mark Thomas <markt@apache.org
> <ma...@apache.org>> wrote:
> 
>     On 16/01/2020 10:27, Rémy Maucherat wrote:
>     > On Thu, Jan 16, 2020 at 11:06 AM <remm@apache.org
>     <ma...@apache.org>
>     > <mailto:remm@apache.org <ma...@apache.org>>> wrote:
>     >
>     >     This is an automated email from the ASF dual-hosted git
>     repository.
>     >
>     >     remm pushed a commit to branch master
>     >     in repository
>     >     https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
>     >
>     >
>     >     The following commit(s) were added to refs/heads/master by
>     this push:
>     >          new 86bc4ee  Shade and add a main class
>     >     86bc4ee is described below
>     >
>     >     commit 86bc4eea2804fa5df6a5089dd4a232847b709c91
>     >     Author: remm <remm@apache.org <ma...@apache.org>
>     <mailto:remm@apache.org <ma...@apache.org>>>
>     >     AuthorDate: Thu Jan 16 11:06:25 2020 +0100
>     >
>     >         Shade and add a main class
>     >
>     >         It seems easier to use to me: "java -jar
>     overlylongjarname.jar src
>     >         dest". The overlylongjarname could be trimmed down a bit.
>     >
>     >
>     > So there's an option between this way and the assembly that was added
>     > (which I'm not sure how to use).
> 
>     If I understand your changes correctly, they create a single "fat" jar.
>     Is that right?
> 
> 
> Yes, so it includes BCEL.
>  
> 
> 
>     My thinking with the assembly approach (and I don't think the two
>     approaches are mutually exclusive) was:
> 
>     - looking towards a formal ASF release where we would want bin and
>       source releases
> 
>     - to make it easier to "plug-in" additional convertors for specific file
>       types.
> 
>     I'm just guessing at requirements at this point. Given where things are
>     right now, I think a single JAR makes most sense. It is much easier to
>     work with during development: (build, use) rather than (build,
>     unpack, use)
> 
>     At the moment the script just sets up the class path. I have no
>     objection to removing the assembly plumbing for now. We can always add
>     it back if we need it.
> 
> Well, that's not a bad idea since that's how the releases are done and I
> didn't think about the plugin idea, I get it better now.
> I guess I can keep my hack pom :)

Sorry, I should have been clearer. I'm in favour of keeping the single
JAR via the shade plug-in- it makes it easier to work with during
development / testing.

We can still use the assembly to produce a final release (if we get to
the point of formally releasing this).

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [tomcat-jakartaee-migration] branch master updated: Shade and add a main class

Posted by Rémy Maucherat <re...@apache.org>.
On Thu, Jan 16, 2020 at 11:58 AM Mark Thomas <ma...@apache.org> wrote:

> On 16/01/2020 10:27, Rémy Maucherat wrote:
> > On Thu, Jan 16, 2020 at 11:06 AM <remm@apache.org
> > <ma...@apache.org>> wrote:
> >
> >     This is an automated email from the ASF dual-hosted git repository.
> >
> >     remm pushed a commit to branch master
> >     in repository
> >     https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
> >
> >
> >     The following commit(s) were added to refs/heads/master by this push:
> >          new 86bc4ee  Shade and add a main class
> >     86bc4ee is described below
> >
> >     commit 86bc4eea2804fa5df6a5089dd4a232847b709c91
> >     Author: remm <remm@apache.org <ma...@apache.org>>
> >     AuthorDate: Thu Jan 16 11:06:25 2020 +0100
> >
> >         Shade and add a main class
> >
> >         It seems easier to use to me: "java -jar overlylongjarname.jar
> src
> >         dest". The overlylongjarname could be trimmed down a bit.
> >
> >
> > So there's an option between this way and the assembly that was added
> > (which I'm not sure how to use).
>
> If I understand your changes correctly, they create a single "fat" jar.
> Is that right?
>

Yes, so it includes BCEL.


>
> My thinking with the assembly approach (and I don't think the two
> approaches are mutually exclusive) was:
>
> - looking towards a formal ASF release where we would want bin and
>   source releases
>
> - to make it easier to "plug-in" additional convertors for specific file
>   types.
>
> I'm just guessing at requirements at this point. Given where things are
> right now, I think a single JAR makes most sense. It is much easier to
> work with during development: (build, use) rather than (build, unpack, use)
>
> At the moment the script just sets up the class path. I have no
> objection to removing the assembly plumbing for now. We can always add
> it back if we need it.
>
> Well, that's not a bad idea since that's how the releases are done and I
didn't think about the plugin idea, I get it better now.
I guess I can keep my hack pom :)

Rémy

Re: [tomcat-jakartaee-migration] branch master updated: Shade and add a main class

Posted by Mark Thomas <ma...@apache.org>.
On 16/01/2020 10:27, Rémy Maucherat wrote:
> On Thu, Jan 16, 2020 at 11:06 AM <remm@apache.org
> <ma...@apache.org>> wrote:
> 
>     This is an automated email from the ASF dual-hosted git repository.
> 
>     remm pushed a commit to branch master
>     in repository
>     https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
> 
> 
>     The following commit(s) were added to refs/heads/master by this push:
>          new 86bc4ee  Shade and add a main class
>     86bc4ee is described below
> 
>     commit 86bc4eea2804fa5df6a5089dd4a232847b709c91
>     Author: remm <remm@apache.org <ma...@apache.org>>
>     AuthorDate: Thu Jan 16 11:06:25 2020 +0100
> 
>         Shade and add a main class
> 
>         It seems easier to use to me: "java -jar overlylongjarname.jar src
>         dest". The overlylongjarname could be trimmed down a bit.
> 
> 
> So there's an option between this way and the assembly that was added
> (which I'm not sure how to use).

If I understand your changes correctly, they create a single "fat" jar.
Is that right?

My thinking with the assembly approach (and I don't think the two
approaches are mutually exclusive) was:

- looking towards a formal ASF release where we would want bin and
  source releases

- to make it easier to "plug-in" additional convertors for specific file
  types.

I'm just guessing at requirements at this point. Given where things are
right now, I think a single JAR makes most sense. It is much easier to
work with during development: (build, use) rather than (build, unpack, use)

At the moment the script just sets up the class path. I have no
objection to removing the assembly plumbing for now. We can always add
it back if we need it.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: [tomcat-jakartaee-migration] branch master updated: Shade and add a main class

Posted by Rémy Maucherat <re...@apache.org>.
On Thu, Jan 16, 2020 at 11:06 AM <re...@apache.org> wrote:

> This is an automated email from the ASF dual-hosted git repository.
>
> remm pushed a commit to branch master
> in repository
> https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
>
>
> The following commit(s) were added to refs/heads/master by this push:
>      new 86bc4ee  Shade and add a main class
> 86bc4ee is described below
>
> commit 86bc4eea2804fa5df6a5089dd4a232847b709c91
> Author: remm <re...@apache.org>
> AuthorDate: Thu Jan 16 11:06:25 2020 +0100
>
>     Shade and add a main class
>
>     It seems easier to use to me: "java -jar overlylongjarname.jar src
>     dest". The overlylongjarname could be trimmed down a bit.
>

So there's an option between this way and the assembly that was added
(which I'm not sure how to use).

Rémy


> ---
>  pom.xml | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
>
> diff --git a/pom.xml b/pom.xml
> index 1370d14..ceeb2cf 100644
> --- a/pom.xml
> +++ b/pom.xml
> @@ -82,6 +82,18 @@
>      </resources>
>      <plugins>
>        <plugin>
> +        <groupId>org.apache.maven.plugins</groupId>
> +        <artifactId>maven-jar-plugin</artifactId>
> +        <configuration>
> +          <archive>
> +            <manifest>
> +              <addClasspath>true</addClasspath>
> +              <mainClass>org.apache.tomcat.jakartaee.Migration</mainClass>
> +            </manifest>
> +          </archive>
> +        </configuration>
> +      </plugin>
> +      <plugin>
>          <!-- NOTE: We don't need a groupId specification because the
> group is
>               org.apache.maven.plugins ...which is assumed by default.
>           -->
> @@ -93,6 +105,18 @@
>            </descriptors>
>          </configuration>
>        </plugin>
> +      <plugin>
> +        <groupId>org.apache.maven.plugins</groupId>
> +        <artifactId>maven-shade-plugin</artifactId>
> +        <executions>
> +          <execution>
> +            <phase>package</phase>
> +            <goals>
> +              <goal>shade</goal>
> +            </goals>
> +          </execution>
> +        </executions>
> +      </plugin>
>      </plugins>
>    </build>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>
>