aboutsummaryrefslogtreecommitdiffstats
path: root/bcel-builder/readme.html
blob: 734be723e2dca477107b4be5ffa0955c46df45b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html> <head>
<title>The BCEL-builder module</title>
</head>

<body>
<h1>The BCEL-builder module</h1>

<p> The contents of this directory are:
</p>

<ul>
  <li>This file</li>
  <li>build.xml -- an ant script </li>
  <li>patch.txt -- a diff patchfile</li>
</ul>

<p> And pretty much nothing else.  Well, then, what do you do with
this directory?  Well, the whole point is to generate bcel/bcel.jar in
the lib package.  To do so, first stick
<strong>bcel-5.1-src.zip</strong> in this directory, then run ant.
(at one point, this was available at
<a href="http://archive.apache.org/dist/jakarta/bcel/source/bcel-5.1-src.zip">
http://archive.apache.org/dist/jakarta/bcel/source/bcel-5.1-src.zip</a>)
After much unzipping, patching, and compiling, you should get an
appropriate bcel.jar file.  Now put it in the appropriate place. </p>

<p> If there's something <em>wrong</em> with the bcel.jar in the lib
project, well, then you've got some development to do.  You'll need
to know some more ant targets.  But before anything, get that
<strong>bcel-5.1-src.zip</strong> and stick it in this directory.
<b>NOTE: You should be working on BCEL when the package names are org.aspectj.apache.bcel,
and *not* when the package names are org.apache.bcel.  If you run the extractAndPatch task
below, you will be left with a src folder in the correct state for further development.</b>
</p>

<p> There are five top-level ant targets apart from the usual "clean":</p>

<ul>
  <li>ant extractAndPatchAndJar -- this is just the composition of the extract,
  jar and srcjar targets, and is the default.  It extracts the source from bcel-5.1-src.zip, 
  patches it, renames the files to start org.aspectj.apache rather than org.apache then
  compiles the patched version into a jar and drops the new archives:
  bcel.jar and bcel-src.zip, into the project root.  This is the default task, mainly used
  to sanity check the building and make sure we're generating something.
  The bcel.jar and bcel-src.zip generated should be the same as that in ..\lib\bcel\. 
  </li>
  
  <li>ant extractAndPatch -- this extracts the source from bcel-5.1-src.zip,
  patches it, renames the files to start org.aspectj.apache rather than org.apache then
  copies the patched source into the project src directory, 
  there to be visible by eclipse for people to do development on it.
  For the patch file to be applied you need to have a patch.exe on your path,
  this bcel building process was tested with the version from cygwin.
  </li>
  
  <li>ant jar -- this copies the edited source from the project source
  directory and jars it up into bcel.jar, there to be tested.
  </li>
  
  <li>ant srcjar -- this copies the edited source from the project source
  directory and jars up the source code into bcel-src.zip.
  </li>
  
  <li>ant push -- this pushes the new bcel.jar and bcel-src.zip into ..\lib\bcel\. 
  - ready to be used by the greater compiler.</li>
  
  <li>ant diff -- this creates the patch.txt file, composed of the differences
  between the project src directory and the original bcel-5.1 source. 
  In order to create the patch, we transform the packages back to org.apache from 
  org.aspectj.apache.  To continue working on BCEL once you have done this, you might
  need to run the transformToAJ task to switch the packages back to the AJ prefix.
  For the patch file to be built successfully you need to have a diff.exe on your path,
  this bcel building process was tested with the version from cygwin.
  </li>

  <li>ant transformToAJ - this changes the packages for the BCEL classes to
  org.aspectj.apache from org.apache.  This is used by the extractAndPatch task above.
  </li>

  <li>ant transformFromAJ - this changes the packages for the BCEL classes to
  org.apache from org.aspectj.apache.  This is used by the diff task.
  </li>
</ul>

<p> All of the tasks are destructive, so don't do "ant extract", for example,
if you have anything in the project source directory you care about.
</p>

</body> </html>