Name: sxc Version: 0.8 Release: 1%{?dist} Summary: Simple XML Compiler License: CDDL URL: https://github.com/dblevins/sxc Source0: https://github.com/dblevins/sxc/archive/%{name}-%{version}.tar.gz # Add missing ecj4 method stub Patch0: %{name}-0.8-ecj.patch BuildRequires: maven-local BuildRequires: mvn(com.sun.xml.bind:jaxb-impl) BuildRequires: mvn(com.sun.xml.bind:jaxb-xjc) BuildRequires: mvn(jaxen:jaxen) BuildRequires: mvn(junit:junit) BuildRequires: mvn(org.apache.felix:maven-bundle-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin) BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) # optional build requires # BuildRequires: mvn(org.codehaus.swizzle:dependency-report-plugin) BuildRequires: mvn(org.codehaus.woodstox:woodstox-core-asl) BuildRequires: mvn(org.eclipse.jdt:core) BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:) BuildRequires: mvn(stax:stax-api) BuildRequires: mvn(xmlunit:xmlunit) BuildArch: noarch %description SXC (Simple XML Compiler) allows you to created optimized parsers and writers for XML. Through a declarative API you're able to tell SXC what type of XML to expect and what actions to associate with it. %package core Summary: SXC Core # ASL 2.0: sxc-core/src/main/java/org/metatype/sxc/util/XPathAssert.java License: CDDL and ASL 2.0 %description core Simple XML Compiler Core. %package jaxb Summary: SXC JAXB # ASL 2.0: sxc-jaxb/src/main/java/org/metatype/sxc/jaxb/* # sxc-jaxb/src/main/java/org/metatype/sxc/jaxb/model/* License: CDDL and ASL 2.0 %description jaxb Simple XML Compiler JAXB. %package jaxb-core Summary: SXC JAXB :: Core # ASL 2.0: sxc-jaxb-core/src/main/java/org/metatype/sxc/jaxb/* License: CDDL and ASL 2.0 %description jaxb-core Simple XML Compiler JAXB :: Core. %package jaxb-maven-plugin Summary: SXC JAXB :: Maven Plugin %description jaxb-maven-plugin Simple XML Compiler JAXB :: Maven Plugin. %package runtime Summary: SXC Runtime # ASL 2.0: sxc-runtime/src/main/java/org/metatype/sxc/util/Base64.java # sxc-runtime/src/main/java/org/metatype/sxc/util/W3CDOMStreamWriter.java # sxc-runtime/src/main/java/org/metatype/sxc/util/W3CNamespaceContext.java # sxc-runtime/src/main/java/org/metatype/sxc/util/XmlFactories.java # CDDL: sxc-runtime/src/main/java/org/metatype/sxc/Context.java License: CDDL and ASL 2.0 %description runtime Simple XML Compiler Runtime. %package xpath Summary: SXC XPath %description xpath Simple XML Compiler XPath. %package javadoc Summary: Javadoc for %{name} License: CDDL and ASL 2.0 %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n %{name}-%{name}-%{version} %patch0 -p0 %pom_remove_plugin :maven-assembly-plugin %{name}-jaxb %pom_remove_plugin org.codehaus.swizzle:dependency-report-plugin %{name}-jaxb-core %pom_remove_plugin org.codehaus.swizzle:dependency-report-plugin %{name}-jaxb-maven-plugin # Remove org.apache.maven.wagon:wagon-webdav:1.0-beta-1 %pom_xpath_remove "pom:build/pom:extensions" %pom_change_dep -r :wstx-asl :woodstox-core-asl # Use maven3 apis %pom_change_dep :maven-project :maven-compat %{name}-jaxb-maven-plugin %pom_xpath_remove "pom:dependency[pom:artifactId = 'tools' ]/pom:scope" %{name}-core %pom_xpath_remove "pom:systemPath" %{name}-core # Add OSGi support, required by other projects for p in core jaxb jaxb-core runtime xpath; do %pom_add_plugin org.apache.felix:maven-bundle-plugin:2.5.4 %{name}-${p} ' bundle-manifest process-classes manifest ' %pom_add_plugin org.apache.maven.plugins:maven-jar-plugin:2.6 %{name}-${p} ' ${project.build.outputDirectory}/META-INF/MANIFEST.MF ' done # These test fails # [javax.xml.stream.XMLStreamException: Underlying stream encoding 'ASCII' and # input paramter for writeStartDocument() method 'UTF-8' do not match.] rm -r \ %{name}-jaxb/src/test/java/org/metatype/sxc/jaxb/simple/SimpleReadWriteTest.java \ %{name}-jaxb/src/test/java/org/metatype/sxc/jaxb/simple/SimpleGlobalTest.java \ %{name}-jaxb/src/test/java/org/metatype/sxc/jaxb/fields/FieldsTest.java \ %{name}-jaxb/src/test/java/org/metatype/sxc/jaxb/root/RootTest.java \ %{name}-jaxb/src/test/java/org/metatype/sxc/jaxb/any/AnyTest.java \ %{name}-jaxb/src/test/java/org/metatype/sxc/jaxb/collection/CollectionsTest.java \ %{name}-jaxb/src/test/java/org/metatype/sxc/jaxb/mixed/MixedTest.java \ %{name}-jaxb/src/test/java/org/metatype/sxc/jaxb/node/NodeTest.java \ %{name}-jaxb/src/test/java/org/metatype/sxc/jaxb/EverythingAttributeTest.java \ %{name}-jaxb/src/test/java/org/metatype/sxc/jaxb/properties/PropertiesTest.java \ %{name}-jaxb/src/test/java/org/metatype/sxc/jaxb/xmllist/XmlListTest.java \ %{name}-jaxb/src/test/java/org/metatype/sxc/jaxb/EverythingTest.java \ %{name}-jaxb/src/test/java/org/metatype/sxc/jaxb/invoice/InvoiceTest.java \ %{name}-jaxb/src/test/java/org/metatype/sxc/jaxb/listener/ListenerTest.java \ %{name}-jaxb/src/test/java/org/metatype/sxc/jaxb/CustomerTest.java \ %{name}-jaxb/src/test/java/org/metatype/sxc/jaxb/enums/EnumTest.java \ %{name}-jaxb/src/test/java/org/metatype/sxc/jaxb/array/ArraysTest.java # spurious executable perm chmod 644 LICENSE.txt %{name}-core/NOTES.txt %build %mvn_build -s -- -Dproject.build.sourceEncoding=UTF-8 %install %mvn_install %files -f .mfiles-%{name} %license LICENSE.txt %files core -f .mfiles-%{name}-core %doc %{name}-core/NOTES.txt %license LICENSE.txt %files jaxb -f .mfiles-%{name}-jaxb %license LICENSE.txt %files jaxb-core -f .mfiles-%{name}-jaxb-core %license LICENSE.txt %files jaxb-maven-plugin -f .mfiles-%{name}-jaxb-maven-plugin %license LICENSE.txt %files runtime -f .mfiles-%{name}-runtime %license LICENSE.txt %files xpath -f .mfiles-%{name}-xpath %license LICENSE.txt %files javadoc -f .mfiles-javadoc %license LICENSE.txt %changelog * Mon Feb 16 2015 gil cattaneo 0.8-1 - update to 0.8 * Sat Sep 14 2013 gil cattaneo 0.7.3-1 - initial rpm