diff options
author | 2007-12-31 10:40:05 +0000 | |
---|---|---|
committer | 2007-12-31 10:40:05 +0000 | |
commit | 04a2d2859f011a936bed00778b5cf2fe31dd2160 (patch) | |
tree | fb5075093b796f643b5ce2860e39f05a983f2f86 /eclass | |
parent | Adding easymockclassextension (diff) | |
download | java-04a2d2859f011a936bed00778b5cf2fe31dd2160.tar.gz java-04a2d2859f011a936bed00778b5cf2fe31dd2160.tar.bz2 java-04a2d2859f011a936bed00778b5cf2fe31dd2160.zip |
allow maven-build.xml to be rewritten and custom build targets, thx to ali
svn path=/java-overlay/; revision=5877
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/java-maven-2.eclass | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/eclass/java-maven-2.eclass b/eclass/java-maven-2.eclass index 90a39010..c05ff02c 100644 --- a/eclass/java-maven-2.eclass +++ b/eclass/java-maven-2.eclass @@ -334,7 +334,7 @@ java-maven-2_src_unpack() { java-maven-2_src_compile_from_build_xml() { # compile order - EANT_BUILD_TARGET="clean compile jar" + EANT_BUILD_TARGET="${EANT_BUILD_TARGET:=clean compile jar}" # remove maven predefined depends to let us control the build # steps (order, and not use external jars) @@ -351,7 +351,12 @@ java-maven-2_src_compile_from_build_xml() { for module in ${JAVA_MAVEN_PROJECTS};do einfo "Compiling module: ${module}" pushd "${module}" >> /dev/null || die - [[ -f build.xml ]] && java-ant_bsfix_files build.xml + #[[ -f build.xml ]] && java-ant_bsfix_files build.xml + local build_files="" + [[ -f build.xml ]] && build_files="build.xml" + [[ -f maven-build.xml ]] && build_files="${build_files} maven-build.xml" + [[ -n "${build_files}" ]] && java-ant_bsfix_files ${build_files} + java-pkg-2_src_compile # need to unset unless bsfix will just die after the first call as # EANT_DOC_TARGET cannot be set if JAVA_ANT_JAVADOC_INPUT_DIRS is @@ -369,7 +374,10 @@ java-maven-2_src_compile_from_build_xml() { fi if [[ -z "${JAVA_MAVEN_PROJECTS}" ]]; then - [[ -f build.xml ]] && java-ant_bsfix_files build.xml + local build_files="" + [[ -f build.xml ]] && build_files = "build.xml" + [[ -f maven-build.xml ]] && build_files="${build_files} maven-build.xml" + [[ -n "${build_files}" ]] && java-ant_bsfix_files ${build_files} java-pkg-2_src_compile fi |