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 213184 - Variable or new goal/goal reorg to allow NB RCP Maven project build without producing zip file
Summary: Variable or new goal/goal reorg to allow NB RCP Maven project build without p...
Status: RESOLVED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Jesse Glick
URL: http://jira.codehaus.org/browse/MNG-5059
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2012-05-29 16:33 UTC by _ wadechandler
Modified: 2012-05-30 20:20 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ wadechandler 2012-05-29 16:33:07 UTC
On very large NB RCP Maven projects a lot of time gets wasted at development time when full builds or a build of the *application* project is required and the zip file for the nbm application is created. This can waste a couple of minutes worth of time multiple times a day for no gain during development when one only wants to run the application from the application/target/appname/bin folder and not by unzipping an archive on another system. In fact it seems with mvn development of RCP applications this is the most used method of running the application during development. So, having a -Dnbm.nozip variable we could pass to mvn or perhaps making a new goal called cluster-app-nozip would solve this. The idea is everything that happens now would happen less the final zip file would not be created. The current cluster-app could use cluster-app-nozip and standalone-zip to produce the zip.

During a really busy day this could probably save me an hour or 30 minutes of development time, and over the course of a week a day to half a day depending on how you look at it.
Comment 1 Jesse Glick 2012-05-29 22:13:10 UTC
Already fixed in 7.2 beta (3085ac76f9ae). The cluster-app goal does not produce a ZIP file; it is merely a matter of tweaking the IDE's action bindings to run just cluster-app and not also standalone-zip.
Comment 2 _ wadechandler 2012-05-30 12:16:49 UTC
I am having an issue figuring out how to use it with a general work flow. I tried to define an execution in application/pom.xml to only run nbm:cluster-app in the package phase. 

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>nbm-maven-plugin</artifactId>
                <configuration>
                    <etcConfFile>src/main/etc/etc-conf.template</etcConfFile>
                    <distributionUrl>https://xxxxxxxx/</distributionUrl>
                </configuration>
		<executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>nbm:cluster-app</goal>
                        </goals>
                    </execution>
                </executions>

            </plugin>

The problem is the plugin still runs its default stuff (cluster-app and standalone-zip) then it runs cluster-app by itself (so runs defaults plus this defined execution), and  thus I still get a zip during package though if I run the goal independently I do in fact *not* get a zip. My main issue is I have this project structure:

Project X
-some plain JAR lib (used by various things)
- other various plain JAR projects I depend on ...
-gui (NB RCP application)
--some plain JAR lib wrapper
--application
--something depending on some plain JAR lib

I make changes to some plain JAR lib. I need them included in the application. From the top if I can mvn install or something and *not* get the full NB RCP zip file created, then it just makes the work flow simpler without having to cd around and mvn install and then cd to application and mvn cluster-app. This is what originally made me think variable which would allow the zip to be skipped. 

It may be that I am missing something about Maven, but this page describes being able to override defaults using an execution:
http://maven.apache.org/guides/mini/guide-configuring-plugins.html#Configuring_Build_Plugins

However, things are not working as expected per that document.  Any direction on uses?

Thanks.
Comment 3 _ wadechandler 2012-05-30 12:29:21 UTC
Jesse, are the sources for nbm-maven-plugin here:
http://svn.codehaus.org/mojo/trunk/mojo/nbm-maven/nbm-maven-plugin/

or are they some where else? I see the latest change in that as being on May 14, 2012.

Thanks.
Comment 4 Jesse Glick 2012-05-30 20:20:12 UTC
(In reply to comment #2)
> The problem is the plugin still runs its default stuff (cluster-app and
> standalone-zip) then it runs cluster-app by itself (so runs defaults plus this
> defined execution)

Right, AFAIK you cannot remove a goal from a plugin-defined lifecycle phase using POM overrides.

Anyway it would not make sense to remove standalone-zip from the package phase for nbm-application projects since this goal is what creates its primary artifact.

> without having to cd
> around and mvn install and then cd to application and mvn cluster-app.

Sorry, that is just what you need to do I think. See MNG-5059 for discussion.

(In reply to comment #3)
> are the sources for nbm-maven-plugin here:
> http://svn.codehaus.org/mojo/trunk/mojo/nbm-maven/nbm-maven-plugin/

Yes.

> I see the latest change in that

3085ac76f9ae is in the NB IDE, not the plugin (which also has its own bug tracker).