diff --git a/README.md b/README.md index eb7ce07..486c915 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,12 @@ Example: } ``` +### Vendoring Portico + +`make lib` rebuilds and vendors only Portico's Java jar into this repository's local Maven file repository. Portico ships its own Ant wrapper at `codebase/ant`, so no separate Ant installation is required. + +The vendoring script intentionally uses a Java-only Portico Ant build file. On Linux, Portico's full `build.xml` imports C++ profiles that are not needed for this project and can fail during Ant parsing with a duplicate `cpp.hla13.compile` target before any Java compilation begins. + ### To Run The build output does not bundle an RTI implementation. The development runtime targets add either the vendored Portico RTI jar or a local Pitch RTI install on the runtime classpath. diff --git a/scripts/vendor-portico.sh b/scripts/vendor-portico.sh index 13ed68f..3cda550 100755 --- a/scripts/vendor-portico.sh +++ b/scripts/vendor-portico.sh @@ -87,6 +87,8 @@ write_checksum() { require_command git require_command awk require_command find +require_command java +require_command javac WORK_DIR="$(mktemp -d "${TMPDIR:-/tmp}/portico-vendor.XXXXXX")" cleanup() { @@ -114,7 +116,27 @@ fi echo "Building Portico ref ${PORTICO_REF}" cd codebase -./ant java.jar.portico + +JAVA_ONLY_BUILD_FILE="build-java-only.xml" +cat > "${JAVA_ONLY_BUILD_FILE}" < + + + + + + + + + + + + + + +EOF + +./ant -f "${JAVA_ONLY_BUILD_FILE}" java.jar.portico PORTICO_JAR="$(find dist -path "*/lib/portico.jar" -type f | sort | tail -n 1)" if [[ -z "${PORTICO_JAR}" ]]; then