You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Andreas Hauffe <an...@tu-dresden.de> on 2019/08/21 12:13:45 UTC

Error while building the installers of a netbeans platform application

Hi,

I'm trying to build the installers for my Netbeans Plattform Application 
in Netbeans 11.1 under OpenSUSE Leap 15.1 and OpenJDK 12.0.2. During 
this build process I'm getting the following error in the output window:

-do-compile:
     [mkdir] Created dir: 
/mnt/home_ilrw/ahauffe/NetBeansProjects/application2/build/installer/nbi_all/ext/infra/build/engine/build/ext/engine/build/empty
     [javac] Compiling 6 source files to 
/mnt/home_ilrw/ahauffe/NetBeansProjects/application2/build/installer/nbi_all/ext/infra/build/engine/build/ext/engine/build/classes
     [javac] error: Source option 5 is no longer supported. Use 7 or later.
     [javac] error: Target option 5 is no longer supported. Use 7 or later.

I also tried the same with a new created Netbeans Plattform Application, 
but I'm getting the same error. Is this my mistake, a configuration 
error or a bug?

Regards,

-- 
Andreas Hauffe, Leiter Forschungsfeld

*Auslegungsmethoden für Luftfahrzeuge*

Technische Universität Dresden
Institut für Luft- und Raumfahrttechnik / Institute of Aerospace Engineering
Professur für Luftfahrzeugtechnik / Chair of Aircraft Engineering
D-01062 Dresden, Germany

Phone: +49 351 463 38496 | Fax: +49 351 463 37263

andreas.hauffe@tu-dresden.de <ma...@tu-dresden.de> | 
http://tu-dresden.de/mw/ilr/lft

*Do you know our free laminate analysis code eLamX? If not, please visit 
the following web address:*
*https://tu-dresden.de/ing/maschinenwesen/ilr/lft/elamx2/elamx?set_language=en*

Re: Error while building the installers of a netbeans platform application

Posted by William Reynolds <wn...@stellarscience.com>.
I've just migrated my RCP project to a Maven-based build, and fixing the 
installer bug was a bit more involved. To begin the migration,
I constructed a maven nb platform project using the guide on 
https://platform.netbeans.org/tutorials/nbm-maven-quickstart.html.
Note that adding child projects didn't work, I had to construct those 
projects by hand. The key thing is that your project will have
an "-App" module whose pom has <packaging>nbm-application</packaging> 
and a plugin block like:


         <profile>
             <id>deployment</id>
             <build>
                 <plugins>
                     <plugin>
<groupId>org.apache.netbeans.utilities</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<version>4.2-installBugfix</version>
                         <executions>
                             <execution>
                                 <id>extra</id>
                                 <goals>
<goal>autoupdate</goal>
<goal>webstart-app</goal>
<goal>build-installers</goal>
                                 </goals>
                             </execution>
                         </executions>
                     </plugin>
                 </plugins>
             </build>
         </profile>


when you do a 'mvn -Pdeployment install', it should build an installer 
for you, but you get the error about Java version 1.5 being to old. As 
described
below, the problem is that there are two property files with bad 
properties in the ant-based build harness that need to be fixed.

It turns out that the harness of ant scripts is now installed and run by 
the plugin, not using the harness installed with your netbeans 
installation,
so you will have to fix the javac.{source,target}=1.5 bug in the plugin. 
(If you have an ant-based build system for your RCP, then fix the files in
your nb installation as in the message included below).

Instructions below are a hack, but they got me up and running:

First:
* Download nbm-maven-harness source from 
https://github.com/apache/netbeans-mavenutils-nbm-maven-harness/tree/nbm-maven-harness-11.0, 
unpack.
* 'mvn install' to build the source. Edit the two project.properties 
files under "target" to fix the javac.* properties (use find, or see 
below for paths).
* Edit the pom, change the version to 
<version>11.0-installBugfix</version>. Disable the large block in the 
pom beginning:
<plugin> <groupId>org.apache.maven.plugins</groupId> 
<artifactId>maven-antrun-plugin</artifactId> ... </plugin>. This will 
prevent the second build
you are about to do from overwriting your fixes.
* Run 'mvn install'.  This installs a plugin with fixed harness files to 
your .m2 repository
.m2\repository\org\apache\netbeans\utilities\nbm-maven-harness\11.0-installBugfix.

