db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "BuildingDerby" by AndrewMcIntyre
Date Fri, 23 Feb 2007 23:04:33 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The following page has been changed by AndrewMcIntyre:
http://wiki.apache.org/db-derby/BuildingDerby

The comment on the change is:
Fix a few mangled sentences, add a note about adding junit.jar to the build path

------------------------------------------------------------------------------
  
  Feel free to add your tips for building Derby below.
  
- = Using Eclipse to Build Derby - Updated =
+ = Using Eclipse to Build Derby =
- [[Anchor(UsingEclipseToBuildDerbyUpdated)]]
+ [[Anchor(UsingEclipseToBuildDerby)]]
  
   1. Install Subclipse if not already installed.
  
-    Go to Help -> Software Updates -> Find and Intall... and choose "Search for new
features to install" and click Next. At the next screen, click New Remote Site and enter Subclipse
for the name field and http://subclipse.tigris.org/update_1.2.x/ for the URL. This will add
the Subclipse update site to your list of update sites. Click Finish and Eclipse will search
for new features and updates to install. On the next screen, check the Subclipse box. If warned
that you do not have Mylar installed, expand the Subclipse box and uncheck the Mylar Integration
box. Click Next. You should be presented with the license terms for Subclipse. If you agree,
click the correct radio button to accept the license and click Next, then Finish, then Install
All to install/update Subclipse and related components. Right-click in the SVN Repository
frame and click New... to add a new repository location.
+    Go to Help -> Software Updates -> Find and Intall... and choose "Search for new
features to install" and click Next. At the next screen, click New Remote Site and enter Subclipse
for the name field and http://subclipse.tigris.org/update_1.2.x/ for the URL. This will add
the Subclipse update site to your list of update sites. Click Finish and Eclipse will search
for new features and updates to install. On the next screen, check the Subclipse box. If warned
that you do not have Mylar installed, expand the Subclipse box and uncheck the Mylar Integration
box. Click Next. You should be presented with the license terms for Subclipse. If you agree,
click the correct radio button to accept the license and click Next, then Finish, then Install
All to install/update Subclipse and related components.
  
   1. Check out the Derby codeline using Subclipse.
  
@@ -34, +34 @@

  
   1. Add a new Ant Builder
  
-    While still in the Properties window, go to the Builders tab. Select New.... And choose
Ant Build. In the next screen, click Browse workspace... under Buildfile, and choose the top-level
build.xml. Go to the Targets tab, and in the Manual Build section, click the Set Targets...
button. Uncheck the default buildsource and select the all target. If you get an error that
com.sun.tools.javac could not be found and to check if your JAVA_HOME is set, you may need
to go to the Classpath tab and add tools.jar from your JDK 1.4.2 installation to the . 
+    While still in the Properties window, go to the Builders tab. Select New.... And choose
Ant Build. In the next screen, click Browse workspace... under Buildfile, and choose the top-level
build.xml. Go to the Targets tab, and in the Manual Build section, click the Set Targets...
button. Uncheck the default buildsource and select the all target. If you get an error that
com.sun.tools.javac could not be found and to check if your JAVA_HOME is set, you may need
to go to the Classpath tab and add tools.jar from your JDK 1.4.2 installation by clicking
on User Entries and then Add External Jars.... 
  
   1. Build 
  
-    Once your new Ant Builder is set up, ctrl-B (or cmd-B on the Mac) will start a Derby
build.
+    Once your new Ant Builder is set up, ctrl-B (or cmd-B on a Mac) will start a Derby build.
  
-  1. JUnit Tests
+  1. Running JUnit Tests
  
-    Once a complete build has occurred, if you want to run JUnit tests, right-click on a
test class and select Run As... and then JUnit test. If it complains that there are errors
building, just ignore and select Run Anyway.
+    Make sure that you have added junit.jar to the Build Path by right-clicking on the project
in the workspace, and choosing Properties. In the Properties dialog, choose Java Build Path
and select the Libraries tab. Click the Add Jars... button if you have a copy of junit.jar
in your workspace, or Add External Jars... if you have a copy outside of your current workspace.
Once a complete build has occurred, if you want to run JUnit tests, right-click on a test
class and select Run As... and then JUnit test. If it complains that there are errors building,
just ignore and select Run Anyway.
  
  NOTE: Because some files are based on the JDBC 4.0 interfaces, there will be some files
marked as having errors by Eclipse, since they do not conform to the version of Java set as
your JRE System Library.
  
- = Using Eclipse to Build Derby =
- [[Anchor(UsingEclipseToBuildDerby)]]
- 
- This information was resurrected from [http://mail-archives.apache.org/mod_mbox/db-derby-user/200501.mbox/%3c41EC110F.80000@bristowhill.com%3e
a really old email thread], so feel free to update it.
- 
-  1. Verify you can build Derby from the command line.
- 
-    Setup everything as per the Derby build doc "How to build Derby" at http://db.apache.org/derby/derby_downloads.html.
If you can build Derby from the command line, you're ready to set up Eclipse.
- 
-  1. Derby uses jdk14 and jdk13 for its builds ([https://issues.apache.org/jira/browse/DERBY-1982
DERBY-1982] and [https://issues.apache.org/jira/browse/DERBY-2121 DERBY-2121] remove the jdk13
build dependency in 10.3)
- 
-    Using the default Eclipse building (which uses only one jdk ) may not a good idea.
- 
-   un-check the  Preferences for auto building.
-    Window - Preferences - Workbench - Build automatically
-    Window - Preferences - Run/Debug - Launching - Build (if required)
-    before launching
- 
-  1. Check out the Derby codeline
- 
-    The rest of these instructions assume that you checked out the Derby 10.2 codeline in
the subdirectory
-    {{{C:\derby10_2\10.2}}}:
- 
-    {{{svn co http://svn.apache.org/repos/asf/db/derby/code/branches/10.2/}}}
- 
-  1. The Eclipse project workspace is pointed to C:\derby10_2
- 
-    If you try creating a project with the same name '10.2' as above Eclipse identifies the
all the required subdirectories including the sources and the classes (will take some time)
since the checked out Derby 10.2 has same name.
- 
-  1. Setup Eclipse to recognize the 'classes' directory as the output folder.
- 
-    Right click on the build.xml (most external)  - Run  -  the first 'Ant
-    Build' uses the default "buildsource"
- 
-    The second  'Ant Build'  gives you the choices of the ant target.
- 
-  1. Find JDK tools.jar 
- 
-    The java executable that runs Ant from Eclipse needs to be able to find the JDK {{{tools.jar}}}
file -- and it might not be able to find it if Ant is running from a JRE installation.
- 
-    For the taglet build, Ant tries to pick {{{tools.jar}}} up from the JDK relative to the
setting of the Java system property java.home, to avoid having to make a copy of the JDK's
tools.jar to another location. On most systems, java.home is set to the *jre* directory of
the JDK installation. So, relative to this directory, {{{tools.jar}}} is in {{{${java.home}/../lib/tools.jar}}}.
- 
-    However, if Ant is running from a JRE installation instead of a JDK installation, this
directory will not exist.  If you add the -verbose property to the Ant command line (inside
Eclipse) and capture the output, the 4th line of the output will give you the location of
the java.home. Once you know the location of java.home, you can copy  {{{tools.jar}}} to where
the build expects it to be ({{{${java.home}/../lib}}}).
- 

Mime
View raw message