Dropping J2EE artifacts into a free-form project

You can place application artifacts in a free-form project and let the rapid deployment tools automatically place them in the appropriate J2EE project structure, generate any additional required artifacts to construct a J2EE compliant application, and deploy that application on a target server.

Steps

  1. (Optional) If you are publishing an application to a local server, determine if this application will require future configurations of server-specific functions using the WebSphere® administrative console. The rapid deployment tools do not automatically configure server-specific functions for an application. You need to create and manage the server-specific configurations through the WebSphere administrative console. Examples of server-specific configurations include setting up ports, data sources, or security role mappings. When publishing an application to a local server, the server runs the resources within the workspace. As a result, the server does not maintain the resources for the application on the local server. To maintain the resources within the application, use remote publishing (even though you are using a local server), so that you can later modify server-specific configurations using the administrative console. To use remote publishing on a local server to keep resources in an application:
    1. Open the headless.props file in the workspace/.plugins/.metadata/com.ibm.ws.rapiddeploy.core directory, where workspace is the directory where your rapid deployment project resides.
    2. Set the parameter value of TREAT_SERVER_AS_REMOTE to true. This enables the WebSphere Administrative console to work with the application.
  2. Verify the server you want to deploy your application is running.
    Tip: If there is no server connection, you get the following console output:
    [06:52:28 PM] Publishing MyProjectApp to server_510658053
    [06:52:28 PM] Failed to make connection to Websphere Application Server.
  3. Launch a rapid deployment session by using the wrd command.
  4. Use your file management system to place your application artifacts properly into a free-form project. The directory name of the free-form project has the same string value you provided for the -project parameter when you created the free-form project.
    Note: When you create or drop in your J2EE artifacts into the free-form project, these resources will automatically be placed in the appropriate location in the J2EE project structure. You might experience approximately five seconds delay for the changes in the files system to be picked up, as these changes are being polled from the workspace.
Tip:
The rapid deployment tools preserve the folder structures created and dropped into a free-form project. When dropping Java™ source files, place these files in the correct package structure to avoid compilation errors. For example, suppose a Java package statement, package java.src;, is defined in a Java source file, HelloWorld.java. Simply dropping the Java source file, HelloWorld.java, in the file path, workspace/MyFreeForm/HelloWorld.java, where workspace is the directory where your rapid deployment project resides, results in the following compilation error, displayed in the console output:
[06:32:19 PM] [/MyFreeForm/HelloWorld.java] Added
[06:32:20 PM] [/MyFreeForm/bin/HelloWorld.class] copied to project [MyFreeFormUtility]
[06:32:20 PM] 'The declared package does not match the expected package ' in resource 'HelloWorld.java' on line number 10
To correct the compilation error, place the HelloWorld.java source file in the following file path workspace/MyFreeForm/java/src/HelloWorld.java
The following topics show how to handle supported artifacts in free-form projects:
Related concepts
Free-form projects
Related tasks
Creating a free-form project in your workspace
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.