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 201054 - Improve support for Servers launched by Maven
Summary: Improve support for Servers launched by Maven
Status: NEW
Alias: None
Product: javaee
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.1
Hardware: All All
: P2 normal (vote)
Assignee: Martin Janicek
URL:
Keywords:
: 216109 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-08-17 19:14 UTC by _ gtzabari
Modified: 2014-07-30 13:50 UTC (History)
3 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 _ gtzabari 2011-08-17 19:14:21 UTC
Currently, servers launched by Maven (Jetty, Cargo, etc) are very difficult to configure. In truth, the current user interface looks like a hack.

I recommend adding a full-fledged server that users can select off "Project Properties -> Run -> Server" whose name would be "Maven-based Server".
Comment 1 _ gtzabari 2011-08-17 19:21:47 UTC
Motivation: Right now users need to set Maven Actions to "magic" (undocumented) values in order to get Netbeans to accept Maven-based servers. Some features, like profiling code launched by Maven-based servers is not even possible yet (see bug #200771).

Adding a full-fledged entry for Maven servers would treat such servers as first-class citizens.

PS: I use Jetty as my web server because I'm shipping a desktop application with an embedded web server. I can't use conventional web servers such as Tomcat or Glassfish. Historically Maven-based servers are used primarily for testing, but there is a need to support them as a server for the main codebase.
Comment 2 _ gtzabari 2011-08-24 14:14:22 UTC
It's worth noting I launch Jetty in one of two ways:

1. Initially I used the jetty:run goal
2. Now I use:

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.2</version>
        <executions>
          <execution>
            <goals>
              <goal>exec</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <executable>java</executable>
          <arguments>
            <argument>-classpath</argument>
            <classpath/>
            <argument>-Djava.library.path=${project.build.directory}/dependency/jperipheral/windows-i386-vs10-debug/lib</argument>
            <argument>-ea</argument>
            <argument>com.muxlab.vitex.database.server.Main</argument>
          </arguments>
        </configuration>
      </plugin>

because I plan on wrapping com.muxlab.vitex.database.server.Main in a native executable when I ship the product. jetty:run is well suited for getting started but I believe eventually everyone who is embedding Jetty has to replace it with a main() class.
Comment 3 David Konecny 2011-09-21 01:04:40 UTC
Martin, something to think about.
Comment 4 Martin Janicek 2014-07-30 13:09:51 UTC
*** Bug 216109 has been marked as a duplicate of this bug. ***