diff options
author | Chris Sarbora <sarbs@cyngn.com> | 2015-07-16 17:58:05 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2015-07-16 18:54:08 -0700 |
commit | 9bf517f89d7ae38fbed6bb0a08547020c024dff3 (patch) | |
tree | 16fcb744f1e28fa38f4938d4f4222ac7b1d04dcb /build/core | |
parent | d5420c0638b7f32c54cd6f998af13d8d92ec063c (diff) | |
download | vendor_replicant-9bf517f89d7ae38fbed6bb0a08547020c024dff3.zip vendor_replicant-9bf517f89d7ae38fbed6bb0a08547020c024dff3.tar.gz vendor_replicant-9bf517f89d7ae38fbed6bb0a08547020c024dff3.tar.bz2 |
Hack in support for the old version of Maven that Ubuntu apparently ships with
Change-Id: I39094627ff114901cc49f792ab601ab5b1677c19
Diffstat (limited to 'build/core')
-rw-r--r-- | build/core/maven_artifact.mk | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/build/core/maven_artifact.mk b/build/core/maven_artifact.mk index 3335353..d0019e2 100644 --- a/build/core/maven_artifact.mk +++ b/build/core/maven_artifact.mk @@ -34,15 +34,34 @@ LOCAL_PREBUILT_MODULE_FILE := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS) $(LOCAL_PREBUILT_MODULE_FILE): specifier := $(LOCAL_MAVEN_GROUP):$(LOCAL_MAVEN_ARTIFACT):$(LOCAL_MAVEN_VERSION):$(LOCAL_MAVEN_PACKAGING)$(if $(LOCAL_MAVEN_CLASSIFIER),:$(LOCAL_MAVEN_CLASSIFIER)) $(LOCAL_PREBUILT_MODULE_FILE): repo := $(LOCAL_MAVEN_REPO) -$(LOCAL_PREBUILT_MODULE_FILE): - @mvn -q dependency:get dependency:copy \ - -DremoteRepositories=central::::$(repo) \ + +ifeq ($(shell mvn --version | head -1),Apache Maven 3.0.5) + copy_task := + repo_param := -DrepoUrl= + output_param := -Ddestination= + $(LOCAL_PREBUILT_MODULE_FILE): nogroup_file := $(LOCAL_MAVEN_ARTIFACT)-$(LOCAL_MAVEN_VERSION)$(if $(LOCAL_MAVEN_CLASSIFIER),-$(LOCAL_MAVEN_CLASSIFIER)).$(LOCAL_MAVEN_PACKAGING) + $(LOCAL_PREBUILT_MODULE_FILE): copy_command := $(hide) cp ~/.m2/repository/$(subst .,/,$(LOCAL_MAVEN_GROUP))/$(LOCAL_MAVEN_ARTIFACT)/$(LOCAL_MAVEN_VERSION)/$(nogroup_file) +else + copy_task := dependency:copy + repo_param := -DremoteRepositories=central:::: + output_param := -DoutputDirectory= + $(LOCAL_PREBUILT_MODULE_FILE): copy_command := $(hide) mvn -q dependency:copy \ -Dartifact=$(specifier) \ - -DoutputDirectory=$(dir $@) \ -Dmdep.prependGroupId=true \ -Dmdep.overWriteSnapshots=true \ -Dmdep.overWriteReleases=true \ + $(output_param) + $(LOCAL_PREBUILT_MODULE_FILE): nogroup_file := nonexistent +endif + +$(LOCAL_PREBUILT_MODULE_FILE): + $(hide) mvn -q dependency:get \ + $(repo_param)$(repo) \ + -Dartifact=$(specifier) \ -Dtransitive=false + $(hide) mkdir -p $(dir $@) + $(copy_command)$(dir $@) + $(hide) mv $(dir $@)/$(nogroup_file) $@ 2>/dev/null || true @echo -e ${CL_GRN}"Download:"${CL_RST}" $@" include $(BUILD_PREBUILT) |