Next:
* Download nbm-maven-plugin source from 
https://github.com/apache/netbeans-mavenutils-nbm-maven-plugin, unpack.
* Go into pom, modify version to be 
<version>4.2-installBugfix</version>, go to dependencies, change the 
version for nbm-maven-harness to 11.0-installBugfix.
* Run 'mvn install', this installs the fixed plugin to
.m2\repository\org\apache\netbeans\utilities\nbm-maven-plugin\4.2-installBugfix

Finally:
Go to the application pom for your Project (say MavenNBProject-app), and 
change the version of nbm-maven-plugin to 
<version>4.2-installBugfix</version>.
You should be able to build installers using the nbm-maven-plugin.


On 8/21/2019 11:55 PM, Andreas Hauffe wrote:
>
> Hi,
>
> thanks for the hint. In my case I had to change the entries in two files:
>
> harness/nbi/stub/ext/components/products/helloworld/nbproject/project.properties
> harness/nbi/stub/ext/engine/nbproject/project.properties
>
> Now it is building the installers
>
> Andreas
>
> Am 21.08.19 um 17:17 schrieb William Reynolds:
>> I ran into this a few weeks ago using Coolbeans:
>>
>>
>>>
>>> We have an RCP application that I was trying to create an installer 
>>> for (right click the project, Package As->Installers). The build was 
>>> failing with the following error:
>>>
>>> -do-compile:
>>>     [mkdir] Created dir: 
>>> C:\Users\wnreynolds\Desktop\Work\<deleted>\build\installer\nbi_all\ext\infra\build\products\helloworld\build\ext\components\products\helloworld\build\empty
>>>     [javac] Compiling 2 source files to 
>>> C:\Users\wnreynolds\Desktop\Work\<deleted>\build\installer\nbi_all\ext\infra\build\products\helloworld\build\ext\components\products\helloworld\build\classes
>>>     [javac] error: Source option 5 is no longer supported. Use 6 or 
>>> later.
>>>     [javac] error: Target option 1.5 is no longer supported. Use 1.6 
>>> or later.
>>>
>>> I don't have a deep understanding of the build harness, but it 
>>> looked like an empty application, helloworld, was being added to the 
>>> installer, and the compile was failing it due to too low a 
>>> javac.{source,target} specification.
>>>
>>> Setting javac.{source,target}=1.8 in my toplevel project.properties 
>>> didn't fix the problem.
>>>
>>> Editing 
>>> CoolBeans\harness\nbi\stub\ext\components\products\helloworld\nbproject\ 
>>>
>>> project.properties and changing javac.source=1.8 javac.target=1.8 
>>> fixed the problem.
>>>
>>> I know folks are managing a lot of changes with the move to apache, 
>>> and this is a little problem, but it should be simple to fix and 
>>> will save others the couple of hours I took to track it down.
>>>
>>> Thanks for your work.
>>>
>>> FWiW, about my coolbeans:
>>>
>>>
>>> Product Version: CoolBeans IDE 2018.12 (Build coolbeans-9-on-20190221)
>>>
>>> Java: 11.0.2; OpenJDK 64-Bit Server VM 11.0.2+9
>>>
>>> Runtime: OpenJDK Runtime Environment 11.0.2+9
>>>
>>> System: Windows 10 version 10.0 running on amd64; Cp1252; en_US (nb)
>>>
>>> User directory: C:\<deleted>\AppData\Roaming\NetBeans\2018.12
>>>
>>> Cache directory: C:\<deleted>\AppData\Local\NetBeans\Cache\2018.12
>>>
>>> -- 
>>> William Reynolds, Ph.D.
>>> Stellar Science, LLC
>>> wnreynolds@stellarscience.com
>>> www.stellarscience.com
>>> 877-763-8268 x710 (v)
>>>
>>
>>
>>
>> On 8/21/2019 8:33 AM, Neil C Smith wrote:
>>> Hi,
>>>
>>> On Wed, 21 Aug 2019 at 15:28, Andreas Hauffe
>>> <an...@tu-dresden.de> wrote:
>>>> thanks for the answer. With JDK 11 I'm still getting the same error.
>>>
>>> Yes,as far as I know, the installers can't be built with JDK 11 yet.
>>> See pending PR https://github.com/apache/netbeans/pull/1414
>>>
>>> Best wishes,
>>>
>>> Neil
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>>
>>
> -- 
> Andreas Hauffe, Leiter Forschungsfeld
>
> *Auslegungsmethoden für Luftfahrzeuge*
>
> Technische Universität Dresden
> Institut für Luft- und Raumfahrttechnik / Institute of Aerospace 
> Engineering
> Professur für Luftfahrzeugtechnik / Chair of Aircraft Engineering
> D-01062 Dresden, Germany
>
> Phone: +49 351 463 38496 | Fax: +49 351 463 37263
>
> andreas.hauffe@tu-dresden.de <ma...@tu-dresden.de> | 
> http://tu-dresden.de/mw/ilr/lft
>
> *Do you know our free laminate analysis code eLamX? If not, please 
> visit the following web address:*
> *https://tu-dresden.de/ing/maschinenwesen/ilr/lft/elamx2/elamx?set_language=en*

