git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1554524 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -138,6 +138,7 @@ Glenn Twiggs | |||||
| Greg Nelson | Greg Nelson | ||||
| Greg Roodt | Greg Roodt | ||||
| Greg Schueler | Greg Schueler | ||||
| Grégoire Vatry | |||||
| Günther Kögel | Günther Kögel | ||||
| Harish Prabandham | Harish Prabandham | ||||
| Haroon Rafique | Haroon Rafique | ||||
| @@ -21,6 +21,10 @@ Fixed bugs: | |||||
| where another thread already created the same directory. | where another thread already created the same directory. | ||||
| Bugzilla Report 55290 | Bugzilla Report 55290 | ||||
| * <manifestclasspath> created '/' rather than './' for the parent | |||||
| directory of the given jarfile. | |||||
| Bugzilla Report 55049 | |||||
| Other changes: | Other changes: | ||||
| -------------- | -------------- | ||||
| @@ -576,6 +576,10 @@ | |||||
| <first>Greg</first> | <first>Greg</first> | ||||
| <last>Schueler</last> | <last>Schueler</last> | ||||
| </name> | </name> | ||||
| <name> | |||||
| <first>Grégoire</first> | |||||
| <last>Vatry</last> | |||||
| </name> | |||||
| <name> | <name> | ||||
| <first>Günther</first> | <first>Günther</first> | ||||
| <last>Kögel</last> | <last>Kögel</last> | ||||
| @@ -87,7 +87,11 @@ public class ManifestClassPath extends Task { | |||||
| String relPath = null; | String relPath = null; | ||||
| String canonicalPath = null; | String canonicalPath = null; | ||||
| try { | try { | ||||
| relPath = FileUtils.getRelativePath(dir, pathEntry); | |||||
| if (dir.equals(pathEntry)) { | |||||
| relPath = "."; | |||||
| } else { | |||||
| relPath = FileUtils.getRelativePath(dir, pathEntry); | |||||
| } | |||||
| canonicalPath = pathEntry.getCanonicalPath(); | canonicalPath = pathEntry.getCanonicalPath(); | ||||
| // getRelativePath always uses '/' as separator, adapt | // getRelativePath always uses '/' as separator, adapt | ||||
| @@ -0,0 +1,30 @@ | |||||
| <?xml version="1.0"?> | |||||
| <!-- | |||||
| Licensed to the Apache Software Foundation (ASF) under one or more | |||||
| contributor license agreements. See the NOTICE file distributed with | |||||
| this work for additional information regarding copyright ownership. | |||||
| The ASF licenses this file to You under the Apache License, Version 2.0 | |||||
| (the "License"); you may not use this file except in compliance with | |||||
| the License. You may obtain a copy of the License at | |||||
| http://www.apache.org/licenses/LICENSE-2.0 | |||||
| Unless required by applicable law or agreed to in writing, software | |||||
| distributed under the License is distributed on an "AS IS" BASIS, | |||||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||||
| See the License for the specific language governing permissions and | |||||
| limitations under the License. | |||||
| --> | |||||
| <project default="antunit" | |||||
| xmlns:au="antlib:org.apache.ant.antunit"> | |||||
| <import file="../antunit-base.xml" /> | |||||
| <target name="testRelativePathOfParentDir"> | |||||
| <manifestclasspath property="jar.classpath" | |||||
| jarfile="${basedir}/foo.jar"> | |||||
| <classpath path="${basedir}"/> | |||||
| </manifestclasspath> | |||||
| <au:assertPropertyEquals name="jar.classpath" value="./"/> | |||||
| </target> | |||||
| </project> | |||||