[jboss-common-core] Initial import.
Marek Goldmann
goldmann at fedoraproject.org
Mon Oct 10 10:48:02 UTC 2011
commit 4058b64297bc0fb6f8e25f8686dc4c3c2d0a8e05
Author: Marek Goldmann <goldmann at fedoraproject.org>
Date: Mon Oct 10 06:47:48 2011 -0400
Initial import.
.gitignore | 1 +
...s-common-core-2.2.18.GA-URLLister-removal.patch | 618 ++++++++++++++++++++
jboss-common-core.spec | 96 +++
sources | 1 +
4 files changed, 716 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..16618aa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/jboss-common-core-2.2.18.GA.tar.xz
diff --git a/jboss-common-core-2.2.18.GA-URLLister-removal.patch b/jboss-common-core-2.2.18.GA-URLLister-removal.patch
new file mode 100644
index 0000000..c33bc55
--- /dev/null
+++ b/jboss-common-core-2.2.18.GA-URLLister-removal.patch
@@ -0,0 +1,618 @@
+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 @@
+ </profiles>
+
+ <dependencies>
+-
+- <dependency>
+- <groupId>commons-httpclient</groupId>
+- <artifactId>commons-httpclient</artifactId>
+- <version>2.0.2</version>
+- <scope>compile</scope>
+- <optional>true</optional> <!-- org.jboss.net.protocol.http.DavURLLister -->
+- </dependency>
+-
+- <dependency>
+- <groupId>slide</groupId>
+- <artifactId>webdavlib</artifactId>
+- <version>2.0</version>
+- <scope>compile</scope>
+- <optional>true</optional> <!-- org.jboss.net.protocol.http.DavURLLister -->
+- </dependency>
+
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+- <artifactId>jboss-logging-spi</artifactId>
+- <version>2.1.0.GA</version>
++ <artifactId>jboss-logging</artifactId>
++ <version>3.0.0.GA</version>
+ <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 @@
+-/*
+- * 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 -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 @@
+-/*
+- * 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.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;
+-
+-import org.apache.commons.httpclient.HttpException;
+-import org.apache.commons.httpclient.HttpURL;
+-import org.apache.webdav.lib.WebdavResource;
+-import org.jboss.net.protocol.URLListerBase;
+-
+- at SuppressWarnings("unchecked")
+-public class DavURLLister extends URLListerBase
+-{
+- 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
+- {
+- // @todo, externalize the separator?
+- StringTokenizer tokens = new StringTokenizer (patterns, ",");
+- String[] members = new String[tokens.countTokens ()];
+- for (int i=0; tokens.hasMoreTokens (); i++)
+- {
+- String token = tokens.nextToken ();
+- // Trim leading/trailing spaces as its unlikely they are meaningful
+- members[i] = token.trim();
+- }
+- URLFilter filter = new URLFilterImpl (members);
+- return listMembers (baseUrl, filter, scanNonDottedSubDirs);
+- }
+-
+- public Collection listMembers (URL baseUrl, String patterns) throws IOException
+- {
+- return listMembers (baseUrl, patterns, false);
+- }
+-
+- /**
+- * Inner class representing Filter criteria to be applied to the members
+- * of the returned Collection
+- */
+- public static class URLFilterImpl implements URLFilter
+- {
+- protected boolean allowAll;
+- protected HashSet constants;
+-
+- public URLFilterImpl (String[] patterns)
+- {
+- constants = new HashSet (Arrays.asList (patterns));
+- allowAll = constants.contains ("*");
+- }
+-
+- public boolean accept (URL baseUrl, String name)
+- {
+- if (allowAll)
+- {
+- return true;
+- }
+- if (constants.contains (name))
+- {
+- return true;
+- }
+- return false;
+- }
+- }
+-
+- protected static final URLFilter acceptAllFilter = new URLFilter ()
+- {
+- public boolean accept (URL baseURL, String memberName)
+- {
+- return true;
+- }
+- };
+-}
+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
+@@ -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;
+-
+-import java.net.URL;
+-import java.net.MalformedURLException;
+-import java.util.HashMap;
+-
+- at SuppressWarnings("unchecked")
+-public class URLListerFactory {
+- private static HashMap defaultClasses = new HashMap();
+- static {
+- defaultClasses.put("file", "org.jboss.net.protocol.file.FileURLLister");
+- defaultClasses.put("http", "org.jboss.net.protocol.http.DavURLLister");
+- defaultClasses.put("https", "org.jboss.net.protocol.http.DavURLLister");
+- }
+-
+- private HashMap classes;
+-
+- /**
+- * Create a URLLister with default listers defined for file and http
+- * protocols.
+- */
+- public URLListerFactory() {
+- classes = (HashMap) defaultClasses.clone();
+- }
+-
+- /**
+- * Create a URL lister using the protocol from the URL
+- * @param url the url defining the protocol
+- * @return a URLLister capable of listing URLs of that protocol
+- * @throws MalformedURLException if no lister could be found for the protocol
+- */
+- public URLLister createURLLister(URL url) throws MalformedURLException {
+- return createURLLister(url.getProtocol());
+- }
+-
+- /**
+- * Create a URL lister for the supplied protocol
+- * @param protocol the protocol
+- * @return a URLLister capable of listing URLs of that protocol
+- * @throws MalformedURLException if no lister could be found for the protocol
+- */
+- public URLLister createURLLister(String protocol) throws MalformedURLException {
+- try {
+- String className = (String) classes.get(protocol);
+- if (className == null) {
+- throw new MalformedURLException("No lister class defined for protocol "+protocol);
+- }
+-
+- Class<?> clazz = Thread.currentThread().getContextClassLoader().loadClass(className);
+- return (URLLister) clazz.newInstance();
+- } catch (ClassNotFoundException e) {
+- throw new MalformedURLException(e.getMessage());
+- } catch (InstantiationException e) {
+- throw new MalformedURLException(e.getMessage());
+- } catch (IllegalAccessException e) {
+- throw new MalformedURLException(e.getMessage());
+- }
+- }
+-
+- /**
+- * Register a URLLister class for a given protocol
+- * @param protocol the protocol this class will handle
+- * @param className the URLLister implementation to instanciate
+- */
+- public void registerListener(String protocol, String className) {
+- 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 @@
+-/*
+- * 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.IOException;
+-import java.net.URL;
+-import java.util.Collection;
+-
+-/**
+- * 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;
+-
+- /**
+- * 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;
+-
+- /**
+- * 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;
+-
+- /**
+- * 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);
+- }
+-}
diff --git a/jboss-common-core.spec b/jboss-common-core.spec
new file mode 100644
index 0000000..f046005
--- /dev/null
+++ b/jboss-common-core.spec
@@ -0,0 +1,96 @@
+%global namedreltag .GA
+%global namedversion %{version}%{?namedreltag}
+
+Name: jboss-common-core
+Version: 2.2.18
+Release: 2%{?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
+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
+BuildRequires: maven-compiler-plugin
+BuildRequires: maven-install-plugin
+BuildRequires: maven-jar-plugin
+BuildRequires: maven-javadoc-plugin
+BuildRequires: maven-release-plugin
+BuildRequires: maven-resources-plugin
+BuildRequires: maven-surefire-plugin
+BuildRequires: maven-surefire-provider-junit4
+BuildRequires: jboss-parent
+BuildRequires: junit4
+BuildRequires: jboss-logging
+
+Requires: jbosss-logging
+Requires: jpackage-utils
+Requires: java
+
+%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}.
+
+%prep
+%setup -q -n %{name}-%{namedversion}
+%patch0 -p1
+
+rm -rf projectSet.psf .settings/ .project .classpath
+
+%build
+# 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
+
+%install
+# JAR
+install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/jboss
+install -pm 644 target/%{name}-%{namedversion}.jar $RPM_BUILD_ROOT%{_javadir}/jboss/%{name}.jar
+
+# POM
+install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir}
+install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.jboss-%{name}.pom
+
+# DEPMAP
+%add_maven_depmap JPP.jboss-%{name}.pom jboss/%{name}.jar
+
+# APIDOCS
+install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+cp -rp target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
+
+%files
+%{_mavenpomdir}/*
+%{_mavendepmapfragdir}/*
+%{_javadir}/*
+
+%files javadoc
+%{_javadocdir}/%{name}
+
+%changelog
+* Sun Oct 02 2011 Marek Goldmann <mgoldman at redhat.com> 2.2.18-2
+- Another license field fix
+
+* Tue Sep 20 2011 Marek Goldmann <mgoldman at redhat.com> 2.2.18-1
+- Upstream release 2.2.18
+- License field fix
+
+* Mon Aug 01 2011 Marek Goldmann <mgoldman at redhat.com> 2.2.17-1
+- Initial packaging
+
diff --git a/sources b/sources
index e69de29..555516a 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+40fb1764d467dc022441e24918ef8a83 jboss-common-core-2.2.18.GA.tar.xz
More information about the scm-commits
mailing list