Re: Starting a pure Java 9 modular project

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Starting a pure Java 9 modular project

org.apache.maven.user
On 2017-09-18T19:44:54 +0200
"Robert Scholte" <[hidden email]> wrote:

> For every deliverable you will have one Maven project (and 1 pom.xml).
> So for a Maven point of view it doesn't make sense to support the jigsaw  
> multi module option.

Good! That's what I'd suspected (and hoped!)

> Here are the things you *DON'T* have to change:
> - folder structure
> - dependencies of your pom.xml (you don't specify which jars are modules  
> and which aren't, Maven will resolve that for you.
>
> You only have to add the module-info.java to the source root and use at  
> least maven-compiler-plugin 3.7.0

Got it.

Presumably I also need to tell the compiler that I want to produce code
for release 9 via the plugin equivalent of the new --release flag?
Assuming there is one, that is. I understand the bytecode version has
been incremented again, so I'd want to be producing 9 bytecode.

--
Mark Raynsford | http://www.io7m.com

attachment0 (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Starting a pure Java 9 modular project

rfscholte
On Mon, 18 Sep 2017 19:57:33 +0200, Mark Raynsford  
<[hidden email]> wrote:

> On 2017-09-18T19:44:54 +0200
> "Robert Scholte" <[hidden email]> wrote:
>
>> For every deliverable you will have one Maven project (and 1 pom.xml).
>> So for a Maven point of view it doesn't make sense to support the jigsaw
>> multi module option.
>
> Good! That's what I'd suspected (and hoped!)
>
>> Here are the things you *DON'T* have to change:
>> - folder structure
>> - dependencies of your pom.xml (you don't specify which jars are modules
>> and which aren't, Maven will resolve that for you.
>>
>> You only have to add the module-info.java to the source root and use at
>> least maven-compiler-plugin 3.7.0
>
> Got it.
>
> Presumably I also need to tell the compiler that I want to produce code
> for release 9 via the plugin equivalent of the new --release flag?
> Assuming there is one, that is. I understand the bytecode version has
> been incremented again, so I'd want to be producing 9 bytecode.
>

Exactly, preferred option would be to use release instead of  
target+source, i.e.

<release>9</release>

or the property
maven.compiler.release


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]