-- 
William Reynolds, Ph.D.
Stellar Science, LLC
wnreynolds@stellarscience.com
www.stellarscience.com
877-763-8268 x710 (v)


Re: Error while building the installers of a netbeans platform application

Posted by Andreas Hauffe <an...@tu-dresden.de>.
Hi,

thanks for the hint. In my case I had to change the entries in two files:

harness/nbi/stub/ext/components/products/helloworld/nbproject/project.properties
harness/nbi/stub/ext/engine/nbproject/project.properties

Now it is building the installers

Andreas

Am 21.08.19 um 17:17 schrieb William Reynolds:
> I ran into this a few weeks ago using Coolbeans:
>
>
>>
>> We have an RCP application that I was trying to create an installer 
>> for (right click the project, Package As->Installers). The build was 
>> failing with the following error:
>>
>> -do-compile:
>>     [mkdir] Created dir: 
>> C:\Users\wnreynolds\Desktop\Work\<deleted>\build\installer\nbi_all\ext\infra\build\products\helloworld\build\ext\components\products\helloworld\build\empty
>>     [javac] Compiling 2 source files to 
>> C:\Users\wnreynolds\Desktop\Work\<deleted>\build\installer\nbi_all\ext\infra\build\products\helloworld\build\ext\components\products\helloworld\build\classes
>>     [javac] error: Source option 5 is no longer supported. Use 6 or 
>> later.
>>     [javac] error: Target option 1.5 is no longer supported. Use 1.6 
>> or later.
>>
>> I don't have a deep understanding of the build harness, but it looked 
>> like an empty application, helloworld, was being added to the 
>> installer, and the compile was failing it due to too low a 
>> javac.{source,target} specification.
>>
>> Setting javac.{source,target}=1.8 in my toplevel project.properties 
>> didn't fix the problem.
>>
>> Editing 
>> CoolBeans\harness\nbi\stub\ext\components\products\helloworld\nbproject\
>> project.properties and changing javac.source=1.8 javac.target=1.8 
>> fixed the problem.
>>
>> I know folks are managing a lot of changes with the move to apache, 
>> and this is a little problem, but it should be simple to fix and will 
>> save others the couple of hours I took to track it down.
>>
>> Thanks for your work.
>>
>> FWiW, about my coolbeans:
>>
>>
>> Product Version: CoolBeans IDE 2018.12 (Build coolbeans-9-on-20190221)
>>
>> Java: 11.0.2; OpenJDK 64-Bit Server VM 11.0.2+9
>>
>> Runtime: OpenJDK Runtime Environment 11.0.2+9
>>
>> System: Windows 10 version 10.0 running on amd64; Cp1252; en_US (nb)
>>
>> User directory: C:\<deleted>\AppData\Roaming\NetBeans\2018.12
>>
>> Cache directory: C:\<deleted>\AppData\Local\NetBeans\Cache\2018.12
>>
>> -- 
>> William Reynolds, Ph.D.
>> Stellar Science, LLC
>> wnreynolds@stellarscience.com
>> www.stellarscience.com
>> 877-763-8268 x710 (v)
>>
>
>
>
> On 8/21/2019 8:33 AM, Neil C Smith wrote:
>> Hi,
>>
>> On Wed, 21 Aug 2019 at 15:28, Andreas Hauffe
>> <an...@tu-dresden.de> wrote:
>>> thanks for the answer. With JDK 11 I'm still getting the same error.
>>
>> Yes,as far as I know, the installers can't be built with JDK 11 yet.
>> See pending PR https://github.com/apache/netbeans/pull/1414
>>
>> Best wishes,
>>
>> Neil
>>
>> ---------------------------------------------------------------------
>> 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
>>
>
-- 
Andreas Hauffe, Leiter Forschungsfeld

