Hi Romain,

"mvnDebug" works for me. but when I read the script of mvn, I don't see
main method but this:
 exec "$JAVACMD" \
 17   $MAVEN_OPTS \
 18   $MAVEN_DEBUG_OPTS \
 19   -classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \
 20   "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
 21   "-Dmaven.home=${M2_HOME}"
"-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
 22   ${CLASSWORLDS_LAUNCHER} "$@"

and the "CLASSWORLDS_LAUNCHER" is
"org.codehaus.plexus.classworlds.launcher.Launcher" but not maven main.

Thanks a lot

Simon(ChengHong) Sheng


On Mon, Oct 8, 2018 at 11:16 PM Romain Manni-Bucau <rmannibu...@gmail.com>
wrote:

> Hello
>
> Not sure the question was about test classes - you got answers for that ;)
> - or maven and plugins themselves. If the last one, just replace "mvn" by
> "mvnDebug" in any command and remote debug on port 8000 in your IDE.
>
> Side note: if you check mvn script you will see maven has a main class so
> can be remote debugged as any java software ;)
>
> Le mar. 9 oct. 2018 05:44, Olivier Lamy <ol...@apache.org> a écrit :
>
> > an other option is to use command line and the surefire option:
> > -Dmaven.surefire.debug=true
> > then you can have debug on port 5005 (look at your ide to start a remote
> > debug)
> >
> > On Tue, 9 Oct 2018 at 08:45, Enrico Olivelli <eolive...@gmail.com>
> wrote:
> >
> > > Il lun 8 ott 2018, 23:23 Jeff MAURY <jeffma...@gmail.com> ha scritto:
> > >
> > > > M2e takes care of everything
> > > >
> > >
> > > Same for Apache Netbeans :)
> > >
> > > Enrico
> > >
> > >
> > > > Jeff
> > > >
> > > > Le lun. 8 oct. 2018 à 23:09, Simon Sheng <simonshe...@gmail.com> a
> > > écrit :
> > > >
> > > > > Hi,
> > > > >
> > > > > I am bringing this baby question since Maven load all it's classes
> by
> > > > > ClassWorlds. Which means it doesn't have "main method". instead we
> > > debug
> > > > > everything by log, do we have other way like debug with any IDE:
> > > Eclipse,
> > > > > Intellij etc. put breakpoints and debug step by step ?
> > > > >
> > > > > Thanks
> > > > >
> > > > > Simon(ChengHong) Sheng
> > > > >
> > > >
> > > --
> > >
> > >
> > > -- Enrico Olivelli
> > >
> >
> >
> > --
> > Olivier Lamy
> > http://twitter.com/olamy | http://linkedin.com/in/olamy
> >
>

Reply via email to