Re: Found Issues - Release Apache Maven Version 3.6.2

2019-09-02 Thread Alexander Bubenchikov
Sorry for late reply, Tibor. I'll look into it and create a new thread/PR
regarding this. Despite it will not solve our problems with maintaining
compatibility now (there are plenty of users who need old maven  versions),
it will greatly helps in future.

On Thu, Aug 29, 2019 at 9:51 PM Tibor Digana  wrote:

> Hi Alexander,
>
> Would it solve your problem if we uncover the method [1] and develop a
> builder for the chain of methods [2]?
> To uncover [2] means to make the Plexus Container API accessible within the
> builder.
> Perhaps more has to be done but that's up to the future collaborative work
> on GitHub.
>
> [1]:
>
> https://github.com/apache/maven/blob/master/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java#L281
> [2]:
>
> https://github.com/apache/maven/blob/master/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java#L276-L288
>
> Cheers
> Tibor17
>
> On Thu, Aug 29, 2019 at 3:39 PM Alexander Bubenchikov <
> alexander.bubenchi...@jetbrains.com> wrote:
>
> > Hi Stuart
> > E.g.
> >
> https://github.com/JetBrains/intellij-community/blob/master/plugins/maven/maven3-server-impl/src/org/jetbrains/idea/maven/server/Maven3XServerEmbedder.java
> > customizeComponents method
> >
> > Originally idea use own components defined in
> > META-INF/plexus/components.xml with hints "ide", then original maven
> > components are replaced in plexus container. Container instance is
> getting
> > using reflection from MavenCli,
> > This functionality is very old. It was an only solution before
> introducing
> > extensions in maven, as I understand. Also at the moment, we still
> support
> > IDE compatibility with maven versions starting from 3.0, there are still
> > some amount of users who use really old maven versions in their
> enterprise
> > projects.
> >
> > Thank you for your answer, I'll consider refactoring maven server to core
> > extension mechanism for maven 3.3.1 and above
> >
> >
> >
> >
> > On Thu, Aug 29, 2019 at 3:57 PM Stuart McCulloch 
> > wrote:
> >
> >> How are you replacing them currently?
> >>
> >> The typical way is to use the extensions mechanism:
> >> https://maven.apache.org/docs/3.3.1/release-notes.html#Core_Extensions
> >>
> >> Components contributed via an extension have a higher priority over the
> >> original component in core (assuming that they have the same JSR330 name
> >> or
> >> Plexus hint)
> >>
> >> On Thu, 29 Aug 2019 at 11:46, Alexander Bubenchikov <
> >> alexander.bubenchi...@jetbrains.com> wrote:
> >>
> >> > Hi Enrico, my name is Alex, I've joined to Jetbrains this year and
> >> > responsible for maven integration and Intellij idea.
> >> >
> >> > he issue happen because we replace some components in maven
> >> > (ModelInterpolator in this case) to our own implementation which have
> >> > injected PathTranslator and UrlNormalizer
> >> > I've workarounded the issue in our code, but I didn't dig well into
> >> this.
> >> > Is there any new way to replace maven components?
> >> >
> >> > On Wed, Aug 28, 2019 at 11:57 PM Enrico Olivelli  >
> >> > wrote:
> >> >
> >> > > It may be due to any change regarding jsr 330 like
> >> > >
> https://issues.apache.org/jira/plugins/servlet/mobile#issue/MNG-6686
> >> > >
> >> > >
> >> > > I think it is an issue for Idea and not for us.
> >> > > It would be good to have some developer from Jetbrains on this list
> >> > >
> >> > >
> >> > > Enrico
> >> > >
> >> > > Il mer 28 ago 2019, 22:23 Tibor Digana  ha
> >> > > scritto:
> >> > >
> >> > > > I do not have NPE in the log.
> >> > > > Guice is certainly not CDI. Moving Guice to CDI must be painful.
> >> > > > One reason why PathTranslator could not be found is that there are
> >> > > several
> >> > > > bean instances of the same interface.
> >> > > > Second problem might go with the Guice/CDI.
> >> > > > See this inheritance:
> >> > > >
> >> > > > @Named
> >> > > > @Singleton
> >> > > > public class DefaultPathTranslator
> >> > > > implements PathTranslator
> >> > > > {
> >> > > >
> >> > > > public interface PathTranslator
> >> > > > {
> >> > > >
> >> > > >
> >> > > >
> >> > > > On Wed, Aug 28, 2019 at 10:04 PM Filipe Sousa 
> >> > wrote:
> >> > > >
> >> > > >> Hi,
> >> > > >>
> >> > > >> Not sure if it’s the same bug I commented in
> >> > > >>
> >> > >
> >> >
> >>
> https://issues.apache.org/jira/browse/MNG-6638?focusedCommentId=16852351=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16852351
> >> > > >>
> >> > > >> I reported to Jetbrains
> >> > > https://youtrack.jetbrains.com/issue/IDEA-215315
> >> > > >>  and is
> >> supposed to
> >> > > be
> >> > > >> fixed in 2019.3
> >> > > >>
> >> > > >> > On 28 Aug 2019, at 20:43, Tibor Digana  >
> >> > > wrote:
> >> > > >> >
> >> > > >> > I used Maven 3.6.2 in the IntelliJ IDEA 2019.2.1 and I found
> >> these
> >> > > >> errors
> >> > > >> > in the log file:
> >> > > >> > ~/.IntelliJIdea2019.2/system/log/idea.log
> >> > > >> >
> >> > > >> > 2019-08-28 

Re: java 1.8 and java 11 using toolchains plus compiler and surefire

2019-09-02 Thread Tibor Digana
Hi John,

See this page, the toolchain and JAXB and much more is decribed there
https://maven.apache.org/surefire/maven-surefire-plugin/java9.html

We designed Surefire to understand the compiled sources (src/main/java)
with Java Modularity.
Not the modular test sources. I think we do not have any test for such
usecase.

I am not the best berson to answer Jigsaw stuff.
Robert Sholte is the expert in this area.

We cannot help you right now because you sent a little information and the
stacktrace is not the root cause.
So you should post your GitHub project where we can investigate the error.

Cheers
Tibor17


On Sat, Aug 31, 2019 at 7:53 PM John Patrick  wrote:

> evening,
>
> i'm having trouble testing a multi-release jar project using
> toolchains. i want to test it using both java 1.8 and java 11.
>
> i've the following structure;
> src/main/java
> src/main/java11
> src/test/java
> src/test/java11
>
> tried both maven-surefire-plugin v 2.22.2 and 3.0.0-M3
>
> if i set java to 1.8 and do mvn clean install, everything works but it
> uses java 1.8 for the testing.
>
> if i set java to 11 and do maven clean install, it fails starting surefire.
>
> [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException:
> The forked VM terminated without properly saying goodbye. VM crash or
> System.exit called?
> [ERROR] Error occurred in starting fork, check output in log
> [ERROR] Process Exit Code: 1
> [ERROR] at
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:669)
>
> How can I test using java 1.8 then execute tests again using java 11.
>
> What profile or toolchain settings can i configure so for a surefire
> execution it uses the java version i choose?
>
> John
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: java 1.8 and java 11 using toolchains plus compiler and surefire

2019-09-02 Thread Thorsten Heit
Hi John,

> evening,
> 
> i'm having trouble testing a multi-release jar project using
> toolchains. i want to test it using both java 1.8 and java 11.
> 
> i've the following structure;
> src/main/java
> src/main/java11
> src/test/java
> src/test/java11
> 
> tried both maven-surefire-plugin v 2.22.2 and 3.0.0-M3
> 
> if i set java to 1.8 and do mvn clean install, everything works but it
> uses java 1.8 for the testing.
> 
> if i set java to 11 and do maven clean install, it fails starting 
surefire.
> 
> [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException:
> The forked VM terminated without properly saying goodbye. VM crash or
> System.exit called?
> [ERROR] Error occurred in starting fork, check output in log
> [ERROR] Process Exit Code: 1
> [ERROR] at 
org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork
> (ForkStarter.java:669)

I've seen similar errors when executing tests under Java 11. I don't 
remember the exact reason, but I guess it was one of the following:
- features available in Java 8 that were removed in Java 11
- improper module descriptor
- for example missing dependencies such as 
jakarta.xml.bind:jakarta.xml.bind-api in your pom.xml when you're using 
JAXB in your code


HTH

Thorsten