*Auslegungsmethoden für Luftfahrzeuge*

Technische Universität Dresden
Institut für Luft- und Raumfahrttechnik / Institute of Aerospace Engineering
Professur für Luftfahrzeugtechnik / Chair of Aircraft Engineering
D-01062 Dresden, Germany

Phone: +49 351 463 38496 | Fax: +49 351 463 37263

andreas.hauffe@tu-dresden.de <ma...@tu-dresden.de> | 
http://tu-dresden.de/mw/ilr/lft

*Do you know our free laminate analysis code eLamX? If not, please visit 
the following web address:*
*https://tu-dresden.de/ing/maschinenwesen/ilr/lft/elamx2/elamx?set_language=en*

Re: Error while building the installers of a netbeans platform application

Posted by William Reynolds <wn...@stellarscience.com>.
I ran into this a few weeks ago using Coolbeans:


> 
> We have an RCP application that I was trying to create an installer for (right click the project, Package As->Installers). The build was failing with the following error:
> 
> -do-compile:
>     [mkdir] Created dir: C:\Users\wnreynolds\Desktop\Work\<deleted>\build\installer\nbi_all\ext\infra\build\products\helloworld\build\ext\components\products\helloworld\build\empty
>     [javac] Compiling 2 source files to C:\Users\wnreynolds\Desktop\Work\<deleted>\build\installer\nbi_all\ext\infra\build\products\helloworld\build\ext\components\products\helloworld\build\classes
>     [javac] error: Source option 5 is no longer supported. Use 6 or later.
>     [javac] error: Target option 1.5 is no longer supported. Use 1.6 or later.
> 
> I don't have a deep understanding of the build harness, but it looked like an empty application, helloworld, was being added to the installer, and the compile was failing it due to too low a javac.{source,target} specification.
> 
> Setting javac.{source,target}=1.8 in my toplevel project.properties didn't fix the problem.
> 
> Editing CoolBeans\harness\nbi\stub\ext\components\products\helloworld\nbproject\
> project.properties and changing javac.source=1.8 javac.target=1.8 fixed the problem.
> 
> I know folks are managing a lot of changes with the move to apache, and this is a little problem, but it should be simple to fix and will save others the couple of hours I took to track it down.
> 
> Thanks for your work.
> 
> FWiW, about my coolbeans:
> 
> 
> Product Version: CoolBeans IDE 2018.12 (Build coolbeans-9-on-20190221)
> 
> Java: 11.0.2; OpenJDK 64-Bit Server VM 11.0.2+9
> 
> Runtime: OpenJDK Runtime Environment 11.0.2+9
> 
> System: Windows 10 version 10.0 running on amd64; Cp1252; en_US (nb)
> 
> User directory: C:\<deleted>\AppData\Roaming\NetBeans\2018.12
> 
> Cache directory: C:\<deleted>\AppData\Local\NetBeans\Cache\2018.12
> 
> -- 
> William Reynolds, Ph.D.
> Stellar Science, LLC
> wnreynolds@stellarscience.com
> www.stellarscience.com
> 877-763-8268 x710 (v)
> 



