Description
During this lab you will try to apply a patch to your project.
You will also add two plugins to Eclipse and
then you will continue modifying the build.xml file
and use javadoc.
Task 0
Install Metrics and EclEmma.
-
Follow the installation procedure on the
Metrics web page.
-
Follow the instructions given in the
Download and Installation page of EclEmma.
-
Enable and try to run the plugins.
-
What is the average cyclomatic complexity?
How much is the coverage of your code?
How much is the coverage of IRCClient?
Task 1
Apply a patch to your project using Eclipse.
-
Check out your team project in Eclipse or update an existing
copy if you have one.
-
Look at
Changeset 153 in the main project code.
-
Use the link labeled Unified Diff at the bottom to save a "patch
file" containing the changes.
-
Apply the patch to your project using the Eclipse feature (Team->Apply
Patch...).
-
Run your tests to make sure they still pass, then commit the changes you just
applied, including appropriate comments.
-
How much is the coverage of your code?
How much is the coverage of IRCClient?
Task 2
Modify the Ant build file. When you are done,
only the targets listed below may be defined.
-
compile: compile the Java files under the src
directory. The class files are stored in the classes
directory.
-
compile-test: compile the Java files under the test
directory. The class files are stored in the suite
directory. This target depends on compile.
-
jar: after creating a directory named jar build a jar
for the application and place it in the directory created. This
target depends on compile.
-
doc: after creating a directory named doc, build the
html documentation for the application (not the tests) by running
javadoc placing all the documents in the directory created.
-
test: run all the tests. Dependencies should be set appropriately.
-
run: run the application from the jar.
Dependencies should be set appropriately.
-
all: builds the application and creates the jar file, runs the
tests, creates the html documentation, and then runs the application.
Dependencies should be set appropriately.
-
clean: restores the initial state of
source tree removing all the directories and files created.
clean depends on clean-compile,
clean-jar, clean-test, and clean-doc.
-
clean-compile: removes the classes directory and
its content.
-
clean-jar: removes the jar directory and
its content.
-
clean-doc: removes the doc directory and
its content.
-
clean-test: removes the suite directory and
its content.
Check List
-
Apply and create patches.
-
How to read and write an Ant build file, define targets,
and their dependencies.
-
Install and use plugins.
Useful Links