Home > database >  why am getting error while limiting java modules
why am getting error while limiting java modules

Time:11-29

Fatal error compiling: Unrecognized option : java.datatransfer -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Am getting above error while limiting java modules. Can anyone plz help me into this. below is the section where I have limited module.

     <plugin>
       <groupId>org.eclipse.tycho</groupId>
        <artifactId>tycho-compiler-plugin</artifactId>
        <version>${tycho-version}</version>
        <configuration>
          <compilerArgument>--warn:none</compilerArgument>
          <compilerArgument>--err:none</compilerArgument>
          <compilerArgument>-warn: discouraged,forbidden</compilerArgument>
          <compilerArgs>--limit-modules,java.base,java.compiler,java.datatransfer,java.desktop,java.instrument,java.logging,java.management,java.management.rmi,java.naming,java.net.http,java.prefs,java.rmi,java.scripting,java.se,java.security.jgss,java.security.sasl,java.smartcardiojava.sql,java.sql.rowset,java.transaction.xa,java.xml.crypto,jdk.accessibility,jdk.attach,jdk.charsets,jdk.compiler,jdk.crypto.cryptoki,jdk.crypto.ec</compilerArgs>                   
          <useProjectSettings>true</useProjectSettings>
          </configuration>
          </plugin>





I'm not able to limit the module.

CodePudding user response:

The list for --limit-modules is a separate argument.

Mixing compilerArgument and compilerArgs does not work properly, compilerArgs is overring the compilerArgument entries which are being ignored (you can tell this because --warn:none and --err:none are not actually valid).

So use:

 <compilerArgs>
   <arg>-warn:none</arg>
   <arg>-err:none</arg>
   <arg>-warn: discouraged,forbidden</arg>
   <arg>--limit-modules</arg>
   <arg>java.base,java.compiler ... rest of modules ...</arg>
</compilerArgs>

CodePudding user response:

Thanks for the reply, But am still getting compilation error

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:2.7.0:compile (default-compile) on project com.binding.rest.runtime.schema: Compilation failure: Compilation failure: [ERROR] C:\Users\runtime\plugins\com.binding.rest.runtime.schema\src\com\runtime\schema\Wsdl4JsonUtils.java:[5] [ERROR] import javax.xml.namespace.QName;

  • Related