On 8/21/2019 8:33 AM, Neil C Smith wrote:
> Hi,
> 
> On Wed, 21 Aug 2019 at 15:28, Andreas Hauffe
> <an...@tu-dresden.de> wrote:
>> thanks for the answer. With JDK 11 I'm still getting the same error.
> 
> Yes,as far as I know, the installers can't be built with JDK 11 yet.
> See pending PR https://github.com/apache/netbeans/pull/1414
> 
> Best wishes,
> 
> Neil
> 
> ---------------------------------------------------------------------
> 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
> 

-- 
William Reynolds, Ph.D.
Stellar Science, LLC
wnreynolds@stellarscience.com
www.stellarscience.com
877-763-8268 x710 (v)


Re: Error while building the installers of a netbeans platform application

Posted by Neil C Smith <ne...@apache.org>.
Hi,

On Wed, 21 Aug 2019 at 15:28, Andreas Hauffe
<an...@tu-dresden.de> wrote:
> thanks for the answer. With JDK 11 I'm still getting the same error.

Yes,as far as I know, the installers can't be built with JDK 11 yet.
See pending PR https://github.com/apache/netbeans/pull/1414

Best wishes,

Neil

---------------------------------------------------------------------
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: Error while building the installers of a netbeans platform application

Posted by Andreas Hauffe <an...@tu-dresden.de>.
Hi,

thanks for the answer. With JDK 11 I'm still getting the same error.

-do-compile:
     [mkdir] Created dir: 
/VMWare/eLamX2/build/installer/nbi_all/ext/infra/build/engine/build/ext/engine/build/empty
     [javac] Compiling 6 source files to 
/VMWare/eLamX2/build/installer/nbi_all/ext/infra/build/engine/build/ext/engine/build/classes
     [javac] error: Source option 5 is no longer supported. Use 6 or later.
     [javac] error: Target option 1.5 is no longer supported. Use 1.6 or 
later.

Regards,
Andreas

Am 21.08.19 um 15:37 schrieb Laszlo Kishalmi:
>
> NetBeans 11.1 is not yet buildable with JDK 12+, Use JDK 8 or 11.
>
> On 8/21/19 5:13 AM, Andreas Hauffe wrote:
>>
>> Hi,
>>
>> I'm trying to build the installers for my Netbeans Plattform 
>> Application in Netbeans 11.1 under OpenSUSE Leap 15.1 and OpenJDK 
>> 12.0.2. During this build process I'm getting the following error in 
>> the output window:
>>
>> -do-compile:
>>     [mkdir] Created dir: 
>> /mnt/home_ilrw/ahauffe/NetBeansProjects/application2/build/installer/nbi_all/ext/infra/build/engine/build/ext/engine/build/empty
>>     [javac] Compiling 6 source files to 
>> /mnt/home_ilrw/ahauffe/NetBeansProjects/application2/build/installer/nbi_all/ext/infra/build/engine/build/ext/engine/build/classes
>>     [javac] error: Source option 5 is no longer supported. Use 7 or 
>> later.
>>     [javac] error: Target option 5 is no longer supported. Use 7 or 
>> later.
>>
>> I also tried the same with a new created Netbeans Plattform 
>> Application, but I'm getting the same error. Is this my mistake, a 
>> configuration error or a bug?
>>
>> Regards,
>>
>> -- 
>> Andreas Hauffe, Leiter Forschungsfeld
>>
>> *Auslegungsmethoden für Luftfahrzeuge*
>>
>> Technische Universität Dresden
>> Institut für Luft- und Raumfahrttechnik / Institute of Aerospace 
>> Engineering
>> Professur für Luftfahrzeugtechnik / Chair of Aircraft Engineering
>> D-01062 Dresden, Germany
>>
>> Phone: +49 351 463 38496 | Fax: +49 351 463 37263
>>
>> andreas.hauffe@tu-dresden.de <ma...@tu-dresden.de> | 
>> http://tu-dresden.de/mw/ilr/lft
>>
>> *Do you know our free laminate analysis code eLamX? If not, please 
>> visit the following web address:*
>> *https://tu-dresden.de/ing/maschinenwesen/ilr/lft/elamx2/elamx?set_language=en*
-- 
Andreas Hauffe, Leiter Forschungsfeld

