[Hints] Generating JavaDoc documentation with a Xcode target
[Hints] Generating JavaDoc documentation with a Xcode target
- Subject: [Hints] Generating JavaDoc documentation with a Xcode target
- From: francis labrie <email@hidden>
- Date: Tue, 11 Nov 2003 12:48:51 -0500
Hi,
I did want to build my JavaDoc documentation directly from Xcode
instead of doing it with a separate script.
I've finally find myself a way to do it, and you'll find below the
steps to do it yourself. Comments and enhancements are welcome:
- In Xcode, select the "Project / New Target..." menu option;
- Select "Java / Package" target in list then click on <Next> button;
- Type "Documentation" as Target Name;
- Select the proper project and click on <Finish> button;
- In Xcode, double-click on the new "Documentation" target;
- Click on the "Summary" section in the list;
- Click on the "Settings / Expert View" section on the list;
- Remove all the Build Settings. These are the following:
DYLIB_COMPATIBILITY_VERSION = 1
DYLIB_CURRENT_VERSION = 1
JAVA_ARCHIVE_CLASSES = YES
JAVA_ARCHIVE_TYPE = JAR
JAVA_COMPILER = /usr/bin/javac
JAVA_COMPILER_FLAGS =
JAVA_SOURCE_SUBDIR = .
LIBRARY_STYLE = STATIC
OPTIMIZATION_CFLAGS =
OTHER_CFLAGS =
OTHER_LDFLAGS =
OTHER_LIBTOOL_FLAGS =
OTHER_REZFLAGS =
PRODUCT_NAME = Untitled
PURE_JAVA = YES
REZ_EXECUTABLE = YES
SECTORDER_FLAGS =
WARNING_CFLAGS = "-Wmost -Wno-four-char-constants -Wno-unknown-pragmas"
- Add the following new Build Settings:
BUILD_FILES_DIR = "$(LOCAL_LIBRARY_DIR)/Application
Support/Apple/Developer Tools/WebObjects Support"
DOCUMENTATION_UNIQUIFIER = Documentation
JAVAC_SOURCE_FILE_ENCODING = UTF-8
JAVA_ARCHIVE_CLASSES = NO
JAVA_COMPILER = /usr/bin/javadoc
JAVA_COMPILER_DEBUGGING_SYMBOLS = NO
JAVA_COMPILER_FLAGS = "-extdirs
/Library/WebObjects/Extensions:/Library/Java/Extensions:/System/
Library/Java/Extensions:/System/Library/Frameworks/JavaVM.framework/
Home/lib/ext -charset UTF-8 -version -author -package -link
http://developer.apple.com/documentation/WebObjects/Reference/API -link
http://java.sun.com/products/jdk/1.4/docs/api -link
http://java.sun.com/webservices/docs/1.3/api"
JAVA_FRAMEWORK_RESOURCES_DIRS = Resources
PRODUCT_NAME =
"_WO$(DOCUMENTATION_UNIQUIFIER)$(PROJECT_NAME).$(WRAPPER_EXTENSION)"
RESOURCES_DIR = "$(CONTENTS_DIR)/Resources"
WRAPPER_EXTENSION = tmp
- In Xcode, select the "Project / New Build Phase / New Shell
Script Build Phase" menu option;
- Move this new Build Phase from the beginning to the end of the Build
Phases in the list;
- Add this code to the text field below the "Shell:" field:
#
# Construct Documentation resources path
#
DOCUMENTATION_BUILD_DIR="${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}"
RESOURCES_DOCUMENTATION_DIR=${DSTROOT}${LOCAL_LIBRARY_DIR}/Frameworks/
${PROJECT_NAME}.framework${RESOURCES_DIR}/Documentation
#
# Copy Documentation resources into the Contents/Resources directory.
#
. "${BUILD_FILES_DIR}/CopyResources.sh" "WebObjects"
"${DOCUMENTATION_BUILD_DIR}" "${RESOURCES_DOCUMENTATION_DIR}"
- Select the "Run only when installing" checkbox.
You must then add all Java sources and frameworks to the
"Documentation" target. Then, you can generate and install JavaDoc
documentation in the "Resources" folder of the framework with the
following console commands:
# Installing both binary and documentation
sudo xcodebuild install -alltargets -buildstyle Deployment DSTROOT=/
Kind regards,
--
Francis Labrie
Saint-Bruno-de-Montarville, Quebec, Canada
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.