Skip to end of metadata
Go to start of metadata
How Netbeans does it for Ant projects?

In the nbproject/properties file (which is shareable across users) it places a general server type ID (eg. Jboss4), then in private properties (non-shareable - nbproject/private/private.properties) it stores the actual identification of the server instance.

Maven approach

How to deploy maven j2ee projects using the netbeans APIs? assuming here we want to deploy and debug the webapps within netbeans on netbeans provided/supported servers.

I've hacked together a maven plugin that does the equivalent of netbeans ant tasks for deployment. The plugin is to be shipped with mevenide and placed in a file://based remote repository (this repo is in netbeans installation.) when running goals from IDE, we add the repository dynamically to the project before running through embedder. It requires the same VM and the netbeans on classpath.

It seems to work, at least for war packaged projects for now... A few issues with persistence though.

  • where to store the info about deployment server that is used? A property in the POM file with the server type? And keep the server instance ID internally? in case the internal one is not present but shared one is, try to find an instance of such server and assign it, if not fail and report to user?
  • where to store the context path? when set for the first time (on project opening, it's persisted into the server specific deployment descriptor it seems) keep it separately as well?
  • the url part within the webapp shall be part of the shared action/goal mapping? probably yes.
Customizer UI

The Maven UI should look similar to the ant/web project type one.

Labels
  • None