Specify the maven-dependency-plugin version directly so as to force Maven 3.0.5 to use the correct version.
Change-Id: Ia8b943feeb13d8835e0510404d067a2760608aa6
This commit is contained in:
parent
4397d1d238
commit
bf1bcdbc44
@ -32,36 +32,22 @@ artifact_filename := $(LOCAL_MAVEN_GROUP).$(LOCAL_MAVEN_ARTIFACT)-$(LOCAL_MAVEN_
|
|||||||
|
|
||||||
LOCAL_PREBUILT_MODULE_FILE := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),$(LOCAL_MODULE),,COMMON)/$(artifact_filename)
|
LOCAL_PREBUILT_MODULE_FILE := $(call intermediates-dir-for,$(LOCAL_MODULE_CLASS),$(LOCAL_MODULE),,COMMON)/$(artifact_filename)
|
||||||
|
|
||||||
$(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): repo := $(LOCAL_MAVEN_REPO)
|
||||||
|
$(LOCAL_PREBUILT_MODULE_FILE): group := $(LOCAL_MAVEN_GROUP)
|
||||||
ifeq ($(shell mvn --version | head -1),Apache Maven 3.0.5)
|
$(LOCAL_PREBUILT_MODULE_FILE): artifact := $(LOCAL_MAVEN_ARTIFACT)
|
||||||
copy_task :=
|
$(LOCAL_PREBUILT_MODULE_FILE): version := $(LOCAL_MAVEN_VERSION)
|
||||||
repo_param := -DrepoUrl=
|
$(LOCAL_PREBUILT_MODULE_FILE): packaging := $(LOCAL_MAVEN_PACKAGING)
|
||||||
output_param := -Ddestination=
|
$(LOCAL_PREBUILT_MODULE_FILE): classifier := $(LOCAL_MAVEN_CLASSIFIER)
|
||||||
$(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):
|
||||||
$(LOCAL_PREBUILT_MODULE_FILE): copy_command := $(hide) cp ~/.m2/repository/$(subst .,/,$(LOCAL_MAVEN_GROUP))/$(LOCAL_MAVEN_ARTIFACT)/$(LOCAL_MAVEN_VERSION)/$(nogroup_file)
|
$(hide) mvn -q org.apache.maven.plugins:maven-dependency-plugin:2.10:get \
|
||||||
else
|
org.apache.maven.plugins:maven-dependency-plugin:2.10:copy \
|
||||||
copy_task := dependency:copy
|
-DremoteRepositories=central::::$(repo) \
|
||||||
repo_param := -DremoteRepositories=central::::
|
-Dartifact=$(group):$(artifact):$(version):$(packaging)$(if $(classifier),:$(classifier)) \
|
||||||
output_param := -DoutputDirectory=
|
|
||||||
$(LOCAL_PREBUILT_MODULE_FILE): copy_command := $(hide) mvn -q dependency:copy \
|
|
||||||
-Dartifact=$(specifier) \
|
|
||||||
-Dmdep.prependGroupId=true \
|
-Dmdep.prependGroupId=true \
|
||||||
-Dmdep.overWriteSnapshots=true \
|
-Dmdep.overWriteSnapshots=true \
|
||||||
-Dmdep.overWriteReleases=true \
|
-Dmdep.overWriteReleases=true \
|
||||||
$(output_param)
|
-Dtransitive=false \
|
||||||
$(LOCAL_PREBUILT_MODULE_FILE): nogroup_file := nonexistent
|
-DoutputDirectory=$(dir $@)
|
||||||
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}" $@"
|
@echo -e ${CL_GRN}"Download:"${CL_RST}" $@"
|
||||||
|
|
||||||
include $(BUILD_PREBUILT)
|
include $(BUILD_PREBUILT)
|
||||||
|
Loading…
Reference in New Issue
Block a user