Author: maartenc
Date: Wed Oct 29 15:12:24 2008
New Revision: 709029
URL: http://svn.apache.org/viewvc?rev=709029&view=rev
Log:
Merged changes from 2.0.0-rc2 branch back into 2.0.x branch.
Added:
ant/ivy/core/branches/2.0.x/ivysettings-signtask.xml
- copied unchanged from r709027,
ant/ivy/core/branches/2.0.0-rc2/ivysettings-signtask.xml
ant/ivy/core/branches/2.0.x/test/java/org/apache/ivy/plugins/parser/m2/test-project.parent.version.pom
- copied unchanged from r709027,
ant/ivy/core/branches/2.0.0-rc2/test/java/org/apache/ivy/plugins/parser/m2/test-project.parent.version.pom
Modified:
ant/ivy/core/branches/2.0.x/ (props changed)
ant/ivy/core/branches/2.0.x/CHANGES.txt
ant/ivy/core/branches/2.0.x/build-release.xml
ant/ivy/core/branches/2.0.x/build.properties
ant/ivy/core/branches/2.0.x/doc/dev/makerelease.html
ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/ant/IvyPostResolveTask.java
ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/util/url/ApacheURLLister.java
ant/ivy/core/branches/2.0.x/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
Propchange: ant/ivy/core/branches/2.0.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Oct 29 15:12:24 2008
@@ -1 +1,2 @@
+/ant/ivy/core/branches/2.0.0-rc2:707177-709027
/ant/ivy/core/trunk:695737,696014-696031,696442,698318-706770
Modified: ant/ivy/core/branches/2.0.x/CHANGES.txt
URL:
http://svn.apache.org/viewvc/ant/ivy/core/branches/2.0.x/CHANGES.txt?rev=709029&r1=709028&r2=709029&view=diff
==============================================================================
--- ant/ivy/core/branches/2.0.x/CHANGES.txt (original)
+++ ant/ivy/core/branches/2.0.x/CHANGES.txt Wed Oct 29 15:12:24 2008
@@ -81,7 +81,7 @@
Patrick Woodworth
Jaroslaw Wypychowski
- 2.0.x branch
+ 2.0.0-rc2
=====================================
- DOCUMENTATION: Filesystem resolver: talks about "patterns" but does not
mention these must become absolute file paths (IVY-910)
@@ -117,6 +117,8 @@
- 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
=====================================
Modified: ant/ivy/core/branches/2.0.x/build-release.xml
URL:
http://svn.apache.org/viewvc/ant/ivy/core/branches/2.0.x/build-release.xml?rev=709029&r1=709028&r2=709029&view=diff
==============================================================================
--- ant/ivy/core/branches/2.0.x/build-release.xml (original)
+++ ant/ivy/core/branches/2.0.x/build-release.xml Wed Oct 29 15:12:24 2008
@@ -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"
Modified: ant/ivy/core/branches/2.0.x/build.properties
URL:
http://svn.apache.org/viewvc/ant/ivy/core/branches/2.0.x/build.properties?rev=709029&r1=709028&r2=709029&view=diff
==============================================================================
--- ant/ivy/core/branches/2.0.x/build.properties (original)
+++ ant/ivy/core/branches/2.0.x/build.properties Wed Oct 29 15:12:24 2008
@@ -45,7 +45,7 @@
debug.mode=on
ivy.install.version=1.4.1
-status=integration
+#status=integration
test.class.pattern = *Test
Modified: ant/ivy/core/branches/2.0.x/doc/dev/makerelease.html
URL:
http://svn.apache.org/viewvc/ant/ivy/core/branches/2.0.x/doc/dev/makerelease.html?rev=709029&r1=709028&r2=709029&view=diff
==============================================================================
--- ant/ivy/core/branches/2.0.x/doc/dev/makerelease.html (original)
+++ ant/ivy/core/branches/2.0.x/doc/dev/makerelease.html Wed Oct 29 15:12:24
2008
@@ -94,7 +94,7 @@
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.
Modified:
ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/ant/IvyPostResolveTask.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/ant/IvyPostResolveTask.java?rev=709029&r1=709028&r2=709029&view=diff
==============================================================================
---
ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/ant/IvyPostResolveTask.java
(original)
+++
ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/ant/IvyPostResolveTask.java
Wed Oct 29 15:12:24 2008
@@ -133,6 +133,7 @@
resolve.setInline(true);
resolve.setConf(conf);
resolve.setResolveId(resolveId);
+ resolve.setTransitive(isTransitive());
resolve.execute();
} else {
Message.verbose("inline resolve already done for " +
getOrganisation() + " "
Modified:
ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java?rev=709029&r1=709028&r2=709029&view=diff
==============================================================================
---
ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
(original)
+++
ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParser.java
Wed Oct 29 15:12:24 2008
@@ -114,6 +114,7 @@
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();) {
Modified:
ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/util/url/ApacheURLLister.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/util/url/ApacheURLLister.java?rev=709029&r1=709028&r2=709029&view=diff
==============================================================================
---
ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/util/url/ApacheURLLister.java
(original)
+++
ant/ivy/core/branches/2.0.x/src/java/org/apache/ivy/util/url/ApacheURLLister.java
Wed Oct 29 15:12:24 2008
@@ -125,6 +125,11 @@
}
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("/")) {
Modified:
ant/ivy/core/branches/2.0.x/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/branches/2.0.x/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java?rev=709029&r1=709028&r2=709029&view=diff
==============================================================================
---
ant/ivy/core/branches/2.0.x/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
(original)
+++
ant/ivy/core/branches/2.0.x/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
Wed Oct 29 15:12:24 2008
@@ -190,6 +190,20 @@
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);