Adam Bien's Weblog

Saturday Jan 03, 2009

Netbeans 6.5 Quicktip: Changing The Archive (EJB-JAR) Name, Deploying RARs

  1. Go to: [PROJECT_NAME]/nbproject/project.properties (using CTRL+2)
  2. The property: jar.name specifies the archive name which is going to be deployed to the server and copied into: [PROJECT_NAME]/dist as well.
Tip: if you change the ending from .jar to .rar you can misuse an EJB project to develop, debug and redeploy JCA connectors to Glassfish v2 - its really convenient.


[my tweets]  Rss My book: Real World Java EE - Rethinking Best Practices

Kommentare:

A few years ago I was writing a JCA connector in NetBeans and I think I tried that. Whichever project type it was, it was not copying the dependencies into a lib folder inside of the .jar file so I ended up using a plain Java SE project type. There was still some manual work involved in packaging, so I eventually switched to Maven2 for everything. There is built-in rar project support, although nobody tells you how to structure your project. With the Maven2 rar plugin it seems that it expects you to have multiple projects. One for the JCA code itself, one for rar packaging that bundles the JCA code's .jar and its dependencies into a .rar file with an ra.xml, and a parent project to both so you can clean/build in one command. One nice thing about Maven2 is that the 3 separate projects don't really feel separate because they live in the same directory tree and the "child" projects inherit most of their configuration from the parent project. It doesn't feel the same as having three projects for EAR, EJB and WAR using native NetBeans projects.

Gesendet von Ryan de Laplante am January 03, 2009 at 05:21 PM CET #

Senden Sie einen Kommentar:
  • HTML Syntax: Ausgeschaltet
About
My Recent Books
Conferences
CommunityOne East N.Y.C
JavaONE 2008 Interview
Adverts
Search
Links
greenfire.dev.java.net
...the last 150 posts
...the last 10 comments
my.netbeans.org
Visitors
License