[ 
https://issues.apache.org/jira/browse/NETBEANS-3332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated NETBEANS-3332:
-------------------------------------
    Labels: pull-request-available  (was: )

> nbm:build-installers fails with JDK 11
> --------------------------------------
>
>                 Key: NETBEANS-3332
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-3332
>             Project: NetBeans
>          Issue Type: Bug
>          Components: mavenutilities
>    Affects Versions: 11.2, 11.3
>         Environment: MacOS 10.14.6
> Netbeans 11.2
> Maven 3.6.2
> nbm-maven-plugin 4.3
>            Reporter: Steven Yi
>            Priority: Major
>              Labels: pull-request-available
>
> h2. Issue
> nbm-maven-plugin fails with nbm:build-installers when running with JDK 11.  
> Running build-installers from an Ant-based platform application works when 
> built from Netbeans 11.2. Default platform application projects for Ant and 
> Maven were used for testing (see STR below). For Ant-version, I used the 
> default application generated from "Java with Ant" -> "Netbeans Modules" -> 
> "Netbeans Platform Application" then used the right-click menu option to 
> build the installers without error. 
> h2. Steps to Reproduce
>  # Using JDK 11 and Netbeans 11.2, create a new Project. Choose "Java with 
> Maven", then "Netbeans Application".  Go through wizard using default 
> settings.
>  # Build the project.
>  # From commandline, cd into application folder of project. Execute "mvn 
> nbm:build-installers".
>  
> h2. Error Results
> When running nbm:build-installers, I get:
>  
> {{[INFO] Created dir: 
> /Users/syyigmmbp/NetBeansProjects/mavenproject4/application/target/installerbuild/nbi_all/ext/infr$}}
> {{/build/engine/build/ext/engine/build/empty }}
> {{[INFO] Compiling 6 source files to 
> /Users/syyigmmbp/NetBeansProjects/mavenproject4/application/target/installerbuild/n$}}
> {{i_all/ext/infra/build/engine/build/ext/engine/build/classes }}
> {{error: Source option 5 is no longer supported. Use 6 or later. }}
> {{error: Target option 1.5 is no longer supported. Use 1.6 or later. }}
> {{[INFO] 
> ------------------------------------------------------------------------ }}
> {{[INFO] BUILD FAILURE }}
> {{[INFO] 
> ------------------------------------------------------------------------ }}
> {{[INFO] Total time: 1.982 s }}
> {{[INFO] Finished at: 2019-11-03T09:51:17-05:00 }}
> {{[INFO] 
> ------------------------------------------------------------------------ }}
> {{[ERROR] Failed to execute goal 
> org.apache.netbeans.utilities:nbm-maven-plugin:4.3:build-installers 
> (default-cli) on pr$}}
> {{ject mavenproject4-app: Installers creation failed: 
> /Users/syyigmmbp/NetBeansProjects/mavenproject4/application/target$}}
> {{installer/nbi/stub/template.xml:66: The following error occurred while 
> executing this line: }}
> {{[ERROR] 
> /Users/syyigmmbp/NetBeansProjects/mavenproject4/application/target/installerbuild/build.xml:121:
>  The following }}
> {{error occurred while executing this line: }}
> {{[ERROR] 
> /Users/syyigmmbp/NetBeansProjects/mavenproject4/application/target/installerbuild/nbi_all/.common/common.xml:5$}}
> {{8: The following error occurred while executing this line:}}
> {{[ERROR] 
> /Users/syyigmmbp/NetBeansProjects/mavenproject4/application/target/installerbuild/nbi_all/.common/common.xml:7$}}
> {{7: The following error occurred while executing this line:}}
> {{[ERROR] 
> /Users/syyigmmbp/NetBeansProjects/mavenproject4/application/target/installerbuild/nbi_all/ext/infra/build/engi$}}
> {{e/build/ext/engine/nbproject/build-impl.xml:922: The following error 
> occurred while executing this line:}}
> {{[ERROR] 
> /Users/syyigmmbp/NetBeansProjects/mavenproject4/application/target/installerbuild/nbi_all/ext/infra/build/engi$}}
> {{e/build/ext/engine/nbproject/build-impl.xml:295: Compile failed; see the 
> compiler error output for details.}}
>  
> h2. Diagnosis
> From what I understand, the issue is that nbm-maven-plugin depends upon 
> org.apache.netbeans.utilities:nbm-maven-harness:11.1 which uses a harness 
> from Netbeans 8.2. If I open up the jar and grep for 1.5, I see:
>  
> {{syyigmmbps-MacBook-Pro:harness syyigmmbp$ grep 1.5 * -n -r}}
> {{Binary file etc/applicationIcon.icns matches}}
> {{Binary file launchers/app64.exe matches}}
> {{Binary file launchers/app.exe matches}}
> {{Binary file modules/ext/nbi-engine.jar matches}}
> {{nbi/stub/tmpl.properties:29:generator-jdk-location-forward-slashes=C:/Program
>  Files/Java/jdk1.5.0_16}}
> {{nbi/stub/ext/components/products/helloworld/nbproject/project.properties:45:javac.source=1.5}}
> {{nbi/stub/ext/components/products/helloworld/nbproject/project.properties:46:javac.target=1.5}}
> {{nbi/stub/ext/components/products/helloworld/nbproject/genfiles.properties:8:nbproject/build-impl.xml.stylesheet.CRC32=f}}
> {{cddb364@1.50.1.46}}
> {{nbi/stub/ext/engine/nbproject/project.properties:46:javac.source=1.5}}
> {{nbi/stub/ext/engine/nbproject/project.properties:47:javac.target=1.5}}
> {{nbi/.common/common.properties:90:# * ${nb.platform.home} - location of the 
> jdk codenamed "JDK 1.5", this jdk}}
> {{nbi/.common/common.properties:103:nb.platform.home=-Dplatforms.JDK_1.5.home=${java.home}/..}}
> {{nbi/.common/common.properties:104:nb.platform.home.macos=-Dplatforms.JDK_1.5.home=${java.home}}}
> {{nbi/.common/common.xml:710: <property name="platforms.JDK_1.5.home" 
> value="${nb.jdk.home.value}" />}}
> In Netbeans 11.2, the harness that comes with it has an nbi stub 
> project.properties that usees javac.source and javac.target = 1.8. I think 
> the solution is to create an updated nbm-maven-harness, update 
> nbm-maven-plugin to depend on that, then publish a new nbm-maven-plugin. 
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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

Reply via email to