Re: main-class + module-version

2018-02-03 Thread Plamen Totev
Hi, I've done some work on implementing `PlexusArchiver` that creates modular JAR files using the JDK `jar` tool (`ToolProvider`)[1]. It is still work in progress but I wanted to ask for you opinion - if there are no objections I'll polish it(fix the code formatting, implement the TODO items,

Re: main-class + module-version

2018-01-16 Thread Plamen Totev
Hi Robert, On 1/15/2018 10:10 PM, Robert Scholte wrote: > Hi Plamen, > > Alan Bateman has provided some valuable information: Thank you for sharing this. It's really helpful. On 1/15/2018 10:10 PM, Robert Scholte wrote: 1. MR JARs weren't mentioned. The jar tool does validation to ensure that

Re: main-class + module-version

2018-01-15 Thread Robert Scholte
Hi Plamen, Alan Bateman has provided some valuable information: --- A first step to use the ToolProvider to run the jar tool make sense, should be easy to do. We've done quite a bit of work on the jar tool performance in the last few years so the performance might not be too bad. Updating

Re: main-class + module-version

2018-01-15 Thread Andreas Sewe
Robert Scholte wrote: > Plexus Archiver is an archiver fully written in Java, so there has never > been the need to add toolchain support. > > It would be very nice if this could be solved without the need of the > external jartool or using it via a ToolProvider[1]. Also, if two separate tools

Re: main-class + module-version

2018-01-15 Thread Plamen Totev
Hi, On Mon, Jan 15, 2018 at 8:23 PM, Robert Scholte wrote: > So maybe we simply have to split it up into smaller pieces. > I think we can already make people happy by adding the version to the > module-info file, assuming all other added features are actually nice to >

Re: main-class + module-version

2018-01-15 Thread Robert Scholte
Plexus Archiver is an archiver fully written in Java, so there has never been the need to add toolchain support. It would be very nice if this could be solved without the need of the external jartool or using it via a ToolProvider[1]. So maybe we simply have to split it up into smaller

Re: main-class + module-version

2018-01-15 Thread Plamen Totev
Hi, On 12/20/2017 9:53 PM, Robert Scholte wrote: Based on this message it seems worth implementing a JarToolArchiver, using the jar tool via the ToolProvider[1] I hope it can still be a org.codehaus.plexus.archiver.Archiver, otherwise I'll contact the openjdk team about the details of the

Re: main-class + module-version

2017-12-20 Thread Plamen Totev
Hi, Actually that might just work. Good idea. I'll take a look at it. Thanks, Plamen Totev On Wed, Dec 20, 2017 at 9:53 PM, Robert Scholte wrote: > On Wed, 20 Dec 2017 07:40:24 +0100, Plamen Totev > wrote: > >> Hi, >> >> I've started working on

Re: main-class + module-version

2017-12-20 Thread Robert Scholte
On Wed, 20 Dec 2017 07:40:24 +0100, Plamen Totev wrote: Hi, I've started working on implementing support for modular JARs in Plexus Archiver but as I research the matter I found that they are more complex than I expected. I've updated the GitHub issue[1] with the

Re: main-class + module-version

2017-12-19 Thread Plamen Totev
Hi, I've started working on implementing support for modular JARs in Plexus Archiver but as I research the matter I found that they are more complex than I expected. I've updated the GitHub issue[1] with the details but I'll post the findings here as well. The modular JAR files contain not only

Re: main-class + module-version

2017-10-26 Thread Plamen Totev
Hi, I've just implemented support for adding module version and main class. There is pull request[1] and comments and suggestions are more than welcome. The following excerpt from the test showcase how you can add module version and main class to a modular JAR fie: JarArchiver archiver = new

Re: main-class + module-version

2017-09-06 Thread Plamen Totev
Hi, I've started working on this one. Unfortunately I don't have as much free time as I expected so the progress is a bit slow. With the release date of Java 9 approaching I hope this does not block any other release. I've just pushed my implementation [1]. It's not fully ready yet as there are

Re: main-class + module-version

2017-08-29 Thread Plamen Totev
Hi Robert, > > I've started a bit with it, but no success yet: > https://mail.ow2.org/wws/arc/asm/2017-08/msg4.html > > Even after the suggestions from Remi no success yet. > I was hoping for a fast fix, but it'll take more time and other things are > waiting as well. > Would be great if you

Re: main-class + module-version

2017-08-29 Thread Robert Scholte
Hi Plamen, On Tue, 29 Aug 2017 07:46:59 +0200, Plamen Totev wrote: Hi Robert, Thank you for you comments. Also I took a look at the changes in the JDK jar tool and I notice a couple of things that it does: 1. The structure of the jar produced is such that the

Re: main-class + module-version

2017-08-28 Thread Plamen Totev
Hi Robert, Thank you for you comments. >> Also I took a look at the changes in the JDK jar tool and I notice a >> couple of things that it does: >> >> 1. The structure of the jar produced is such that the module info >> entries are placed after the manifest and before the rest of the >> files.

Re: main-class + module-version

2017-08-28 Thread Robert Scholte
On Mon, 28 Aug 2017 07:32:36 +0200, Plamen Totev wrote: Hi, On Fri, Aug 25, 2017 at 6:57 PM, Robert Scholte wrote: I'm having a look at the JarArchiver of the plexus-archiver project as used by maven-jar-plugin. This archiver does some

Re: main-class + module-version

2017-08-27 Thread Plamen Totev
Hi, On Fri, Aug 25, 2017 at 6:57 PM, Robert Scholte wrote: > I'm having a look at the JarArchiver of the plexus-archiver project as used > by maven-jar-plugin. > This archiver does some MANIFEST and index stuff already, so it kind of > makes sense to add the

Re: main-class + module-version

2017-08-25 Thread Robert Scholte
Hi all, I'm having a look at the JarArchiver of the plexus-archiver project as used by maven-jar-plugin. This archiver does some MANIFEST and index stuff already, so it kind of makes sense to add the module-descriptor logic here as well. That will make it reusable as mentioned by Olivier and

Re: main-class + module-version

2017-08-23 Thread Olivier Lamy
Hi Well makes sense!. I was only thinking about the shaded uber jar use case (we have to keep this one in mind as well) We probably need to make an extra component if we want to reuse this in both plugins. On 24 August 2017 at 08:07, Andreas Gudian wrote: > I find the

Re: main-class + module-version

2017-08-23 Thread Andreas Gudian
I find the arguments by Plamen very convincing. As a user I would look for that configuration where I previously did the same thing when it ended up in the Manifest: in the config of the jar plugin. I wouldn't expect to suddenly switch to the shade plugin to be able to define the main class or the

Re: main-class + module-version

2017-08-23 Thread Robert Scholte
On Wed, 23 Aug 2017 08:11:35 +0200, Plamen Totev wrote: On Tue, Aug 22, 2017 at 11:03 PM, Robert Scholte wrote: The maven-shade-plugin has the ability to re-package a jar and manipulate any type of file, including class files. The best

Re: main-class + module-version

2017-08-23 Thread Plamen Totev
On Tue, Aug 22, 2017 at 11:03 PM, Robert Scholte wrote: > > > The maven-shade-plugin has the ability to re-package a jar and manipulate any > type of file, including class files. The best example is relocation, where > you give a set of classes a different package to

Re: main-class + module-version

2017-08-22 Thread Chas Honton
Jar plugin is used more often than shade plugin. (I dis-recommend shade since provenance of classes is difficult or impossible to trace.). If module version is required to make jar useful, then jar plugin appears more appropriate. Chas > On Aug 22, 2017, at 6:10 PM, Olivier Lamy

Re: main-class + module-version

2017-08-22 Thread Olivier Lamy
+1 for shade plugin looks to be the most appropriate location to do this. On 23 August 2017 at 06:03, Robert Scholte wrote: > On Tue, 22 Aug 2017 21:23:10 +0200, Plamen Totev < > plamen.iv.to...@gmail.com> wrote: > > Hi, >> >> I've experimented with Maven and Java 9 the

Re: main-class + module-version

2017-08-22 Thread Robert Scholte
On Tue, 22 Aug 2017 21:23:10 +0200, Plamen Totev wrote: Hi, I've experimented with Maven and Java 9 the last weekend and actually one of the things I noticed is that currently I could not set the module version. I do agree that the packaging should be stupid

Re: main-class + module-version

2017-08-22 Thread Plamen Totev
Hi, I've experimented with Maven and Java 9 the last weekend and actually one of the things I noticed is that currently I could not set the module version. I do agree that the packaging should be stupid action and the module-info transformation should happen before that. But I'm not sure why the

main-class + module-version

2017-08-22 Thread Robert Scholte
Hi, The JDK 9 jar packager comes with 2 extra options: main-class and module-version. The first one is used in case of an executable modular jar, the latter is just for display/analysis to show which version of a specific module is used. To support these 2 values, the module-info.class