rpms/netbeans-resolver/devel import.log, NONE, 1.1 netbeans-resolver-6.1.patch, NONE, 1.1 netbeans-resolver.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Victor G. Vasilyev victorv at fedoraproject.org
Fri Sep 5 17:25:03 UTC 2008


Author: victorv

Update of /cvs/pkgs/rpms/netbeans-resolver/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv21470/devel

Modified Files:
	.cvsignore sources 
Added Files:
	import.log netbeans-resolver-6.1.patch netbeans-resolver.spec 
Log Message:
Initial version



--- NEW FILE import.log ---
netbeans-resolver-6_1-5_fc10:HEAD:netbeans-resolver-6.1-5.fc10.src.rpm:1220635445

netbeans-resolver-6.1.patch:

--- NEW FILE netbeans-resolver-6.1.patch ---
diff -Nur xml-commons-resolver-1.1/resolver.xml xml-commons-resolver-1.1.new/resolver.xml
--- xml-commons-resolver-1.1/resolver.xml	2003-11-04 21:56:18.000000000 +0300
+++ xml-commons-resolver-1.1.new/resolver.xml	2008-07-12 01:20:42.000000000 +0400
@@ -83,7 +83,7 @@
 
    <echo message="Compiling..." />
 
-   <javac srcdir="${src.dir}" destdir="${build.classes.dir}">
+   <javac srcdir="${src.dir}" destdir="${build.classes.dir}" source="1.4" debug="on">
      <!-- <classpath> not needed since Ant already supplies these Sep-03 -sc -->
      <include name="${resolver.subdir}/*.java"/>
      <include name="${resolver.subdir}/helpers/*.java"/>
diff -Nur xml-commons-resolver-1.1/src/org/apache/xml/resolver/Catalog.java xml-commons-resolver-1.1.new/src/org/apache/xml/resolver/Catalog.java
--- xml-commons-resolver-1.1/src/org/apache/xml/resolver/Catalog.java	2003-11-04 21:56:16.000000000 +0300
+++ xml-commons-resolver-1.1.new/src/org/apache/xml/resolver/Catalog.java	2008-07-12 01:38:28.000000000 +0400
@@ -64,6 +64,7 @@
 import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.Vector;
+import java.util.Iterator;
 import java.net.URL;
 import java.net.MalformedURLException;
 import org.apache.xml.resolver.CatalogManager;
@@ -1164,7 +1165,22 @@
     }
   }
 