*Auslegungsmethoden für Luftfahrzeuge*

Technische Universität Dresden
Institut für Luft- und Raumfahrttechnik / Institute of Aerospace Engineering
Professur für Luftfahrzeugtechnik / Chair of Aircraft Engineering
D-01062 Dresden, Germany

Phone: +49 351 463 38496 | Fax: +49 351 463 37263

andreas.hauffe@tu-dresden.de <ma...@tu-dresden.de> | 
http://tu-dresden.de/mw/ilr/lft

*Do you know our free laminate analysis code eLamX? If not, please visit 
the following web address:*
*https://tu-dresden.de/ing/maschinenwesen/ilr/lft/elamx2/elamx?set_language=en*

Re: Error while building the installers of a netbeans platform application

Posted by Laszlo Kishalmi <la...@gmail.com>.
NetBeans 11.1 is not yet buildable with JDK 12+, Use JDK 8 or 11.

On 8/21/19 5:13 AM, Andreas Hauffe wrote:
>
> Hi,
>
> I'm trying to build the installers for my Netbeans Plattform 
> Application in Netbeans 11.1 under OpenSUSE Leap 15.1 and OpenJDK 
> 12.0.2. During this build process I'm getting the following error in 
> the output window:
>
> -do-compile:
>     [mkdir] Created dir: 
> /mnt/home_ilrw/ahauffe/NetBeansProjects/application2/build/installer/nbi_all/ext/infra/build/engine/build/ext/engine/build/empty
>     [javac] Compiling 6 source files to 
> /mnt/home_ilrw/ahauffe/NetBeansProjects/application2/build/installer/nbi_all/ext/infra/build/engine/build/ext/engine/build/classes
>     [javac] error: Source option 5 is no longer supported. Use 7 or later.
>     [javac] error: Target option 5 is no longer supported. Use 7 or later.
>
> I also tried the same with a new created Netbeans Plattform 
> Application, but I'm getting the same error. Is this my mistake, a 
> configuration error or a bug?
>
> Regards,
>
> -- 
> Andreas Hauffe, Leiter Forschungsfeld
>
> *Auslegungsmethoden für Luftfahrzeuge*
>
> Technische Universität Dresden
> Institut für Luft- und Raumfahrttechnik / Institute of Aerospace 
> Engineering
> Professur für Luftfahrzeugtechnik / Chair of Aircraft Engineering
> D-01062 Dresden, Germany
>
> Phone: +49 351 463 38496 | Fax: +49 351 463 37263
>
> andreas.hauffe@tu-dresden.de <ma...@tu-dresden.de> | 
> http://tu-dresden.de/mw/ilr/lft
>
> *Do you know our free laminate analysis code eLamX? If not, please 
> visit the following web address:*
> *https://tu-dresden.de/ing/maschinenwesen/ilr/lft/elamx2/elamx?set_language=en*