I agree that projects should explicitly state the JDK platform to use.

The problem is if I define a Java Platform through Tools->Java Platforms
(e.g. JDK 1.8), this ends up being defined in build.properties in the
NetBeans userdir (%APPDATA%\Roaming\NetBeans\12.2).

That means all developers and our CI have to manually define this
additional platform, since they otherwise get errors when reading
"platform.active=JDK_1.8" from the project.properties file.

So how is it possible to define this additional Java Platform per project
in such a way that I don't have to manually add this platform definition to
all installed NetBeans versions?

Greets,
    Humphrey.

On Thu, Nov 26, 2020 at 1:08 PM Som Lima <somplastic...@gmail.com> wrote:

> I think you guys are barking up the wrong tree with defaulting.
>
> For each project you should individualise instead of using default because
> each project is individual, so you are assured of same  libraries and
> config environment
> .This will reduce the risk of incompatibility issues between development
> and runtime.
>
> Another words when using maven tool make use of pom.xml.
> So that with one look  in the project tree you can see the project
> configuration for both development and runtime of that project.
>
> You could create a pom.xml template which will allow you to use defaults
> for  projects if you wish.
>
>
>
> Regards
>
> www.backbutton.co.uk
>
>
>
>
>
>
>
>
> On Wed, 25 Nov 2020, 09:28 Humphrey Clerx, <hcl...@gmail.com> wrote:
>
>> Would be great if this was possible for the Ant configuration as well.
>>
>> On Wed, Nov 25, 2020 at 10:04 AM Luff,Chris <chris.l...@cerner.com.invalid>
>> wrote:
>>
>>>
>>> You can select a default in the Maven config.
>>>
>>> Associate Principal Engineer | UK Development - Care Insight and
>>> Delivery Dev | chris.l...@cerner.com | Cerner Limited
>>> <http://www.cerner.com/>
>>>
>>> On 25 Nov 2020, at 07:42, Thomas Kellerer <sham...@gmx.net> wrote:
>>>
>>> Hello,
>>>
>>> I am running NetBeans on OpenJDK 14, but all projects I have, are using
>>> Java 11 so I have an OpenJDK 11 defined through "Java Platforms".
>>>
>>> However, when I open a Maven or Gradle project, I always have to
>>> manually select JDK 11 in the project options despite the projects defining
>>> the source level to 11.
>>>
>>> Is there a way I can define my JDK 11 as the "default" JDK without
>>> running NetBeans on it (so keeping --jdk-home pointing to JDK 14)?
>>>
>>> I am using NetBeans 12.1 on Windows 10
>>>
>>> Regards
>>> Thomas
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
>>> <users-unsubscr...@netbeans.apache.org>
>>> For additional commands, e-mail: users-h...@netbeans.apache.org
>>> <users-h...@netbeans.apache.org>
>>>
>>> For further information about the NetBeans mailing lists, visit:
>>>
>>> https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcwiki.apache.org%2Fconfluence%2Fdisplay%2FNETBEANS%2FMailing%2Blists&amp;data=04%7C01%7CChris.Luff%40cerner.com%7Cd59dd3d3411447394e6308d89115b1f8%7Cfbc493a80d244454a815f4ca58e8c09d%7C0%7C0%7C637418869659252224%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=fhMinXYbACI3MyusNOrusXIfxNcB6i2vL%2BM8n7CdZSQ%3D&amp;reserved=0
>>>
>>>
>>>
>>>
>>> CONFIDENTIALITY NOTICE This message and any included attachments are
>>> from Cerner Corporation and are intended only for the addressee. The
>>> information contained in this message is confidential and may constitute
>>> inside or non-public information under international, federal, or state
>>> securities laws. Unauthorized forwarding, printing, copying, distribution,
>>> or use of such information is strictly prohibited and may be unlawful. If
>>> you are not the addressee, please promptly delete this message and notify
>>> the sender of the delivery error by e-mail or you may call Cerner's
>>> corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.
>>> Cerner Limited, Registered in England no 2519305, Registered Office 37
>>> North Wharf Road, London W2 1AF.
>>>
>>
>>
>> --
>> In the mountains of truth, you never climb in vain - Nietzsche
>> #-------------------------------------------------------------
>>  \_O
>> ,__/>
>>   <"
>>    '
>>
>

-- 
In the mountains of truth, you never climb in vain - Nietzsche
#-------------------------------------------------------------
 \_O
,__/>
  <"
   '

Reply via email to