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 153636

Summary: Allow deployment to server of any maven project that contains WEB-INF structure
Product: javaee Reporter: tomzi <tomzi>
Component: MavenAssignee: Martin Janicek <mjanicek>
Status: RESOLVED WONTFIX    
Severity: blocker    
Priority: P4    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description tomzi 2008-11-21 12:07:47 UTC
In our project we have many .jar maven modules that will be assembled to one web project during assembly cycle.

However in each .jar there exists a WEB-INF structure, so each developer may deploy each module (currently using
eclipse) independently during development.

In Netbeans there is no way to deploy a maven .jar project to any application server (tomcat....) only if the pom file
would be of type 'war', which can not be changed in our project.

I'd suggest to not rely on the 'war' property to figure out if the current maven project is a webproject, but have some
way to deploy any maven project to the server containing a WEB-INF structure.
Comment 1 Milos Kleint 2008-11-21 12:34:27 UTC
not a defect. even as enhancement it's rather a corner case.

have you tried the "netbeans.hint.packaging" property with value "war" in the given projects? it might work, but then
again it might not..
Comment 2 tomzi 2008-11-24 12:18:34 UTC
I think there must be _some_ sort of support to deploy any project the way the user wants it to be. There was a reason
why our company decided years ago to assemble a project like we do it still today. Which I must confess is proprietary.
However eg eclipse supported our way of deployment, so that it provided a way to tell the internal server plugin to
mount this project and start it up.

I guess, either there should be a way from the server plugin to support this usecase or from the project plugins side.
Don't you think? Ideally both would make sense.
Comment 3 Milos Kleint 2008-11-24 12:35:30 UTC
a sample project demonstrating the setup would be a nice first start. Not sure if there's only work in maven support, or
in other areas (deployment apis, webapp apis). The current j2ee support requires a war file I think. But I might be wrong.
Comment 4 tomzi 2008-11-26 08:18:19 UTC
You could create such a project simply this way:

.) New Project/Mavn/Maven Project/Maven Webapp Archetype
.) Change Deployment server in project Properties
.) Clean Build and Run the project -> Server Starts and Displays 'Hello world' in the browser
.) now open pom.xml and change <packaging>war</packaging> to <packaging>jar</packaging>

-> even though the project has web support (WEB-INF), it is not possible to run it on the server, however this should be
possible
Comment 5 tomzi 2008-12-11 08:33:42 UTC
Do you happen to have some workaround for this problem, until you had time to implement it?
Comment 6 Antonin Nebuzelsky 2010-01-14 06:58:15 UTC
Changing the default owner to issues@javaee.
Comment 7 Martin Balin 2016-07-07 08:55:34 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss