You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Frank Griffin <ft...@roadrunner.com> on 2023/01/14 00:18:10 UTC

--boot-classpath errors in NB 16

I have just tried to upgrade an older project (<jdk 1.8) from NB 11 to 
NB 16, and I'm running into a problem.

I upgraded to JDK 11, and as a result added

       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <version>2.3.2</version>
         <configuration>
           <source>11</source>
           <target>11</target>
         </configuration>
       </plugin>

However, now when I try to compile I get:

COMPILATION ERROR :
-------------------------------------------------------------
error: option --boot-class-path not allowed with target 11
1 error

So, if NB is explicitly being told that we're compiling for JDK 11, why 
is it giving maven a --boot-class-path specification ?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: --boot-classpath errors in NB 16

Posted by Michael Bien <mb...@gmail.com>.
On 14.01.23 16:55, Frank Griffin wrote:
> On 1/14/23 02:22, Mark Eggers wrote:
>> Frank,
>>
>> That's a very old version of the maven-compiler-plugin.
>>
>> From version 3.6 of the compiler plugin, you can use the 
>> maven.compiler.release property, which sets the JDK >=9 --release 
>> option.
>>
>> So the configuration would look something like this:
>>
>> <properties>
>>     <maven.compiler.release>11</maven.compiler.release>
>> </properties>
>>
>> <build>
>>     <plugins>
>>                 <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-compiler-plugin</artifactId>
>>                     <version>3.10.1</version>
>>                     <configuration>
>> <release>${maven.compiler.release}</release>
>>             <!-- other configuration arguments -->
>>                     </configuration>
>>                 </plugin>
>>     </plugins>
>> </build>
>>
>> Does that help?
>>
>> . . . just my two cents
>> /mde/
>>
> Hi Mark,
>
> Thanks for the reply.  That worked a treat !

NetBeans 17 is going to have a maven hint which can help to find 
outdated dependencies in situations like this.

https://github.com/apache/netbeans/pull/5009

-mbien


>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: --boot-classpath errors in NB 16

Posted by Frank Griffin <ft...@roadrunner.com>.
On 1/14/23 02:22, Mark Eggers wrote:
> Frank,
>
> That's a very old version of the maven-compiler-plugin.
>
> From version 3.6 of the compiler plugin, you can use the 
> maven.compiler.release property, which sets the JDK >=9 --release option.
>
> So the configuration would look something like this:
>
> <properties>
>     <maven.compiler.release>11</maven.compiler.release>
> </properties>
>
> <build>
>     <plugins>
>                 <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
>                     <version>3.10.1</version>
>                     <configuration>
> <release>${maven.compiler.release}</release>
>             <!-- other configuration arguments -->
>                     </configuration>
>                 </plugin>
>     </plugins>
> </build>
>
> Does that help?
>
> . . . just my two cents
> /mde/
>
Hi Mark,

Thanks for the reply.  That worked a treat !

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


Re: --boot-classpath errors in NB 16

Posted by Mark Eggers <it...@yahoo.com.INVALID>.
Frank,

That's a very old version of the maven-compiler-plugin.

 From version 3.6 of the compiler plugin, you can use the 
maven.compiler.release property, which sets the JDK >=9 --release option.

So the configuration would look something like this:

<properties>
	<maven.compiler.release>11</maven.compiler.release>
</properties>

<build>
	<plugins>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-compiler-plugin</artifactId>
                     <version>3.10.1</version>
                     <configuration>
                         <release>${maven.compiler.release}</release>
			<!-- other configuration arguments -->
                     </configuration>
                 </plugin>
	</plugins>
</build>

Does that help?

. . . just my two cents
/mde/

On 1/13/2023 4:18 PM, Frank Griffin wrote:
> I have just tried to upgrade an older project (<jdk 1.8) from NB 11 to 
> NB 16, and I'm running into a problem.
> 
> I upgraded to JDK 11, and as a result added
> 
>        <plugin>
>          <groupId>org.apache.maven.plugins</groupId>
>          <artifactId>maven-compiler-plugin</artifactId>
>          <version>2.3.2</version>
>          <configuration>
>            <source>11</source>
>            <target>11</target>
>          </configuration>
>        </plugin>
> 
> However, now when I try to compile I get:
> 
> COMPILATION ERROR :
> -------------------------------------------------------------
> error: option --boot-class-path not allowed with target 11
> 1 error
> 
> So, if NB is explicitly being told that we're compiling for JDK 11, why 
> is it giving maven a --boot-class-path specification ?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists