Compare commits

..

28 commits

Author SHA1 Message Date
Till Maas
4b4f7f3b9b 2017-04-30: Retired orphaned package, because it was orphaned for
more than six weeks.
2017-04-30 17:22:33 +02:00
Fedora Release Engineering
e812a54c75 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-11 18:21:14 +00:00
Ding-Yi Chen
2f7468c66d - Use resteasy client instead of resteasy 2016-08-02 17:16:27 +10:00
Ding-Yi Chen
6f6f379807 - Upstream update to version 3.9.1
- Add BuildRequires findbugs and mvn(org.jboss.resteasy:resteasy-bom:pom:)
2016-06-23 14:21:51 +10:00
Ding-Yi Chen
ede6b9dae1 - Upgrade to upstream version 3.8.3 2016-04-19 16:38:45 +10:00
Ding-Yi Chen
ff96c29f8a Upstream update to 3.8.3 2016-04-19 15:01:41 +10:00
Fedora Release Engineering
149d37ddd2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-05 04:02:48 +00:00
Ding-Yi Chen
e6fae2280c - Upgrade to upstream version 3.8.1 2015-11-22 01:20:05 +10:00
Ding-Yi Chen
8f041518fb Merge branch 'f22' 2015-08-10 13:43:08 +10:00
Ding-Yi Chen
bfa6d320e6 Merge branch 'master' into f22 2015-08-10 12:54:20 +10:00
Ding-Yi Chen
8931e1f548 Merge branch 'master' into f21 2015-08-10 12:33:02 +10:00
Ding-Yi Chen
9d6f4ebde1 Release zanata-common-3.7.3-1 2015-08-10 12:13:49 +10:00
Ding-Yi Chen
c85a561f24 Merge branch 'master' into f21 2015-07-03 23:50:45 +10:00
Ding-Yi Chen
97e0127e8d Update source file 2015-07-03 21:59:49 +10:00
Ding-Yi Chen
5019e52f83 BuildRequires: hamcrest 2015-07-03 19:58:57 +10:00
Dennis Gilmore
a7fdcd2144 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-19 04:42:47 +00:00
Patrick Huang
92b32b9305 bump up release number 2014-07-27 20:38:48 -04:00
Patrick Huang
8f0422d628 bump up release number 2014-07-27 20:24:49 -04:00
Dennis Gilmore
db4d9f0233 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-07 13:00:11 -05:00
Patrick Huang
a47c0b7053 upload source 2014-06-01 20:43:43 -04:00
Patrick Huang
f3ffe3eac1 upgrade to latest upstream 2014-06-01 20:42:27 -04:00
Michael Simacek
c22e7f21a5 Use Requires: java-headless rebuild (#1067528)
Signed-off-by: Michael Simacek <msimacek@redhat.com>
Signed-off-by: Mikolaj Izdebski <mizdebsk@redhat.com>
2014-03-28 21:10:03 +01:00
Patrick Huang
583be9a4fd add required version 2014-01-28 20:54:48 -05:00
Patrick Huang
93c866d7df bump release for fixed xom package 2014-01-28 20:26:47 -05:00
Patrick Huang
c834ce255a bump release 2014-01-19 18:49:02 -05:00
Patrick Huang
df7bfc8888 explicit listing BR and R 2014-01-19 18:45:00 -05:00
Patrick Huang
b963ac327a add requires 2014-01-16 23:23:10 -05:00
Patrick Huang
bf87f5a399 upgrade to version 3.1.0 2014-01-16 22:25:20 -05:00
5 changed files with 3 additions and 460 deletions

5
.gitignore vendored
View file

@ -1,5 +0,0 @@
/common-2.2.1.zip
/common-3.0.1.zip
/common-3.0.2.zip
/common-3.1.0.zip
/common-3.3.0.zip

3
dead.package Normal file
View file

@ -0,0 +1,3 @@
2017-04-30: Retired orphaned package, because it was orphaned for
more than six weeks.

View file

@ -1,312 +0,0 @@
diff --git zanata-common-util/pom.xml zanata-common-util/pom.xml
index 4586f63..ba563ab 100644
--- zanata-common-util/pom.xml
+++ zanata-common-util/pom.xml
@@ -83,10 +83,6 @@
<artifactId>stax-api</artifactId>
</dependency>
- <dependency>
- <groupId>xom</groupId>
- <artifactId>xom</artifactId>
- </dependency>
</dependencies>
diff --git zanata-common-util/src/main/java/org/zanata/common/util/ElementBuilder.java zanata-common-util/src/main/java/org/zanata/common/util/ElementBuilder.java
deleted file mode 100644
index ace5a04..0000000
--- zanata-common-util/src/main/java/org/zanata/common/util/ElementBuilder.java
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright 2013, Red Hat, Inc. and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.zanata.common.util;
-
-import static com.google.common.base.Strings.isNullOrEmpty;
-import static javax.xml.stream.XMLStreamConstants.*;
-
-import java.util.Iterator;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLEventReader;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.events.Attribute;
-import javax.xml.stream.events.Characters;
-import javax.xml.stream.events.StartElement;
-import javax.xml.stream.events.XMLEvent;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.dom.DOMResult;
-import javax.xml.transform.stax.StAXSource;
-
-import nu.xom.Attribute.Type;
-import nu.xom.Element;
-import nu.xom.converters.DOMConverter;
-
-import org.w3c.dom.Document;
-
-/**
- * ElementBuilder consumes a complete element from a StAX XMLStreamReader or
- * XMLEventReader and returns it as a xom Element.
- * <p>
- * {@link nux.xom.io.StaxParser} implements a similar idea.
- *
- * @author Sean Flanigan <a
- * href="mailto:sflaniga@redhat.com">sflaniga@redhat.com</a>
- */
-public class ElementBuilder {
-
- /**
- * Converts the element and subelements at the reader's current position
- * into a xom Element tree
- *
- * @param reader
- * must be in START_ELEMENT state
- * @return
- * @throws XMLStreamException
- */
- public static Element buildElement(XMLStreamReader reader)
- throws XMLStreamException {
- int eventType = reader.getEventType();
- assert eventType == START_ELEMENT;
- String localName = reader.getLocalName();
- String qualName = getName(reader.getPrefix(), localName);
- Element xElem = new Element(qualName, reader.getNamespaceURI());
- copyAttributes(reader, xElem);
-
- while (reader.hasNext() && eventType != END_ELEMENT) {
- eventType = reader.next();
- switch (eventType) {
- case START_ELEMENT:
- Element startElement = buildElement(reader);
- xElem.appendChild(startElement);
- break;
- case END_ELEMENT:
- break;
- case CHARACTERS:
- xElem.appendChild(reader.getText());
- break;
- case SPACE:
- break;
- default:
- throw new RuntimeException("unhandled event type: " + eventType);
- }
- }
- return xElem;
- }
-
- /**
- * Converts the element and subsequent subelements at the reader's current
- * position into a xom Element tree
- *
- * @param startElem
- * @param reader
- * must be just past the START_ELEMENT event
- * @return
- * @throws XMLStreamException
- */
- public static Element buildElement(StartElement startElem,
- XMLEventReader reader) throws XMLStreamException {
- QName name = startElem.getName();
- String qualName = getName(name);
- Element xElem = new Element(qualName, name.getNamespaceURI());
- copyAttributes(startElem, xElem);
-
- while (reader.hasNext() && !reader.peek().isEndElement()) {
- XMLEvent event = reader.nextEvent();
- if (event.isStartElement()) {
- Element startElement =
- buildElement(event.asStartElement(), reader);
- xElem.appendChild(startElement);
- } else if (event.isCharacters()) {
- Characters characters = event.asCharacters();
- if (!characters.isIgnorableWhiteSpace()) {
- xElem.appendChild(characters.getData());
- }
- } else {
- throw new RuntimeException("unhandled event type: "
- + event.getEventType());
- }
- }
- if (reader.hasNext())
- reader.nextEvent();
- return xElem;
- }
-
- public static void copyAttributes(XMLStreamReader reader, Element toElem) {
- assert reader.getEventType() == START_ELEMENT;
- for (int i = 0; i < reader.getAttributeCount(); i++) {
- String prefix = reader.getAttributePrefix(i);
- String localName = reader.getAttributeLocalName(i);
- String name = getName(prefix, localName);
- String uri = reader.getAttributeNamespace(i);
- String value = reader.getAttributeValue(i);
- Type attrType = getAttributeType(reader.getAttributeType(i));
- nu.xom.Attribute xAttr =
- new nu.xom.Attribute(name, uri, value, attrType);
- toElem.addAttribute(xAttr);
- }
- }
-
- public static void copyAttributes(StartElement fromElem, Element toElem) {
- Iterator<Attribute> attributes = (Iterator<Attribute>) fromElem.getAttributes();
- while (attributes.hasNext()) {
- Attribute attr = attributes.next();
- QName qName = attr.getName();
- String name = getName(qName);
- String uri = qName.getNamespaceURI();
- String value = attr.getValue();
- Type attrType = getAttributeType(attr.getDTDType());
- nu.xom.Attribute xAttr =
- new nu.xom.Attribute(name, uri, value, attrType);
- toElem.addAttribute(xAttr);
- }
- }
-
- private static String getName(String prefix, String localName) {
- String xPrefix = isNullOrEmpty(prefix) ? "" : prefix + ":";
- String prefixedName = xPrefix + localName;
- return prefixedName;
- }
-
- private static String getName(QName name) {
- String prefix = name.getPrefix();
- String xPrefix = isNullOrEmpty(prefix) ? "" : prefix + ":";
- String prefixedName = xPrefix + name.getLocalPart();
- return prefixedName;
- }
-
- private static Type getAttributeType(String name) {
- try {
- if (name.equals("ENUMERATED"))
- return Type.ENUMERATION;
- return (Type) Type.class.getField(name).get(null);
- } catch (NoSuchFieldException e) {
- throw new RuntimeException("unknown DTD type: " + name);
- } catch (IllegalAccessException e) {
- throw new RuntimeException(e);
- }
- }
-
- /**
- * Converts the element and subelements at the reader's current position
- * into a xom Element tree
- *
- * @param reader
- * @param transformer
- * the provided Transformer must support StAXSource
- * @return
- * @throws TransformerException
- */
- static nu.xom.Element buildElement(XMLStreamReader reader,
- Transformer transformer) throws TransformerException {
- DOMResult result = new DOMResult();
- transformer.transform(new StAXSource(reader), result);
- Document docNode = (Document) result.getNode();
- org.w3c.dom.Element elem =
- (org.w3c.dom.Element) docNode.getFirstChild();
- nu.xom.Element element = DOMConverter.convert(elem);
- return element;
- }
-
-}
diff --git zanata-common-util/src/test/java/org/zanata/common/util/ElementBuilderTest.java zanata-common-util/src/test/java/org/zanata/common/util/ElementBuilderTest.java
deleted file mode 100644
index d9b2b23..0000000
--- zanata-common-util/src/test/java/org/zanata/common/util/ElementBuilderTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package org.zanata.common.util;
-
-import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.xml.stream.XMLEventReader;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.events.XMLEvent;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-
-public class ElementBuilderTest {
-
- @Before
- public void before() throws IOException {
- is = getClass().getResourceAsStream("ElementBuilderTest.xml");
- }
-
- private XMLInputFactory xif = XMLInputFactory.newInstance();
- private InputStream is;
-
- @Test
- public void buildElementXMLStreamReader() throws Exception {
- XMLStreamReader reader = xif.createXMLStreamReader(is);
- while (reader.hasNext()) {
- int eventType = reader.next();
- if (eventType == START_ELEMENT
- && reader.getLocalName().equals("tu")) {
- ElementBuilder.buildElement(reader).toXML();
- }
- }
- }
-
- @Test
- public void buildElementStartElementXMLEventReader() throws Exception {
- XMLEventReader reader = xif.createXMLEventReader(is);
- while (reader.hasNext()) {
- XMLEvent event = reader.nextEvent();
- if (event.isStartElement()
- && event.asStartElement().getName().getLocalPart()
- .equals("tu")) {
- ElementBuilder.buildElement(event.asStartElement(), reader)
- .toXML();
- }
- }
- }
-
- @Test
- @Ignore
- public void buildElementXMLStreamReaderTransformer() throws Exception {
- // Nasty way to ensure that we get a Transformer which supports
- // StAXSource:
- System.setProperty("javax.xml.transform.TransformerFactory",
- "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
- Transformer t = TransformerFactory.newInstance().newTransformer();
-
- XMLStreamReader reader = xif.createXMLStreamReader(is);
- while (reader.hasNext()) {
- int eventType = reader.next();
- if (eventType == START_ELEMENT
- && reader.getLocalName().equals("tu")) {
- ElementBuilder.buildElement(reader, t).toXML();
- }
- }
- }
-}

View file

@ -1 +0,0 @@
c425615b4aa15f2ccebf92dd3324fc33 common-3.3.0.zip

View file

@ -1,142 +0,0 @@
%global shortname common
%global submodule_util zanata-%{shortname}-util
%global submodule_po zanata-adapter-po
%global submodule_properties zanata-adapter-properties
%global submodule_xliff zanata-adapter-xliff
%global submodule_glossary zanata-adapter-glossary
Name: zanata-%{shortname}
Version: 3.3.0
Release: 4%{?dist}
Summary: Zanata common modules
Group: Development/Libraries
License: LGPLv2+
URL: https://github.com/zanata/%{name}
Source0: https://github.com/zanata/%{name}/archive/%{shortname}-%{version}.zip
Patch0: remove-xom.patch
BuildArch: noarch
BuildRequires: maven-local
BuildRequires: zanata-parent
BuildRequires: mvn(net.sourceforge.findbugs:annotations)
BuildRequires: zanata-api
BuildRequires: openprops
BuildRequires: jgettext
BuildRequires: opencsv
BuildRequires: jackson
BuildRequires: guava
BuildRequires: apache-commons-io
BuildRequires: apache-commons-codec
Requires: zanata-api
Requires: openprops
Requires: jgettext
Requires: opencsv
Requires: slf4j
Requires: jackson
Requires: guava
Requires: apache-commons-io
Requires: apache-commons-codec
%description
Zanata common modules
%package javadoc
Summary: Javadocs for %{name}
Group: Documentation
Requires: jpackage-utils
Requires: %{name} = %{version}-%{release}
%description javadoc
This package contains the API documentation for %{shortname}.
This includes submodules:
%{submodule_util},
%{submodule_po},
%{submodule_properties},
%{submodule_xliff} and %{submodule_glossary}
%prep
%setup -q -n %{name}-%{shortname}-%{version}
%patch0
%pom_remove_dep com.google.code.findbugs:annotations %{submodule_util}
%pom_xpath_inject "pom:dependencies" "<dependency><groupId>net.sourceforge.findbugs</groupId><artifactId>annotations</artifactId><version>2.0.2</version></dependency>" %{submodule_util}
%build
%mvn_build
%install
%mvn_install
%files -f .mfiles
%dir %{_javadir}/%{name}
%doc README.txt COPYING.LESSER COPYING.GPL
%files javadoc -f .mfiles-javadoc
%changelog
* Thu Jul 17 2014 Patrick Huang <pahuang@redhat.com> - 3.3.0-4
- Remove xom dependency
* Thu Jun 05 2014 Patrick Huang <pahuang@redhat.com> - 3.3.0-3
- Rebuild in f20
* Mon Jun 02 2014 Patrick Huang <pahuang@redhat.com> - 3.3.0-2
- Remove xom version restriction
* Mon Jun 02 2014 Patrick Huang <pahuang@redhat.com> - 3.3.0-1
- Upgrade to latest upstream version
* Fri Mar 28 2014 Michael Simacek <msimacek@redhat.com> - 3.1.0-6
- Use Requires: java-headless rebuild (#1067528)
* Wed Jan 29 2014 Patrick Huang <pahuang@redhat.com> 3.1.0-5
- require xom greater than specific version
* Wed Jan 29 2014 Patrick Huang <pahuang@redhat.com> 3.1.0-4
- rebuild for xom fix
* Mon Jan 20 2014 Patrick Huang <pahuang@redhat.com> 3.1.0-3
- Explicit listing BR and R
* Fri Jan 17 2014 Patrick Huang <pahuang@redhat.com> 3.1.0-2
- Add requires
* Thu Jan 09 2014 Patrick Huang <pahuang@redhat.com> 3.1.0-1
- Latest upstream version
* Wed Sep 4 2013 Patrick Huang <pahuang@redhat.com> 3.0.2-1
- Latest upstream version
* Thu Aug 22 2013 Patrick Huang <pahuang@redhat.com> 3.0.1-1
- Latest upstream version
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri May 3 2013 Patrick Huang <pahuang@redhat.com> 2.2.1-5
- Minor cosmetic change
* Fri May 3 2013 Patrick Huang <pahuang@redhat.com> 2.2.1-4
- Minor cosmetic change
* Fri May 3 2013 Patrick Huang <pahuang@redhat.com> 2.2.1-3
- Remove javadoc subpackage require %{?_isa}
- Change javadoc installation location
- Change license to LGPLv2+
* Wed May 1 2013 Patrick Huang <pahuang@redhat.com> 2.2.1-2
- Add missing pom for f19-
* Tue Mar 19 2013 Patrick Huang <pahuang@redhat.com> 2.2.1-1
- Upstream version update
* Thu Feb 28 2013 Patrick Huang <pahuang@redhat.com> 2.2.0-1
- Upstream version update
* Mon Feb 11 2013 Patrick Huang <pahuang@redhat.com> 2.1.1-1
- Initial RPM package