Re: How do exec:java on a mainclass that calls System.exit() without terminating the maven build?

Steinar Bang <[email protected]>
Newsgroups gmane.comp.jakarta.turbine.maven.user
Organization Probably a good idea
Message-ID <[email protected]>
>>>>> Thorsten Heit <[email protected]>:

> Out of curiosity I cloned your project, executed "mvn clean install",
> but couldn't reproduce the error you've seen...

Actually, you did.

> convert-xsd-to-rnc % mvn clean install
> [INFO] Scanning for projects...
> [INFO]
> [INFO] -------------< no.priv.bang.xml.schema:convert-xsd-to-rnc -------------
> (...)
> [INFO] --- install:3.1.2:install (default-install) @ convert-xsd-to-rnc ---
> [INFO] Installing /Users/thorsten/git/convert-xsd-to-rnc/pom.xml to
> /Users/thorsten/.m2/repository/no/priv/bang/xml/schema/convert-xsd-to-rnc/0.0.1-SNAPSHOT/convert-xsd-to-rnc-0.0.1-SNAPSHOT.pom
> [INFO] Installing
> /Users/thorsten/git/convert-xsd-to-rnc/target/convert-xsd-to-rnc-0.0.1-SNAPSHOT.jar
> to
> /Users/thorsten/.m2/repository/no/priv/bang/xml/schema/convert-xsd-to-rnc/0.0.1-SNAPSHOT/convert-xsd-to-rnc-0.0.1-SNAPSHOT.jar
> [INFO]
> [INFO] --- exec:3.5.0:java (convert-xsd-to-rng) @ convert-xsd-to-rnc ---
> "anyType" is implicitly used as the content model of this element. Is
> this your intention? If so, please consider to write it explicitly as
> type="anyType".
>  1088:72@file:///Users/thorsten/git/convert-xsd-to-rnc/dbchangelog-4.31.xsd
> [INFO]
> [INFO] --- exec:3.5.0:java (convert-liquibase-rng-to-rnc) @
> convert-xsd-to-rnc ---

It stops here. This is the abrupt stop I was talking about.

Here is how "mvn install" ends if I remove the second <excution> (the
one calling System.exit() in the main):

...
[INFO] --- maven-install-plugin:2.4:install (default-install) @ convert-xsd-to-rnc ---
[INFO] Installing /home/sb/git/convert-xsd-to-rnc/target/convert-xsd-to-rnc-0.0.1-SNAPSHOT.jar to /home/sb/.m2/repository/no/priv/bang/xml/schema/convert-xsd-to-rnc/0.0.1-SNAPSHOT/convert-xsd-to-rnc-0.0.1-SNAPSHOT.jar
[INFO] Installing /home/sb/git/convert-xsd-to-rnc/pom.xml to /home/sb/.m2/repository/no/priv/bang/xml/schema/convert-xsd-to-rnc/0.0.1-SNAPSHOT/convert-xsd-to-rnc-0.0.1-SNAPSHOT.pom
[INFO] 
[INFO] --- exec-maven-plugin:3.5.0:java (convert-xsd-to-rng) @ convert-xsd-to-rnc ---
"anyType" is implicitly used as the content model of this element. Is this your intention? If so, please consider to write it explicitly as type="anyType".
  1088:72@file:///home/sb/git/convert-xsd-to-rnc/dbchangelog-4.31.xsd
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.260 s
[INFO] Finished at: 2025-05-08T21:03:43+02:00
[INFO] ------------------------------------------------------------------------
sb@marquez:~/git/convert-xsd-to-rnc$
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.