mirror of https://github.com/apache/ant-ivy
Merged changes from 2.0.0-rc2 branch back into trunk.
git-svn-id: https://svn.apache.org/repos/asf/ant/ivy/core/trunk@709004 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1804ef88b2
commit
c235721162
|
|
@ -117,6 +117,8 @@ for detailed view of each issue, please consult http://issues.apache.org/jira/br
|
|||
- FIX: Maven pom license url can contain xml entities (IVY-950)
|
||||
- FIX: Maven pom license has name as optional element (IVY-949)
|
||||
- FIX: Ivy doesn't throw an error when the parent POM cannot be loaded (IVY-931)
|
||||
- FIX: Maven pom parser is not handling pom property ${project.parent.version} (IVY-955)
|
||||
- FIX: inline resolve ignores the transitive attribute (IVY-958)
|
||||
|
||||
2.0.0-rc1
|
||||
=====================================
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@
|
|||
-->
|
||||
<project name="IvyRelease" default="snapshot"
|
||||
xmlns:ivy="antlib:org.apache.ivy.ant"
|
||||
xmlns:xooki="antlib:xooki">
|
||||
xmlns:xooki="antlib:xooki"
|
||||
xmlns:openpgp="antlib:org.apache.commons.openpgp.ant">
|
||||
<import file="build.xml"/>
|
||||
|
||||
<taskdef uri="antlib:xooki" file="${doc.src.dir}/xooki/antlib.xml" />
|
||||
|
|
@ -201,8 +202,67 @@
|
|||
</target>
|
||||
|
||||
<target name="release-version">
|
||||
<input message="please enter version: " addproperty="build.version"/>
|
||||
<input message="please enter status: (integration,milestone,release)" addproperty="status"/>
|
||||
<property name="build.version" value="${target.ivy.version}" />
|
||||
<echo>Setting version to ${build.version}</echo>
|
||||
<condition property="status" value="release">
|
||||
<matches pattern="^\d+\.\d+\.\d+$" string="${build.version}"/>
|
||||
</condition>
|
||||
<condition property="status" value="milestone">
|
||||
<matches pattern="^\d+\.\d+\.\d+-(alpha|beta|rc)\d+$" string="${build.version}"/>
|
||||
</condition>
|
||||
<property name="status" value="integration" />
|
||||
<echo>Setting status to ${status}</echo>
|
||||
</target>
|
||||
|
||||
<target name="sign" depends="init-ivy">
|
||||
<ivy:settings id="sign.settingsId" file="ivysettings-signtask.xml" />
|
||||
<ivy:cachepath organisation="org.apache.commons" settingsRef="sign.settingsId" transitive="false"
|
||||
module="commons-openpgp" revision="1.0-SNAPSHOT" inline="true" pathid="openpgp.classpath"/>
|
||||
<ivy:cachepath organisation="bouncycastle" settingsRef="sign.settingsId"
|
||||
module="bcprov-jdk16" revision="140" inline="true" pathid="bouncycastle.bcprov.classpath"/>
|
||||
|
||||
<!-- Didn't find the jdk1.6 bcpg dependency, using the jdk1.5 version instead -->
|
||||
<ivy:cachepath organisation="bouncycastle" settingsRef="sign.settingsId" transitive="false"
|
||||
module="bcpg-jdk15" revision="140" inline="true" pathid="bouncycastle.bcpg.classpath"/>
|
||||
|
||||
<property file="${user.home}/ivybuild.properties" />
|
||||
<input message="please enter your PGP password: " addproperty="pgp.password"/>
|
||||
<input message="please enter your PGP keyId: " addproperty="pgp.keyId"/>
|
||||
|
||||
<!--
|
||||
For some reason, if we use the openpgp:signer task here directly, the bouncycastle security
|
||||
provider cannot be loaded. If we launch it as a forked process everything works fine !?!
|
||||
-->
|
||||
<java classname="org.apache.tools.ant.launch.Launcher"
|
||||
fork="true">
|
||||
<classpath>
|
||||
<fileset dir="${ant.home}" includes="**/*.jar" />
|
||||
<path refid="bouncycastle.bcprov.classpath" />
|
||||
<path refid="bouncycastle.bcpg.classpath" />
|
||||
<path refid="openpgp.classpath" />
|
||||
</classpath>
|
||||
<arg line="-f build-release.xml" />
|
||||
<arg line="sign-internal" />
|
||||
<arg line="-Dpgp.password=${pgp.password}" />
|
||||
<arg line="-Dpgp.keyId=${pgp.keyId}" />
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<target name="sign-internal">
|
||||
<property file="build.properties" />
|
||||
<taskdef resource="org/apache/commons/openpgp/ant/antlib.xml" uri="antlib:org.apache.commons.openpgp.ant" />
|
||||
<openpgp:signer secring="${user.home}/.gnupg/secring.gpg"
|
||||
pubring="${user.home}/.gnupg/pubring.gpg"
|
||||
password="${pgp.password}"
|
||||
keyid="${pgp.keyId}"
|
||||
asciiarmor="true">
|
||||
<fileset dir="${distrib.dir}">
|
||||
<include name="**/*.pom"/>
|
||||
<include name="**/*.jar"/>
|
||||
<include name="**/*.zip"/>
|
||||
<include name="**/*.gz"/>
|
||||
</fileset>
|
||||
</openpgp:signer>
|
||||
</target>
|
||||
|
||||
<target name="prepare-snapshot"
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ ivy.minimum.javaversion=1.4
|
|||
debug.mode=on
|
||||
ivy.install.version=1.4.1
|
||||
|
||||
status=integration
|
||||
#status=integration
|
||||
|
||||
test.class.pattern = *Test
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ svn status
|
|||
If your working copy is clean, you can launch the release script. If it isn't, make sure to clean it properly. Sometimes you may need to call ant clean-all if you have started to work with ant builds. If you are confused about your working copy state, delete it and check it out again.
|
||||
<h3>8. Launch the release script</h3>
|
||||
<code>
|
||||
ant -Dbuild.version=2.0.0-beta1 -Dstatus=milestone -f build-release.xml release
|
||||
ant -f build-release.xml release
|
||||
</code>
|
||||
The status should be release only for final releases, and milestone for any other intermediate release.
|
||||
If anything is wrong, fix and go back to step 4.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
<!--
|
||||
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.
|
||||
-->
|
||||
<ivysettings>
|
||||
<settings defaultResolver="default" />
|
||||
<resolvers>
|
||||
<chain name="default">
|
||||
<ibiblio name="public" m2compatible="true" />
|
||||
<ibiblio name="snapshot" m2compatible="true" root="http://people.apache.org/repo/m2-snapshot-repository" />
|
||||
</chain>
|
||||
</resolvers>
|
||||
</ivysettings>
|
||||
|
|
@ -133,6 +133,7 @@ public abstract class IvyPostResolveTask extends IvyTask {
|
|||
resolve.setInline(true);
|
||||
resolve.setConf(conf);
|
||||
resolve.setResolveId(resolveId);
|
||||
resolve.setTransitive(isTransitive());
|
||||
resolve.execute();
|
||||
} else {
|
||||
Message.verbose("inline resolve already done for " + getOrganisation() + " "
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ public final class PomModuleDescriptorParser implements ModuleDescriptorParser {
|
|||
try {
|
||||
PomReader domReader = new PomReader(descriptorURL, res);
|
||||
domReader.setProperty("parent.version", domReader.getParentVersion());
|
||||
domReader.setProperty("project.parent.version", domReader.getParentVersion());
|
||||
|
||||
Map pomProperties = domReader.getPomProperties();
|
||||
for (Iterator iter = pomProperties.entrySet().iterator(); iter.hasNext();) {
|
||||
|
|
|
|||
|
|
@ -125,6 +125,11 @@ public class ApacheURLLister {
|
|||
}
|
||||
|
||||
text = text.trim();
|
||||
|
||||
if (href.startsWith("../")) {
|
||||
// we are only interested in sub-URLs, not parent URLs, so skip this one
|
||||
continue;
|
||||
}
|
||||
|
||||
// absolute href: convert to relative one
|
||||
if (href.startsWith("/")) {
|
||||
|
|
|
|||
|
|
@ -190,6 +190,20 @@ public class PomModuleDescriptorParserTest extends AbstractModuleDescriptorParse
|
|||
assertEquals("test", artifact[0].getName());
|
||||
}
|
||||
|
||||
public void testProjectParentVersion() throws Exception {
|
||||
ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(
|
||||
settings, getClass().getResource("test-project.parent.version.pom"), false);
|
||||
assertNotNull(md);
|
||||
|
||||
ModuleRevisionId mrid = ModuleRevisionId.newInstance("org.apache", "test", "1.0");
|
||||
assertEquals(mrid, md.getModuleRevisionId());
|
||||
|
||||
Artifact[] artifact = md.getArtifacts("master");
|
||||
assertEquals(1, artifact.length);
|
||||
assertEquals(mrid, artifact[0].getModuleRevisionId());
|
||||
assertEquals("test", artifact[0].getName());
|
||||
}
|
||||
|
||||
public void testDependencies() throws Exception {
|
||||
ModuleDescriptor md = PomModuleDescriptorParser.getInstance().parseDescriptor(
|
||||
settings, getClass().getResource("test-dependencies.pom"), false);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
<?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>
|
||||
<parent>
|
||||
<artifactId>test-parent</artifactId>
|
||||
<groupId>org.apache</groupId>
|
||||
<version>1.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>test</artifactId>
|
||||
<name>Test Module for Ivy M2 parsing</name>
|
||||
<version>${project.parent.version}</version>
|
||||
<url>http://ant.apache.org/ivy</url>
|
||||
<organization>
|
||||
<name>Apache</name>
|
||||
<url>http://www.apache.org/</url>
|
||||
</organization>
|
||||
</project>
|
||||
Loading…
Reference in New Issue