This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 202654 - Building installers for application with finalName result in zip doesn't exist error
Summary: Building installers for application with finalName result in zip doesn't exis...
Status: RESOLVED WONTFIX
Alias: None
Product: apisupport
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.1
Hardware: PC Linux
: P4 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-26 08:59 UTC by monezz
Modified: 2012-02-14 13:13 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description monezz 2011-09-26 08:59:15 UTC
[ JDK VERSION : 1.6.27 ]

The building installers target on an application will always look for a zip
with the default name (${artifactId}-${version} even if finalName is defined.
This results in a ${artifactId}-${version}.zip' doesn't exist error and no
installers.

steps to reproduce:
- create maven rcp project
- set finalName in the application project
    <build>
        <finalName>myApp</finalName>
    </build>
- run build installers on the application project

expected result:
- installers build for myApp.zip
Actual result:
native unzip failed, falling back to java implementation
/home/timon/netbeans-7.1beta/harness/nbi/stub/template.xml:41: The following
error occurred while executing this line:
...../application/target/installerbuild/build.xml:116: The following error
occurred while executing this line:
...../application/target/installerbuild/nbi_all/.common/product.xml:485: src
'...../application/target/application-1.0-SNAPSHOT.zip' doesn't exist.
BUILD FAILED (total time: 2 minutes 32 seconds)

Problem also reported on 7.0.1 as posted on the dev mailing list:
[platform-dev] "Build installers" on a Maven nbm-application project does not
honor <finalName>
by Halvor Platou
Comment 1 Jesse Glick 2011-10-18 23:16:16 UTC
You need to customize suite.dist.zip in the Ant build, e.g. by clicking the "Re-run with Different Parameters" button in the Output Window.

Please bear in mind that the NBI integration with Maven builds (apisupport.installer.maven) is more of a proof of concept than a production-ready feature, and this (small) module has not been maintained since then. The proper approach would be an NBI plugin for Maven that would not need to run Ant at all, or would at least hide the complexity of the Ant invocation using maven-antrun-plugin or the equivalent. I do not know enough about NBI myself to work on it much, and I am not sure who does.
Comment 2 Jesse Glick 2012-02-14 13:13:46 UTC
The 3.7 plugin includes a goal for building installers which should be used instead.