better check for the case-sensitiveness issue

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@116283 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
felipeal
2004-12-09 03:15:36 +00:00
parent b063e42b54
commit 331a7e754f

View File

@@ -101,19 +101,24 @@
Check if there is no case-sensitive issues
-->
<util:file name="${lib.file.parent}/${lib.file.name}" var="checkFile" />
<j:if test="${(!checkFile.getAbsolutePath().equals(checkFile.getCanonicalPath()))}">
<util:file name="${maven.repo.local}" var="checkRepoDir" />
<j:set var="repoPathSize" value="${size(checkRepoDir.getCanonicalPath())}"/>
<j:set var="absolutePath" value="${checkFile.getAbsolutePath().substring(repoPathSize)}"/>
<j:set var="canonicalPath" value="${checkFile.getCanonicalPath().substring(repoPathSize)}"/>
<j:if test="${!absolutePath.equals(canonicalPath)}">
<!-- on some environments, the value of MAVEN_HOME might be different thant the
cannonical path, which would make the above test to fail. So, we just show
the warning if the repo -->
<util:file name="${maven.repo.local}" var="checkRepoDir" />
<ant:echo>
############################################################################
# WARNING: possible case-sensitiveness issue within a dependency #
############################################################################
# One possibility is that the dependency was either retrieved in the past #
# with the wrong case or has been specified with the wrong case in your #
# project.xml file. If that is the case, fix your project.xml or update #
# your local repository with the properly-cased file and try again. #
# #
# Another possibility is that your MAVEN_HOME is set with different cases #
# than its canonical representation in your operating systems. If that's #
# the case, you can ignore this message or correct the value of MAVEN_HOME #
# Looks like a the dependency was either retrieved in the past with the #
# wrong case or has been specified with the wrong case in your project.xml #
# file. If that is the case, fix your project.xml or update your local #
# repository with the properly-cased file and try again. #
# #
# Reason for the warning: #
# the dependency ${dep.id} is located at:
@@ -121,7 +126,7 @@
# but was expected to be located at:
'${checkFile.getCanonicalPath()}'
############################################################################
</ant:echo>
</ant:echo>
</j:if>
<ear:setPath lib="${lib}" var="bundledPath"/>