Using the Eclipse IDE with Project.net
However, Eclipse is not required to build the project.net application. You can simply do an ant build from within the core/ directory to build and redeploy it to a Weblogic or Tomcat server.
cd internal ant build-and-redeploy
In order to use the Eclipse debugger with Weblogic, you must run project.net using the Weblogic eclipse plugin.
Install Eclipse SDK
Download and install Eclipse Callisto from http://www.eclipse.org/callisto/java.php.
Add Update Sites
Using the Eclipse Help--> Software Updates--> Find and Install... dialog, Add any additional update sites. The Callisto discovery update site will already be present. Select any additional Callisto tools you want to add.
After you install eclipse SDK, run eclipse and enter the following up update site using the Help-->Software Updates--> Find and Install... dialog box. Select the Search for new features to install, then Enter the following URLs using the New Remote Site... button.
- Subclipse plugin http://subclipse.tigris.org/update_1.2.x
- BEA Weblogic Plugin https://eclipse-plugin.projects.dev2dev.bea.com/update
Eclipse Configuration Files
You will find eclipse configuration files in the source tree at https://svn.project.net/svn/pnet-root/trunk/core/config/eclipse
Copy the .classpath, .project files and .expernalToolBuilders and .settings directories into your eclipse working directory (called trunk by default in the config files). These files provide configuration for the following:
- Java Build Path -- to keep the eclipse Java Builder happy.
- Java Compiler compliance level of 1.4 -- so the assert statements are reported as errors.
- An Ant Builder that uses the project.net ant script to build and deploy to Weblogic.
Note: these config files assume your working directory is called "trunk" and that your Weblogic installation is located at C:\bea\weblogic81. IF your locations are different, you will need to change the a couple lines in these files or use the eclipse interface to make the changes.
Building with Eclipse
To build the project.net product, click the "Build All" toolbar button or select Project-->Build Project. This will run the eclipse java builder and the project.net ant build script. Only the project.net ant build is deployed to the weblogic application server. But the eclipse java build is still useful for clickable errors and good warnings in the Problems window.
Note: The eclipse java builder is currently giving 7 errors about duplicate java classes. This is OK and will not affect the ant build. Since there is a core/ build and a commercial/ build, there are stub files in the core/ build in order to provide a message such as "This feature is only available in the commercial version".
Deploying to Weblogic
To configure the eclipse Weblogic plugin, select the Window-->Preferences dialog and click on Weblogic. Add a server instance with settings that match your Weblogic installation. Typically, these are:
Display Name: Weblogic 8.1.5 Server Type: WebLogic Server 8.1 BEA Home: C:\bea Weblogic Home: C:\bea\weblogic81 Domain Name: pnet Domain Home: C:\bea\user_projects\domains\pnet Server Name: myserver Host Name: localhost Port: 7001 SSL Port: 7002 User Name: weblogic Password: weblogic
Click the Runtime tab and select/add your JDK (such as C:\bea\jdk142_08).
Select Window-->Show View-->Other... and select the Weblogic view. Right-click on the Weblogic instance and Start it.
You can now use all the features of the eclipse debugger including watches, breakpoints, see threads, etc. Beautiful!
Edit, Build, Test!
You now have eclipse configured for quick edit-build-test iterations. Just leave the Weblogic server running. You don't need to restart it. Edit a file, click Build All and your changes will be deployed to Weblogic and Weblogic will automatically reload them.