-
+  /**
+   * Return all registered public IDs.
+   */
+  public Iterator getPublicIDs() {
+      Vector v = new Vector();
+      Enumeration enum = catalogEntries.elements();
+
+      while (enum.hasMoreElements()) {
+        CatalogEntry e = (CatalogEntry) enum.nextElement();
+        if (e.getEntryType() == PUBLIC) {
+            v.add(e.getEntryArg(0));
+        }
+      }
+      return v.iterator();
+  }
+
   /**
    * Return the applicable DOCTYPE system identifier.
    *
diff -Nur xml-commons-resolver-1.1/src/org/apache/xml/resolver/CatalogManager.java xml-commons-resolver-1.1.new/src/org/apache/xml/resolver/CatalogManager.java
--- xml-commons-resolver-1.1/src/org/apache/xml/resolver/CatalogManager.java	2003-11-04 21:56:16.000000000 +0300
+++ xml-commons-resolver-1.1.new/src/org/apache/xml/resolver/CatalogManager.java	2008-07-12 01:47:35.000000000 +0400
@@ -249,7 +249,11 @@
     // to avoid it.
   }
 
-  /** Constructor that specifies an explicit property file. */
+  /**
+   * Constructor that specifies an explicit property file.
+   * @param propertyFile path to poperty file (e.g. com/resources/CatalogManager).
+   * <code>null</code> means that no property file is consulted at all.
+   */
   public CatalogManager(String propertyFile) {
     this.propertyFile = propertyFile;
 
@@ -276,13 +280,14 @@
    * resources from it.
    */
   private synchronized void readProperties() {
+    if (propertyFile == null) return;
     try {
       propertyFileURI = CatalogManager.class.getResource("/"+propertyFile);
       InputStream in =
 	CatalogManager.class.getResourceAsStream("/"+propertyFile);
       if (in==null) {
 	if (!ignoreMissingProperties) {
-	  System.err.println("Cannot find "+propertyFile);
+	  debug.message(2, "Cannot find "+propertyFile);
 	  // there's no reason to give this warning more than once
 	  ignoreMissingProperties = true;
 	}
diff -Nur xml-commons-resolver-1.1/src/org/apache/xml/resolver/tools/CatalogResolver.java xml-commons-resolver-1.1.new/src/org/apache/xml/resolver/tools/CatalogResolver.java
--- xml-commons-resolver-1.1/src/org/apache/xml/resolver/tools/CatalogResolver.java	2003-11-04 21:56:16.000000000 +0300
+++ xml-commons-resolver-1.1.new/src/org/apache/xml/resolver/tools/CatalogResolver.java	2008-07-12 02:34:22.000000000 +0400
@@ -223,30 +223,9 @@
     String resolved = getResolvedEntity(publicId, systemId);
 
     if (resolved != null) {
-      try {
 	InputSource iSource = new InputSource(resolved);
 	iSource.setPublicId(publicId);
-
-	// Ideally this method would not attempt to open the
-	// InputStream, but there is a bug (in Xerces, at least)
-	// that causes the parser to mistakenly open the wrong
-	// system identifier if the returned InputSource does
-	// not have a byteStream.
-	//
-	// It could be argued that we still shouldn't do this here,
-	// but since the purpose of calling the entityResolver is
-	// almost certainly to open the input stream, it seems to
-	// do little harm.
-	//
-	URL url = new URL(resolved);
-	InputStream iStream = url.openStream();
-	iSource.setByteStream(iStream);
-
 	return iSource;
-      } catch (Exception e) {
-	catalogManager.debug.message(1, "Failed to create InputSource", resolved);
-	return null;
-      }
     }
 
     return null;


--- NEW FILE netbeans-resolver.spec ---
%define patched_resolver_ver 1.1
%define patched_resolver xml-commons-resolver-%{patched_resolver_ver}

Name:    netbeans-resolver
Version: 6.1
Release: 5%{?dist}
Summary: Resolver subproject of xml-commons patched for NetBeans

Group:   Development/Libraries
License: ASL 1.1
URL:     http://xml.apache.org/commons/

Source0: http://www.apache.org/dist/xml/commons/%{patched_resolver}.zip

# see http://hg.netbeans._org/main/file/721f72486327/o.apache.xml.resolver/external/readme.txt
Patch0: %{name}-%{version}.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch

BuildRequires: java-devel >= 1:1.6.0
BuildRequires: jpackage-utils
BuildRequires: ant
BuildRequires: dos2unix

Requires: jpackage-utils
Requires: java >= 1:1.6.0

%description
Resolver subproject of xml-commons, version %{patched_resolver_ver} with 
a patch for NetBeans.

%prep
%setup -q -n %{patched_resolver}
# remove all binary libs and prebuilt javadocs
find . -name "*.jar" -exec rm -f {} \;
%{__rm} -rf docs

%patch0 -p1 -b .sav

dos2unix -k KEYS
dos2unix -k LICENSE.resolver.txt

%build
%{ant} -f resolver.xml jar

%install
%{__rm} -rf %{buildroot}

# JARs
%{__mkdir_p} %{buildroot}%{_javadir}
%{__cp} -p build/resolver.jar %{buildroot}%{_javadir}/%{name}-%{version}.jar

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root,-)
%{_javadir}/*
%doc LICENSE.resolver.txt KEYS

%changelog
* Fri Sep 05 2008 Victor G. Vasilyev <victor.vasilyev at sun.com> 6.1-5
- The description is formatted
- The license viersion is fixed

* Fri Aug 22 2008 Victor G. Vasilyev <victor.vasilyev at sun.com> 6.1-4
- The dos2unix package is added as the build requirements

* Fri Aug 22 2008 Victor G. Vasilyev <victor.vasilyev at sun.com> 6.1-3
- Redundant distribution tag is removed
- Redundant user-defined macros are removed
- java-devel is specified in BuildRequires insead of java-1.6.0-openjdk
- An epoch of 1 is included in the requirements for the Java versions
- The %%{buildroot} is used everywhere instead of $RPM_BUILD_ROOT
- The canonical RPM macros are used instead of the commands ant and rm
- The -k option is used for the dos2unix commands
- More correct source URL is used, i.e not a mirror

* Fri Aug 15 2008 Victor G. Vasilyev <victor.vasilyev at sun.com> 6.1-2
- Docummentaion is added
- Appropriate value of the Group Tag are chosen from the official list

* Fri Jun 06 2008 Victor G. Vasilyev <victor.vasilyev at sun.com> 6.1-1
- Initial version



Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/netbeans-resolver/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	5 Sep 2008 16:40:08 -0000	1.1
+++ .cvsignore	5 Sep 2008 17:24:33 -0000	1.2
@@ -0,0 +1 @@
+xml-commons-resolver-1.1.zip


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/netbeans-resolver/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	5 Sep 2008 16:40:08 -0000	1.1
+++ sources	5 Sep 2008 17:24:33 -0000	1.2
@@ -0,0 +1 @@
+3843a1350ee040c1f68074e6878b4fb1  xml-commons-resolver-1.1.zip




More information about the fedora-extras-commits mailing list