[tycho-extras] Fix build issues relating to PlexusConfiguration.

Roland Grunberg rgrunber at fedoraproject.org
Wed Feb 20 19:09:51 UTC 2013


commit da67dca98e10099edd1cad08f46fcf203ba74653
Author: Roland Grunberg <rgrunber at redhat.com>
Date:   Wed Feb 20 13:28:13 2013 -0500

    Fix build issues relating to PlexusConfiguration.

 tycho-extras-fix-build.patch |   38 ++++++++++++++++++++++++++++++++++++++
 tycho-extras.spec            |    7 ++++++-
 2 files changed, 44 insertions(+), 1 deletions(-)
---
diff --git a/tycho-extras-fix-build.patch b/tycho-extras-fix-build.patch
new file mode 100644
index 0000000..fb20f8b
--- /dev/null
+++ b/tycho-extras-fix-build.patch
@@ -0,0 +1,38 @@
+diff --git a/tycho-source-feature-plugin/src/main/java/org/eclipse/tycho/extras/sourcefeature/SourceFeatureMojo.java b/tycho-source-feature-plugin/src/main/java/org/eclipse/tycho/extras/sourcefeature/SourceFeatureMojo.java
+index 80d8f21..eb8396e 100644
+--- a/tycho-source-feature-plugin/src/main/java/org/eclipse/tycho/extras/sourcefeature/SourceFeatureMojo.java
++++ b/tycho-source-feature-plugin/src/main/java/org/eclipse/tycho/extras/sourcefeature/SourceFeatureMojo.java
+@@ -29,6 +29,7 @@ import org.apache.maven.project.MavenProjectHelper;
+ import org.codehaus.plexus.archiver.jar.JarArchiver;
+ import org.codehaus.plexus.archiver.util.DefaultFileSet;
+ import org.codehaus.plexus.configuration.PlexusConfiguration;
++import org.codehaus.plexus.configuration.PlexusConfigurationException;
+ import org.codehaus.plexus.logging.Logger;
+ import org.eclipse.sisu.equinox.EquinoxServiceFactory;
+ import org.eclipse.tycho.ArtifactKey;
+@@ -342,14 +343,18 @@ public class SourceFeatureMojo extends AbstractMojo {
+     }
+ 
+     private String getAttribute(PlexusConfiguration dom, String attrName) {
+-        String attr = dom.getAttribute(attrName);
+-        if (attr == null) {
+-            return null;
+-        }
+-        attr = attr.trim();
+-        if (attr.length() == 0) {
++        try {
++            String attr = dom.getAttribute(attrName);
++            if (attr == null) {
++                return null;
++            }
++            attr = attr.trim();
++            if (attr.length() == 0) {
++                return null;
++            }
++            return attr;
++        } catch (PlexusConfigurationException e) {
+             return null;
+         }
+-        return attr;
+     }
+ }
diff --git a/tycho-extras.spec b/tycho-extras.spec
index 0b8b59f..2af0574 100644
--- a/tycho-extras.spec
+++ b/tycho-extras.spec
@@ -10,7 +10,8 @@ Source0:        http://git.eclipse.org/c/tycho/org.eclipse.tycho.extras.git/snap
 # maven-properties-plugin is only needed for tests
 Patch0:         %{name}-no-maven-properties-plugin.patch
 Patch1:         %{name}-remove-core.patch
-Patch2:         %{name}-393686.patch
+Patch2:         %{name}-fix-build.patch
+Patch3:         %{name}-393686.patch
 
 BuildArch:      noarch
 
@@ -43,6 +44,7 @@ This package contains the API documentation for %{name}.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 # To run tests, we need :
@@ -88,6 +90,9 @@ cp -pr target/site/api*/* %{buildroot}%{_javadocdir}/%{name}
 %{_javadocdir}/%{name}
 
 %changelog
+* Wed Feb 20 2013 Roland Grunberg <rgrunber at redhat.com> - 0.16.0-4
+- Fix build issues relating to PlexusConfiguration.
+
 * Fri Feb 15 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.16.0-4
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 


More information about the scm-commits mailing list