[jboss-common-core] Upstream release 2.2.22.GA, upgrade to xmvn
Marek Goldmann
goldmann at fedoraproject.org
Tue Jul 1 09:17:03 UTC 2014
commit 8ea5377cbd3f7d1617451932408f7c6418047c3a
Author: Marek Goldmann <marek.goldmann at gmail.com>
Date: Tue Jul 1 11:17:03 2014 +0200
Upstream release 2.2.22.GA, upgrade to xmvn
.gitignore | 1 +
...s-common-core-2.2.22.GA-URLLister-removal.patch | 762 ++++++++++----------
jboss-common-core.spec | 46 +-
sources | 2 +-
4 files changed, 410 insertions(+), 401 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 16618aa..ea3d2c0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/jboss-common-core-2.2.18.GA.tar.xz
+/jboss-common-core-2.2.22.GA.tar.xz
diff --git a/jboss-common-core-2.2.18.GA-URLLister-removal.patch b/jboss-common-core-2.2.22.GA-URLLister-removal.patch
similarity index 89%
rename from jboss-common-core-2.2.18.GA-URLLister-removal.patch
rename to jboss-common-core-2.2.22.GA-URLLister-removal.patch
index c33bc55..2795204 100644
--- a/jboss-common-core-2.2.18.GA-URLLister-removal.patch
+++ b/jboss-common-core-2.2.22.GA-URLLister-removal.patch
@@ -1,7 +1,27 @@
-diff -Naur jboss-common-core-2.2.18.GA/pom.xml jboss-common-core-2.2.18.GA-work/pom.xml
---- jboss-common-core-2.2.18.GA/pom.xml 2011-08-12 11:49:38.000000000 -0400
-+++ jboss-common-core-2.2.18.GA-work/pom.xml 2011-09-20 07:34:07.560248732 -0400
-@@ -102,27 +102,11 @@
+From 36cfc148eb48bc06a9642e7b1ceec7ab32bf1942 Mon Sep 17 00:00:00 2001
+From: Marek Goldmann <marek.goldmann at gmail.com>
+Date: Tue, 1 Jul 2014 11:11:56 +0200
+Subject: [PATCH] URLLister removal patch
+
+---
+ pom.xml | 20 +--
+ .../java/org/jboss/net/protocol/URLLister.java | 89 -----------
+ .../java/org/jboss/net/protocol/URLListerBase.java | 97 ------------
+ .../org/jboss/net/protocol/URLListerFactory.java | 89 -----------
+ .../org/jboss/net/protocol/file/FileURLLister.java | 168 ---------------------
+ .../org/jboss/net/protocol/http/DavURLLister.java | 115 --------------
+ 6 files changed, 2 insertions(+), 576 deletions(-)
+ delete mode 100644 src/main/java/org/jboss/net/protocol/URLLister.java
+ delete mode 100644 src/main/java/org/jboss/net/protocol/URLListerBase.java
+ delete mode 100644 src/main/java/org/jboss/net/protocol/URLListerFactory.java
+ delete mode 100644 src/main/java/org/jboss/net/protocol/file/FileURLLister.java
+ delete mode 100644 src/main/java/org/jboss/net/protocol/http/DavURLLister.java
+
+diff --git a/pom.xml b/pom.xml
+index c0f3aa7..388b6db 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -103,27 +103,11 @@
</profiles>
<dependencies>
@@ -31,189 +51,107 @@ diff -Naur jboss-common-core-2.2.18.GA/pom.xml jboss-common-core-2.2.18.GA-work/
<scope>compile</scope>
</dependency>
-@@ -135,4 +119,4 @@
-
- </dependencies>
-
--</project>
-\ No newline at end of file
-+</project>
-diff -Naur jboss-common-core-2.2.18.GA/src/main/java/org/jboss/net/protocol/file/FileURLLister.java jboss-common-core-2.2.18.GA-work/src/main/java/org/jboss/net/protocol/file/FileURLLister.java
---- jboss-common-core-2.2.18.GA/src/main/java/org/jboss/net/protocol/file/FileURLLister.java 2008-03-31 13:55:30.000000000 -0400
-+++ jboss-common-core-2.2.18.GA-work/src/main/java/org/jboss/net/protocol/file/FileURLLister.java 1969-12-31 19:00:00.000000000 -0500
-@@ -1,168 +0,0 @@
+diff --git a/src/main/java/org/jboss/net/protocol/URLLister.java b/src/main/java/org/jboss/net/protocol/URLLister.java
+deleted file mode 100644
+index 8467cea..0000000
+--- a/src/main/java/org/jboss/net/protocol/URLLister.java
++++ /dev/null
+@@ -1,89 +0,0 @@
-/*
-- * JBoss, Home of Professional Open Source
-- * Copyright 2005, JBoss Inc., and individual contributors as indicated
-- * by the @authors tag. See the copyright.txt in the distribution for a
-- * full listing of individual contributors.
-- *
-- * This is free software; you can redistribute it and/or modify it
-- * under the terms of the GNU Lesser General Public License as
-- * published by the Free Software Foundation; either version 2.1 of
-- * the License, or (at your option) any later version.
-- *
-- * This software is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- * Lesser General Public License for more details.
-- *
-- * You should have received a copy of the GNU Lesser General Public
-- * License along with this software; if not, write to the Free
-- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-- */
--package org.jboss.net.protocol.file;
+- * JBoss, Home of Professional Open Source
+- * Copyright 2005, JBoss Inc., and individual contributors as indicated
+- * by the @authors tag. See the copyright.txt in the distribution for a
+- * full listing of individual contributors.
+- *
+- * This is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU Lesser General Public License as
+- * published by the Free Software Foundation; either version 2.1 of
+- * the License, or (at your option) any later version.
+- *
+- * This software is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- * Lesser General Public License for more details.
+- *
+- * You should have received a copy of the GNU Lesser General Public
+- * License along with this software; if not, write to the Free
+- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+- */
+-package org.jboss.net.protocol;
-
--import java.io.File;
--import java.io.FileNotFoundException;
--import java.io.FilenameFilter;
-import java.io.IOException;
--import java.net.MalformedURLException;
-import java.net.URL;
--import java.util.ArrayList;
-import java.util.Collection;
-
--import org.jboss.logging.Logger;
--import org.jboss.net.protocol.URLListerBase;
--
-/**
-- * FileURLLister
-- *
-- * @author jboynes at users.sf.net
-- * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
-- * @version $Revision: 2787 $
+- * Interface defining methods that can be used to list the contents of a URL
+- * collection irrespective of the protocol.
- */
- at SuppressWarnings("unchecked")
--public class FileURLLister extends URLListerBase
--{
-- /** The Logger */
-- private static final Logger log = Logger.getLogger(FileURLLister.class);
--
-- // Public --------------------------------------------------------
+-public interface URLLister {
+- /**
+- * List the members of the given collection URL that match the patterns
+- * supplied and, if it contains directory that contains NO dot in the name and
+- * scanNonDottedSubDirs is true, recursively finds URL in these directories.
+- * @param baseUrl the URL to list; must end in "/"
+- * @param patterns the patterns to match (separated by ',')
+- * @param scanNonDottedSubDirs enables recursive search for directories containing no dots
+- * @return a Collection of URLs that match
+- * @throws IOException if there was a problem getting the list
+- */
+- Collection listMembers(URL baseUrl, String patterns, boolean scanNonDottedSubDirs) throws IOException;
-
-- public Collection listMembers(URL baseUrl, URLFilter filter) throws IOException
-- {
-- return listMembers(baseUrl, filter, false);
-- }
+- /**
+- * List the members of the given collection URL that match the patterns
+- * supplied. Doesn't recursively list files contained in directories.
+- * @param baseUrl the URL to list; must end in "/"
+- * @param patterns the patterns to match (separated by ',')
+- * @return a Collection of URLs that match
+- * @throws IOException if there was a problem getting the list
+- */
+- Collection listMembers(URL baseUrl, String patterns) throws IOException;
-
-- public Collection<URL> listMembers(URL baseUrl, URLFilter filter, boolean scanNonDottedSubDirs) throws IOException
-- {
-- // Make sure this is a directory URL
-- String baseUrlString = baseUrl.toString();
-- if (!baseUrlString.endsWith("/"))
-- {
-- throw new IOException("Does not end with '/', not a directory url: " + baseUrlString);
-- }
--
-- // Verify the directory actually exists
-- File dir = new File(baseUrl.getPath());
-- if (!dir.isDirectory())
-- {
-- throw new FileNotFoundException("Not pointing to a directory, url: " + baseUrlString);
-- }
--
-- // The list of URLs to return
-- ArrayList<URL> resultList = new ArrayList<URL>();
+- /**
+- * List the members of the given collection that are accepted by the filter
+- * @param baseUrl the URL to list; must end in "/"
+- * @param filter a filter that is called to determine if a member should
+- * be returned
+- * @param scanNonDottedSubDirs enables recursive search for directories containing no dots
+- * @return a Collection of URLs that match
+- * @throws IOException if there was a problem getting the list
+- */
+- Collection listMembers(URL baseUrl, URLFilter filter, boolean scanNonDottedSubDirs) throws IOException;
-
-- // Do the actual job
-- listFiles(baseUrl, filter, scanNonDottedSubDirs, resultList);
--
-- // Done
-- return resultList;
-- }
--
-- // Private -------------------------------------------------------
--
- /**
-- * Starting from baseUrl, that should point to a directory, populate the
-- * resultList with the contents that pass the filter (in the form of URLs)
-- * and possibly recurse into subdris not containing a '.' in their name.
+- * List the members of the given collection that are accepted by the filter
+- * @param baseUrl the URL to list; must end in "/"
+- * @param filter a filter that is called to determine if a member should
+- * be returned
+- * @return a Collection of URLs that match
+- * @throws IOException if there was a problem getting the list
- */
-- private void listFiles(final URL baseUrl, final URLFilter filter, boolean scanNonDottedSubDirs, ArrayList<URL> resultList)
-- throws IOException
-- {
-- // List the files at the current dir level, using the provided filter
-- final File baseDir = new File(baseUrl.getPath());
-- String[] filenames = baseDir.list(new FilenameFilter()
-- {
-- public boolean accept(File dir, String name)
-- {
-- try
-- {
-- return filter.accept(baseUrl, name);
-- }
-- catch (Exception e)
-- {
-- log.debug("Unexpected exception filtering entry '" + name + "' in directory '" + baseDir + "'", e);
-- return true;
-- }
-- }
-- });
--
-- if (filenames == null)
-- {
-- // This happens only when baseDir not a directory (but this is already
-- // checked by the caller) or some unknown IOException happens internally
-- // (e.g. run out of file descriptors?). Unfortunately the File API
-- // doesn't provide a way to know.
-- throw new IOException("Could not list directory '" + baseDir + "', reason unknown");
-- }
-- else
-- {
-- String baseUrlString = baseUrl.toString();
--
-- for (int i = 0; i < filenames.length; i++)
-- {
-- String filename = filenames[i];
--
-- // Find out if this is a directory
-- File file = new File(baseDir, filename);
-- boolean isDir = file.isDirectory();
--
-- // The subUrl
-- URL subUrl = createURL(baseUrlString, filename, isDir);
--
-- // If scanning subdirs and we have a directory, not containing a '.' in
-- // the name, recurse into it. This is to allow recursing into grouping
-- // dirs like ./deploy/jms, ./deploy/management, etc., avoiding
-- // at the same time exploded packages, like .sar, .war, etc.
-- if (scanNonDottedSubDirs && isDir && (filename.indexOf('.') == -1))
-- {
-- // recurse into it
-- listFiles(subUrl, filter, scanNonDottedSubDirs, resultList);
-- }
-- else
-- {
-- // just add to the list
-- resultList.add(subUrl);
-- }
-- }
-- }
-- }
--
+- Collection listMembers(URL baseUrl, URLFilter filter) throws IOException;
+-
- /**
-- * Create a URL by concatenating the baseUrlString that should end at '/',
-- * the filename, and a trailing slash, if it points to a directory
+- * Interface defining a filter for listed members.
- */
-- private URL createURL(String baseUrlString, String filename, boolean isDirectory)
-- {
-- try
-- {
-- return new URL(baseUrlString + filename + (isDirectory ? "/" : ""));
-- }
-- catch (MalformedURLException e)
-- {
-- // shouldn't happen
-- throw new IllegalStateException();
-- }
+- public interface URLFilter {
+- /**
+- * Determine whether the supplied memberName should be accepted
+- * @param baseURL the URL of the collection
+- * @param memberName the member of the collection
+- * @return true to accept
+- */
+- boolean accept(URL baseURL, String memberName);
- }
--
-}
-diff -Naur jboss-common-core-2.2.18.GA/src/main/java/org/jboss/net/protocol/http/DavURLLister.java jboss-common-core-2.2.18.GA-work/src/main/java/org/jboss/net/protocol/http/DavURLLister.java
---- jboss-common-core-2.2.18.GA/src/main/java/org/jboss/net/protocol/http/DavURLLister.java 2008-03-31 13:55:30.000000000 -0400
-+++ jboss-common-core-2.2.18.GA-work/src/main/java/org/jboss/net/protocol/http/DavURLLister.java 1969-12-31 19:00:00.000000000 -0500
-@@ -1,115 +0,0 @@
+diff --git a/src/main/java/org/jboss/net/protocol/URLListerBase.java b/src/main/java/org/jboss/net/protocol/URLListerBase.java
+deleted file mode 100644
+index b9ed963..0000000
+--- a/src/main/java/org/jboss/net/protocol/URLListerBase.java
++++ /dev/null
+@@ -1,97 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
@@ -235,145 +173,26 @@ diff -Naur jboss-common-core-2.2.18.GA/src/main/java/org/jboss/net/protocol/http
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
--package org.jboss.net.protocol.http;
+-package org.jboss.net.protocol;
-
--import java.io.IOException;
--import java.net.MalformedURLException;
--import java.net.URL;
--import java.util.ArrayList;
+-import java.util.Arrays;
+-import java.util.HashSet;
-import java.util.Collection;
--import java.util.List;
--
--import org.apache.commons.httpclient.HttpException;
--import org.apache.commons.httpclient.HttpURL;
--import org.apache.webdav.lib.WebdavResource;
--import org.jboss.net.protocol.URLListerBase;
+-import java.util.StringTokenizer;
+-import java.net.URL;
+-import java.io.IOException;
-
+-/**
+- * Support class for URLLister's providing protocol independent functionality.
+- *
+- * @author Scott.Stark at jboss.org
+- * @version $Revision: 2787 $
+- */
- at SuppressWarnings("unchecked")
--public class DavURLLister extends URLListerBase
+-public abstract class URLListerBase implements URLLister
-{
-- public Collection listMembers (URL baseUrl, URLFilter filter) throws IOException
-- {
-- return listMembers (baseUrl, filter, false);
-- }
--
-- public Collection<URL> listMembers (URL baseUrl, URLFilter filter, boolean scanNonDottedSubDirs) throws IOException
-- {
-- WebdavResource resource = null;
-- try
-- {
-- resource = new WebdavResource (baseUrl.toString ());
-- WebdavResource[] resources = resource.listWebdavResources ();
-- List<URL> urls = new ArrayList<URL>(resources.length);
-- for (int i = 0; i < resources.length; i++)
-- {
-- WebdavResource member = resources[i];
-- HttpURL httpURL = member.getHttpURL ();
-- if (filter.accept (baseUrl, httpURL.getName ()))
-- {
-- String uri = httpURL.getURI();
-- if (member.isCollection ())
-- {
-- if (! uri.endsWith ("/"))
-- uri += "/";
--
-- // it is a directory: do we have to recursively list its content?
-- String path = httpURL.getPath();
-- if (scanNonDottedSubDirs && getFilePartFromUrl(path).indexOf (".") == -1)
-- {
-- URL subUrl = new URL (uri) ;
-- urls.addAll (listMembers (subUrl, filter, scanNonDottedSubDirs));
-- }
-- else
-- {
-- urls.add (new URL (uri));
-- }
-- }
-- else
-- {
-- urls.add (new URL (uri));
-- }
--
-- }
-- }
-- return urls;
-- } catch (HttpException e)
-- {
-- throw new IOException (e.getMessage ());
-- } catch (MalformedURLException e)
-- {
-- // should not happen
-- throw new IllegalStateException (e.getMessage ());
-- } finally
-- {
-- if (resource != null)
-- {
-- resource.close ();
-- }
-- }
-- }
--
-- protected static final String getFilePartFromUrl (String name)
-- {
-- int length = name.length ();
--
-- if (name.charAt (length - 1) == '/')
-- {
-- int start = name.lastIndexOf ("/", length - 2);
-- return name.substring (start, length -2);
-- }
-- else
-- {
-- int start = name.lastIndexOf ("/");
-- return name.substring (start);
-- }
-- }
--}
-diff -Naur jboss-common-core-2.2.18.GA/src/main/java/org/jboss/net/protocol/URLListerBase.java jboss-common-core-2.2.18.GA-work/src/main/java/org/jboss/net/protocol/URLListerBase.java
---- jboss-common-core-2.2.18.GA/src/main/java/org/jboss/net/protocol/URLListerBase.java 2008-03-31 13:55:30.000000000 -0400
-+++ jboss-common-core-2.2.18.GA-work/src/main/java/org/jboss/net/protocol/URLListerBase.java 1969-12-31 19:00:00.000000000 -0500
-@@ -1,97 +0,0 @@
--/*
-- * JBoss, Home of Professional Open Source
-- * Copyright 2005, JBoss Inc., and individual contributors as indicated
-- * by the @authors tag. See the copyright.txt in the distribution for a
-- * full listing of individual contributors.
-- *
-- * This is free software; you can redistribute it and/or modify it
-- * under the terms of the GNU Lesser General Public License as
-- * published by the Free Software Foundation; either version 2.1 of
-- * the License, or (at your option) any later version.
-- *
-- * This software is distributed in the hope that it will be useful,
-- * but WITHOUT ANY WARRANTY; without even the implied warranty of
-- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- * Lesser General Public License for more details.
-- *
-- * You should have received a copy of the GNU Lesser General Public
-- * License along with this software; if not, write to the Free
-- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-- */
--package org.jboss.net.protocol;
--
--import java.util.Arrays;
--import java.util.HashSet;
--import java.util.Collection;
--import java.util.StringTokenizer;
--import java.net.URL;
--import java.io.IOException;
--
--/**
-- * Support class for URLLister's providing protocol independent functionality.
-- *
-- * @author Scott.Stark at jboss.org
-- * @version $Revision: 2787 $
-- */
-- at SuppressWarnings("unchecked")
--public abstract class URLListerBase implements URLLister
--{
-- public Collection listMembers (URL baseUrl, String patterns,
-- boolean scanNonDottedSubDirs) throws IOException
+- public Collection listMembers (URL baseUrl, String patterns,
+- boolean scanNonDottedSubDirs) throws IOException
- {
- // @todo, externalize the separator?
- StringTokenizer tokens = new StringTokenizer (patterns, ",");
@@ -430,9 +249,11 @@ diff -Naur jboss-common-core-2.2.18.GA/src/main/java/org/jboss/net/protocol/URLL
- }
- };
-}
-diff -Naur jboss-common-core-2.2.18.GA/src/main/java/org/jboss/net/protocol/URLListerFactory.java jboss-common-core-2.2.18.GA-work/src/main/java/org/jboss/net/protocol/URLListerFactory.java
---- jboss-common-core-2.2.18.GA/src/main/java/org/jboss/net/protocol/URLListerFactory.java 2008-03-31 13:55:30.000000000 -0400
-+++ jboss-common-core-2.2.18.GA-work/src/main/java/org/jboss/net/protocol/URLListerFactory.java 1969-12-31 19:00:00.000000000 -0500
+diff --git a/src/main/java/org/jboss/net/protocol/URLListerFactory.java b/src/main/java/org/jboss/net/protocol/URLListerFactory.java
+deleted file mode 100644
+index edea79d..0000000
+--- a/src/main/java/org/jboss/net/protocol/URLListerFactory.java
++++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
@@ -523,10 +344,186 @@ diff -Naur jboss-common-core-2.2.18.GA/src/main/java/org/jboss/net/protocol/URLL
- classes.put(protocol, className);
- }
-}
-diff -Naur jboss-common-core-2.2.18.GA/src/main/java/org/jboss/net/protocol/URLLister.java jboss-common-core-2.2.18.GA-work/src/main/java/org/jboss/net/protocol/URLLister.java
---- jboss-common-core-2.2.18.GA/src/main/java/org/jboss/net/protocol/URLLister.java 2008-03-31 13:55:30.000000000 -0400
-+++ jboss-common-core-2.2.18.GA-work/src/main/java/org/jboss/net/protocol/URLLister.java 1969-12-31 19:00:00.000000000 -0500
-@@ -1,89 +0,0 @@
+diff --git a/src/main/java/org/jboss/net/protocol/file/FileURLLister.java b/src/main/java/org/jboss/net/protocol/file/FileURLLister.java
+deleted file mode 100644
+index b5296a8..0000000
+--- a/src/main/java/org/jboss/net/protocol/file/FileURLLister.java
++++ /dev/null
+@@ -1,168 +0,0 @@
+-/*
+- * JBoss, Home of Professional Open Source
+- * Copyright 2005, JBoss Inc., and individual contributors as indicated
+- * by the @authors tag. See the copyright.txt in the distribution for a
+- * full listing of individual contributors.
+- *
+- * This is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU Lesser General Public License as
+- * published by the Free Software Foundation; either version 2.1 of
+- * the License, or (at your option) any later version.
+- *
+- * This software is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- * Lesser General Public License for more details.
+- *
+- * You should have received a copy of the GNU Lesser General Public
+- * License along with this software; if not, write to the Free
+- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+- */
+-package org.jboss.net.protocol.file;
+-
+-import java.io.File;
+-import java.io.FileNotFoundException;
+-import java.io.FilenameFilter;
+-import java.io.IOException;
+-import java.net.MalformedURLException;
+-import java.net.URL;
+-import java.util.ArrayList;
+-import java.util.Collection;
+-
+-import org.jboss.logging.Logger;
+-import org.jboss.net.protocol.URLListerBase;
+-
+-/**
+- * FileURLLister
+- *
+- * @author jboynes at users.sf.net
+- * @author <a href="mailto:dimitris at jboss.org">Dimitris Andreadis</a>
+- * @version $Revision: 2787 $
+- */
+- at SuppressWarnings("unchecked")
+-public class FileURLLister extends URLListerBase
+-{
+- /** The Logger */
+- private static final Logger log = Logger.getLogger(FileURLLister.class);
+-
+- // Public --------------------------------------------------------
+-
+- public Collection listMembers(URL baseUrl, URLFilter filter) throws IOException
+- {
+- return listMembers(baseUrl, filter, false);
+- }
+-
+- public Collection<URL> listMembers(URL baseUrl, URLFilter filter, boolean scanNonDottedSubDirs) throws IOException
+- {
+- // Make sure this is a directory URL
+- String baseUrlString = baseUrl.toString();
+- if (!baseUrlString.endsWith("/"))
+- {
+- throw new IOException("Does not end with '/', not a directory url: " + baseUrlString);
+- }
+-
+- // Verify the directory actually exists
+- File dir = new File(baseUrl.getPath());
+- if (!dir.isDirectory())
+- {
+- throw new FileNotFoundException("Not pointing to a directory, url: " + baseUrlString);
+- }
+-
+- // The list of URLs to return
+- ArrayList<URL> resultList = new ArrayList<URL>();
+-
+- // Do the actual job
+- listFiles(baseUrl, filter, scanNonDottedSubDirs, resultList);
+-
+- // Done
+- return resultList;
+- }
+-
+- // Private -------------------------------------------------------
+-
+- /**
+- * Starting from baseUrl, that should point to a directory, populate the
+- * resultList with the contents that pass the filter (in the form of URLs)
+- * and possibly recurse into subdris not containing a '.' in their name.
+- */
+- private void listFiles(final URL baseUrl, final URLFilter filter, boolean scanNonDottedSubDirs, ArrayList<URL> resultList)
+- throws IOException
+- {
+- // List the files at the current dir level, using the provided filter
+- final File baseDir = new File(baseUrl.getPath());
+- String[] filenames = baseDir.list(new FilenameFilter()
+- {
+- public boolean accept(File dir, String name)
+- {
+- try
+- {
+- return filter.accept(baseUrl, name);
+- }
+- catch (Exception e)
+- {
+- log.debug("Unexpected exception filtering entry '" + name + "' in directory '" + baseDir + "'", e);
+- return true;
+- }
+- }
+- });
+-
+- if (filenames == null)
+- {
+- // This happens only when baseDir not a directory (but this is already
+- // checked by the caller) or some unknown IOException happens internally
+- // (e.g. run out of file descriptors?). Unfortunately the File API
+- // doesn't provide a way to know.
+- throw new IOException("Could not list directory '" + baseDir + "', reason unknown");
+- }
+- else
+- {
+- String baseUrlString = baseUrl.toString();
+-
+- for (int i = 0; i < filenames.length; i++)
+- {
+- String filename = filenames[i];
+-
+- // Find out if this is a directory
+- File file = new File(baseDir, filename);
+- boolean isDir = file.isDirectory();
+-
+- // The subUrl
+- URL subUrl = createURL(baseUrlString, filename, isDir);
+-
+- // If scanning subdirs and we have a directory, not containing a '.' in
+- // the name, recurse into it. This is to allow recursing into grouping
+- // dirs like ./deploy/jms, ./deploy/management, etc., avoiding
+- // at the same time exploded packages, like .sar, .war, etc.
+- if (scanNonDottedSubDirs && isDir && (filename.indexOf('.') == -1))
+- {
+- // recurse into it
+- listFiles(subUrl, filter, scanNonDottedSubDirs, resultList);
+- }
+- else
+- {
+- // just add to the list
+- resultList.add(subUrl);
+- }
+- }
+- }
+- }
+-
+- /**
+- * Create a URL by concatenating the baseUrlString that should end at '/',
+- * the filename, and a trailing slash, if it points to a directory
+- */
+- private URL createURL(String baseUrlString, String filename, boolean isDirectory)
+- {
+- try
+- {
+- return new URL(baseUrlString + filename + (isDirectory ? "/" : ""));
+- }
+- catch (MalformedURLException e)
+- {
+- // shouldn't happen
+- throw new IllegalStateException();
+- }
+- }
+-
+-}
+diff --git a/src/main/java/org/jboss/net/protocol/http/DavURLLister.java b/src/main/java/org/jboss/net/protocol/http/DavURLLister.java
+deleted file mode 100644
+index c0a3022..0000000
+--- a/src/main/java/org/jboss/net/protocol/http/DavURLLister.java
++++ /dev/null
+@@ -1,115 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
@@ -548,71 +545,100 @@ diff -Naur jboss-common-core-2.2.18.GA/src/main/java/org/jboss/net/protocol/URLL
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
--package org.jboss.net.protocol;
+-package org.jboss.net.protocol.http;
-
-import java.io.IOException;
+-import java.net.MalformedURLException;
-import java.net.URL;
+-import java.util.ArrayList;
-import java.util.Collection;
+-import java.util.List;
-
--/**
-- * Interface defining methods that can be used to list the contents of a URL
-- * collection irrespective of the protocol.
-- */
-- at SuppressWarnings("unchecked")
--public interface URLLister {
-- /**
-- * List the members of the given collection URL that match the patterns
-- * supplied and, if it contains directory that contains NO dot in the name and
-- * scanNonDottedSubDirs is true, recursively finds URL in these directories.
-- * @param baseUrl the URL to list; must end in "/"
-- * @param patterns the patterns to match (separated by ',')
-- * @param scanNonDottedSubDirs enables recursive search for directories containing no dots
-- * @return a Collection of URLs that match
-- * @throws IOException if there was a problem getting the list
-- */
-- Collection listMembers(URL baseUrl, String patterns, boolean scanNonDottedSubDirs) throws IOException;
--
-- /**
-- * List the members of the given collection URL that match the patterns
-- * supplied. Doesn't recursively list files contained in directories.
-- * @param baseUrl the URL to list; must end in "/"
-- * @param patterns the patterns to match (separated by ',')
-- * @return a Collection of URLs that match
-- * @throws IOException if there was a problem getting the list
-- */
-- Collection listMembers(URL baseUrl, String patterns) throws IOException;
+-import org.apache.commons.httpclient.HttpException;
+-import org.apache.commons.httpclient.HttpURL;
+-import org.apache.webdav.lib.WebdavResource;
+-import org.jboss.net.protocol.URLListerBase;
-
-- /**
-- * List the members of the given collection that are accepted by the filter
-- * @param baseUrl the URL to list; must end in "/"
-- * @param filter a filter that is called to determine if a member should
-- * be returned
-- * @param scanNonDottedSubDirs enables recursive search for directories containing no dots
-- * @return a Collection of URLs that match
-- * @throws IOException if there was a problem getting the list
-- */
-- Collection listMembers(URL baseUrl, URLFilter filter, boolean scanNonDottedSubDirs) throws IOException;
+- at SuppressWarnings("unchecked")
+-public class DavURLLister extends URLListerBase
+-{
+- public Collection listMembers (URL baseUrl, URLFilter filter) throws IOException
+- {
+- return listMembers (baseUrl, filter, false);
+- }
-
-- /**
-- * List the members of the given collection that are accepted by the filter
-- * @param baseUrl the URL to list; must end in "/"
-- * @param filter a filter that is called to determine if a member should
-- * be returned
-- * @return a Collection of URLs that match
-- * @throws IOException if there was a problem getting the list
-- */
-- Collection listMembers(URL baseUrl, URLFilter filter) throws IOException;
+- public Collection<URL> listMembers (URL baseUrl, URLFilter filter, boolean scanNonDottedSubDirs) throws IOException
+- {
+- WebdavResource resource = null;
+- try
+- {
+- resource = new WebdavResource (baseUrl.toString ());
+- WebdavResource[] resources = resource.listWebdavResources ();
+- List<URL> urls = new ArrayList<URL>(resources.length);
+- for (int i = 0; i < resources.length; i++)
+- {
+- WebdavResource member = resources[i];
+- HttpURL httpURL = member.getHttpURL ();
+- if (filter.accept (baseUrl, httpURL.getName ()))
+- {
+- String uri = httpURL.getURI();
+- if (member.isCollection ())
+- {
+- if (! uri.endsWith ("/"))
+- uri += "/";
-
-- /**
-- * Interface defining a filter for listed members.
-- */
-- public interface URLFilter {
-- /**
-- * Determine whether the supplied memberName should be accepted
-- * @param baseURL the URL of the collection
-- * @param memberName the member of the collection
-- * @return true to accept
-- */
-- boolean accept(URL baseURL, String memberName);
+- // it is a directory: do we have to recursively list its content?
+- String path = httpURL.getPath();
+- if (scanNonDottedSubDirs && getFilePartFromUrl(path).indexOf (".") == -1)
+- {
+- URL subUrl = new URL (uri) ;
+- urls.addAll (listMembers (subUrl, filter, scanNonDottedSubDirs));
+- }
+- else
+- {
+- urls.add (new URL (uri));
+- }
+- }
+- else
+- {
+- urls.add (new URL (uri));
+- }
+-
+- }
+- }
+- return urls;
+- } catch (HttpException e)
+- {
+- throw new IOException (e.getMessage ());
+- } catch (MalformedURLException e)
+- {
+- // should not happen
+- throw new IllegalStateException (e.getMessage ());
+- } finally
+- {
+- if (resource != null)
+- {
+- resource.close ();
+- }
+- }
+- }
+-
+- protected static final String getFilePartFromUrl (String name)
+- {
+- int length = name.length ();
+-
+- if (name.charAt (length - 1) == '/')
+- {
+- int start = name.lastIndexOf ("/", length - 2);
+- return name.substring (start, length -2);
+- }
+- else
+- {
+- int start = name.lastIndexOf ("/");
+- return name.substring (start);
+- }
- }
-}
+--
+1.9.3
+
diff --git a/jboss-common-core.spec b/jboss-common-core.spec
index 8069e1c..dd21d70 100644
--- a/jboss-common-core.spec
+++ b/jboss-common-core.spec
@@ -2,22 +2,21 @@
%global namedversion %{version}%{?namedreltag}
Name: jboss-common-core
-Version: 2.2.18
-Release: 12%{?dist}
+Version: 2.2.22
+Release: 1%{?dist}
Summary: JBoss Common Classes
Group: Development/Libraries
License: LGPLv2+ and ASL 1.1
URL: http://www.jboss.org
-# svn export http://anonsvn.jboss.org/repos/common/common-core/tags/2.2.18.GA/ jboss-common-core-2.2.18.GA
-# tar cafJ jboss-common-core-2.2.18.GA.tar.xz jboss-common-core-2.2.18.GA
+# svn export http://anonsvn.jboss.org/repos/common/common-core/tags/2.2.22.GA/ jboss-common-core-2.2.22.GA
+# tar cafJ jboss-common-core-2.2.22.GA.tar.xz jboss-common-core-2.2.22.GA
Source0: %{name}-%{namedversion}.tar.xz
# The URLLister* family of classes was removed because the apache-slide:webdavlib is a dead project and the classes aren't used in JBoss AS 7 at all.
Patch0: %{name}-%{namedversion}-URLLister-removal.patch
BuildArch: noarch
-BuildRequires: jpackage-utils
BuildRequires: java-devel
BuildRequires: maven-local
BuildRequires: maven-compiler-plugin
@@ -34,21 +33,17 @@ BuildRequires: maven-ear-plugin
BuildRequires: maven-eclipse-plugin
BuildRequires: maven-ejb-plugin
BuildRequires: maven-surefire-plugin
-BuildRequires: maven-surefire-provider-junit4
+BuildRequires: maven-surefire-provider-junit
BuildRequires: jboss-parent
-BuildRequires: junit4
+BuildRequires: junit
BuildRequires: jboss-logging
-Requires: jboss-logging
-Requires: jpackage-utils
-
%description
JBoss Common Core Utility classes
%package javadoc
Summary: Javadocs for %{name}
Group: Documentation
-Requires: jpackage-utils
%description javadoc
This package contains the API documentation for %{name}.
@@ -63,33 +58,20 @@ rm -rf projectSet.psf .settings/ .project .classpath
# Some failed tests
# Failed tests: testJavaLangEditors(org.jboss.test.util.test.propertyeditor.PropertyEditorsUnitTestCase):
# PropertyEditor: org.jboss.util.propertyeditor.BooleanEditor, getAsText() == expectedStringOutput ' expected:<null> but was:<null>
-mvn-rpmbuild -Dmaven.test.skip=true install javadoc:aggregate
+%mvn_build -f
%install
-# JAR
-install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
-install -pm 644 target/%{name}-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
-
-# POM
-install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
-install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
-
-# DEPMAP
-%add_maven_depmap JPP-%{name}.pom %{name}.jar
+%mvn_install
-# APIDOCS
-install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-cp -rp target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+%files -f .mfiles
+%dir %{_javadir}/%{name}
-%files
-%{_mavenpomdir}/*
-%{_mavendepmapfragdir}/*
-%{_javadir}/*
-
-%files javadoc
-%{_javadocdir}/%{name}
+%files javadoc -f .mfiles-javadoc
%changelog
+* Tue Jul 01 2014 Marek Goldmann <mgoldman at redhat.com> - 2.2.22-1
+- Upstream release 2.2.22.GA, upgrade to xmvn
+
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.2.18-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
diff --git a/sources b/sources
index 555516a..eb7937a 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-40fb1764d467dc022441e24918ef8a83 jboss-common-core-2.2.18.GA.tar.xz
+16aa7359a41d2224874d575444b6dd5f jboss-common-core-2.2.22.GA.tar.xz
More information about the scm-commits
mailing list