[bval] Initial import (#823862)
gil
gil at fedoraproject.org
Sat Jul 14 07:12:04 UTC 2012
commit 62b112d7ca7c0e2920f4bbeb823f0a8724cc6633
Author: gil <puntogil at libero.it>
Date: Sat Jul 14 09:11:42 2012 +0200
Initial import (#823862)
.gitignore | 1 +
bval-0.3-incubating-core-FeaturesCapable.patch | 15 ++
bval-0.4-disable-guice.patch | 29 ++++
bval-0.4-extras-pom.patch | 16 ++
bval-0.4-guice-pom.patch | 16 ++
bval-0.4-jsr303-fix-jaxb-apis.patch | 62 ++++++++
bval-0.4-jsr303-osgi-locator.patch | 15 ++
bval-0.4-jsr303-pom.patch | 52 +++++++
bval-0.4-parent-pom.patch | 98 +++++++++++++
bval.spec | 181 ++++++++++++++++++++++++
sources | 1 +
11 files changed, 486 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..1828978 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/bval-parent-0.4-source-release.zip
diff --git a/bval-0.3-incubating-core-FeaturesCapable.patch b/bval-0.3-incubating-core-FeaturesCapable.patch
new file mode 100644
index 0000000..b1fd8d8
--- /dev/null
+++ b/bval-0.3-incubating-core-FeaturesCapable.patch
@@ -0,0 +1,15 @@
+--- bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java 2011-02-03 22:31:16.000000000 +0100
++++ bval-core/src/main/java/org/apache/bval/model/FeaturesCapable.java-gil 2012-03-05 18:32:58.807073393 +0100
+@@ -31,10 +31,10 @@
+ public abstract class FeaturesCapable implements Serializable {
+ private static final long serialVersionUID = -4045110242904814218L;
+
+- private ConcurrentMap<String, Object> features = createFeaturesMap();
++ protected ConcurrentMap<String, Object> features = createFeaturesMap();
+
+ /** key = validation id, value = the validation */
+- private Validation[] validations = new Validation[0];
++ protected Validation[] validations = new Validation[0];
+
+ private volatile boolean locking;
+ private ReentrantLock lock = new ReentrantLock(true);
diff --git a/bval-0.4-disable-guice.patch b/bval-0.4-disable-guice.patch
new file mode 100644
index 0000000..d41466d
--- /dev/null
+++ b/bval-0.4-disable-guice.patch
@@ -0,0 +1,29 @@
+--- pom.xml 2012-05-15 16:48:46.340076511 +0200
++++ pom.xml-gil 2012-05-15 16:48:54.563077167 +0200
+@@ -310,7 +310,7 @@
+ <version>2.3.15</version>
+ </dependency>
+ <!-- Optional - only used by bval-guice -->
+- <dependency>
++ <!--dependency>
+ <groupId>javax.inject</groupId>
+ <artifactId>javax.inject</artifactId>
+ <version>1</version>
+@@ -324,7 +324,7 @@
+ <groupId>aopalliance</groupId>
+ <artifactId>aopalliance</artifactId>
+ <version>1.0</version>
+- </dependency>
++ </dependency-->
+ <!-- Added mainly for testing -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+@@ -616,7 +616,7 @@
+ <module>bval-jsr303</module>
+ <module>bundle</module>
+ <module>bval-json</module>
+- <module>bval-guice</module>
++ <!--module>bval-guice</module-->
+ <module>bval-tck</module>
+ <module>bval-extras</module>
+ </modules>
diff --git a/bval-0.4-extras-pom.patch b/bval-0.4-extras-pom.patch
new file mode 100644
index 0000000..e596e21
--- /dev/null
+++ b/bval-0.4-extras-pom.patch
@@ -0,0 +1,16 @@
+--- bval-extras/pom.xml 2012-04-09 22:00:38.000000000 +0200
++++ bval-extras/pom.xml-gil 2012-05-15 16:53:51.314100847 +0200
+@@ -39,7 +39,12 @@
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.bval</groupId>
+- <artifactId>org.apache.bval.bundle</artifactId>
++ <artifactId>bval-core</artifactId>
++ <version>${project.version}</version>
++ </dependency>
++ <dependency>
++ <groupId>org.apache.bval</groupId>
++ <artifactId>bval-jsr303</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
diff --git a/bval-0.4-guice-pom.patch b/bval-0.4-guice-pom.patch
new file mode 100644
index 0000000..bae76e2
--- /dev/null
+++ b/bval-0.4-guice-pom.patch
@@ -0,0 +1,16 @@
+--- bval-guice/pom.xml 2012-04-09 22:00:38.000000000 +0200
++++ bval-guice/pom.xml-gil 2012-05-15 16:13:57.615909837 +0200
+@@ -39,7 +39,12 @@
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.bval</groupId>
+- <artifactId>org.apache.bval.bundle</artifactId>
++ <artifactId>bval-core</artifactId>
++ <version>${project.version}</version>
++ </dependency>
++ <dependency>
++ <groupId>org.apache.bval</groupId>
++ <artifactId>bval-jsr303</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
diff --git a/bval-0.4-jsr303-fix-jaxb-apis.patch b/bval-0.4-jsr303-fix-jaxb-apis.patch
new file mode 100644
index 0000000..ed03bf2
--- /dev/null
+++ b/bval-0.4-jsr303-fix-jaxb-apis.patch
@@ -0,0 +1,62 @@
+diff -Nru bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/ValidationMappingParser.java bval-jsr303/src/main/java/org/apache/bval/jsr303/xml-gil/ValidationMappingParser.java
+--- bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/ValidationMappingParser.java 2012-04-09 22:00:34.000000000 +0200
++++ bval-jsr303/src/main/java/org/apache/bval/jsr303/xml-gil/ValidationMappingParser.java 2012-05-15 16:07:59.031881223 +0200
+@@ -311,8 +311,8 @@
+ }
+
+ List<Class<?>> groupList = new ArrayList<Class<?>>();
+- for (JAXBElement<String> groupClass : groupsType.getValue()) {
+- groupList.add(loadClass(groupClass.getValue(), defaultPackage));
++ for (String groupClass : groupsType.getValue()) {
++ groupList.add(loadClass(groupClass, defaultPackage));
+ }
+ return groupList.toArray(new Class[groupList.size()]);
+ }
+@@ -326,8 +326,8 @@
+ }
+
+ List<Class<? extends Payload>> payloadList = new ArrayList<Class<? extends Payload>>();
+- for (JAXBElement<String> groupClass : payloadType.getValue()) {
+- Class<?> payload = loadClass(groupClass.getValue(), defaultPackage);
++ for (String groupClass : payloadType.getValue()) {
++ Class<?> payload = loadClass(groupClass, defaultPackage);
+ if (!Payload.class.isAssignableFrom(payload)) {
+ throw new ValidationException("Specified payload class " + payload.getName() +
+ " does not implement javax.validation.Payload");
+@@ -343,8 +343,8 @@
+ if (groupSequenceType != null) {
+ Class<?>[] groupSequence = new Class<?>[groupSequenceType.getValue().size()];
+ int i=0;
+- for (JAXBElement<String> groupName : groupSequenceType.getValue()) {
+- Class<?> group = loadClass(groupName.getValue(), defaultPackage);
++ for (String groupName : groupSequenceType.getValue()) {
++ Class<?> group = loadClass(groupName, defaultPackage);
+ groupSequence[i++] = group;
+ }
+ return groupSequence;
+@@ -459,10 +459,10 @@
+ */
+ classes.addAll(findConstraintValidatorClasses(annotationClass));
+ }
+- for (JAXBElement<String> validatorClassName : validatedByType.getValue()) {
++ for (String validatorClassName : validatedByType.getValue()) {
+ Class<? extends ConstraintValidator<?, ?>> validatorClass;
+ validatorClass = (Class<? extends ConstraintValidator<?, ?>>)
+- loadClass(validatorClassName.getValue());
++ loadClass(validatorClassName);
+
+
+ if (!ConstraintValidator.class.isAssignableFrom(validatorClass)) {
+diff -Nru bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/ValidationParser.java bval-jsr303/src/main/java/org/apache/bval/jsr303/xml-gil/ValidationParser.java
+--- bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/ValidationParser.java 2012-04-09 22:00:34.000000000 +0200
++++ bval-jsr303/src/main/java/org/apache/bval/jsr303/xml-gil/ValidationParser.java 2012-05-15 15:55:41.502822371 +0200
+@@ -239,8 +239,7 @@
+
+ private void applyMappingStreams(ValidationConfigType xmlConfig,
+ ConfigurationImpl target) {
+- for (JAXBElement<String> mappingFileNameElement : xmlConfig.getConstraintMapping()) {
+- String mappingFileName = mappingFileNameElement.getValue();
++ for (String mappingFileName : xmlConfig.getConstraintMapping()) {
+ if (mappingFileName.startsWith("/")) {
+ // Classloader needs a path without a starting /
+ mappingFileName = mappingFileName.substring(1);
diff --git a/bval-0.4-jsr303-osgi-locator.patch b/bval-0.4-jsr303-osgi-locator.patch
new file mode 100644
index 0000000..5a8dfce
--- /dev/null
+++ b/bval-0.4-jsr303-osgi-locator.patch
@@ -0,0 +1,15 @@
+--- bval-jsr303/pom.xml 2012-05-22 10:41:17.875615639 +0200
++++ bval-jsr303/pom.xml-gil 2012-05-22 10:41:25.359615397 +0200
+@@ -161,6 +161,12 @@
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
++ <dependency>
++ <groupId>org.apache.geronimo.specs</groupId>
++ <artifactId>geronimo-osgi-locator</artifactId>
++ <version>1.0</version>
++ <scope>test</scope>
++ </dependency>
+ </dependencies>
+
+ <build>
diff --git a/bval-0.4-jsr303-pom.patch b/bval-0.4-jsr303-pom.patch
new file mode 100644
index 0000000..308b5c9
--- /dev/null
+++ b/bval-0.4-jsr303-pom.patch
@@ -0,0 +1,52 @@
+--- bval-jsr303/pom.xml 2012-04-09 22:00:36.000000000 +0200
++++ bval-jsr303/pom.xml-gil 2012-05-15 15:18:27.514644106 +0200
+@@ -65,8 +65,8 @@
+ </activation>
+ <dependencies>
+ <dependency>
+- <groupId>org.apache.geronimo.specs</groupId>
+- <artifactId>geronimo-validation_1.0_spec</artifactId>
++ <groupId>org.hibernate.javax.persistence</groupId>
++ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ <!-- allow users to choose an API provider -->
+ <scope>provided</scope>
+ </dependency>
+@@ -144,8 +144,8 @@
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+- <groupId>org.apache.geronimo.specs</groupId>
+- <artifactId>geronimo-jpa_2.0_spec</artifactId>
++ <groupId>org.hibernate.javax.persistence</groupId>
++ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ <!-- allow users to choose an API provider -->
+ <scope>provided</scope>
+ <optional>true</optional>
+@@ -179,19 +179,22 @@
+
+ <plugins>
+ <plugin>
+- <groupId>org.codehaus.mojo</groupId>
+- <artifactId>jaxb2-maven-plugin</artifactId>
+- <version>1.2</version>
++ <groupId>org.jvnet.jaxb2.maven2</groupId>
++ <artifactId>maven-jaxb22-plugin</artifactId>
++ <version>0.8.1</version>
+ <executions>
+ <execution>
+ <goals>
+- <goal>xjc</goal>
++ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+- <packageName>org.apache.bval.jsr303.xml</packageName>
+ <extension>true</extension>
++ <schemaDirectory>src/main/xsd</schemaDirectory>
++ <bindingDirectory>src/main/xjb</bindingDirectory>
++ <generatePackage>org.apache.bval.jsr303.xml</generatePackage>
++ <generateDirectory>${basedir}/target/generated-sources</generateDirectory>
+ </configuration>
+ </plugin>
+
diff --git a/bval-0.4-parent-pom.patch b/bval-0.4-parent-pom.patch
new file mode 100644
index 0000000..fc42336
--- /dev/null
+++ b/bval-0.4-parent-pom.patch
@@ -0,0 +1,98 @@
+--- pom.xml 2012-04-09 22:00:38.000000000 +0200
++++ pom.xml-gil 2012-05-15 15:23:01.081665935 +0200
+@@ -236,7 +236,7 @@
+ </reportSet>
+ </reportSets>
+ </plugin>
+- <plugin>
++ <!--plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jdepend-maven-plugin</artifactId>
+ <version>2.0-beta-2</version>
+@@ -245,7 +245,7 @@
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>2.3.2</version>
+- </plugin>
++ </plugin-->
+ </plugins>
+ </reporting>
+
+@@ -268,8 +268,8 @@
+ </dependency>
+ <!-- JPA2 spec required for JPA TraversableResolver support -->
+ <dependency>
+- <groupId>org.apache.geronimo.specs</groupId>
+- <artifactId>geronimo-jpa_2.0_spec</artifactId>
++ <groupId>org.hibernate.javax.persistence</groupId>
++ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+@@ -415,11 +415,11 @@
+ </execution>
+ </executions>
+ </plugin>
+- <plugin>
++ <!--plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jdepend-maven-plugin</artifactId>
+ <version>2.0-beta-2</version>
+- </plugin>
++ </plugin-->
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+@@ -433,7 +433,7 @@
+ </instructions>
+ </configuration>
+ </plugin>
+- <plugin>
++ <!--plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>ianal-maven-plugin</artifactId>
+ <version>1.0-alpha-1</version>
+@@ -442,13 +442,13 @@
+ <goals>
+ <goal>verify-legal-files</goal>
+ </goals>
+- <configuration>
++ <configuration-->
+ <!-- Fail the build if any artifacts are missing legal files -->
+- <strict>true</strict>
++ <!--strict>true</strict>
+ </configuration>
+ </execution>
+ </executions>
+- </plugin>
++ </plugin-->
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+@@ -519,11 +519,11 @@
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.12</version>
+ </plugin>
+- <plugin>
++ <!--plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>2.3.2</version>
+- </plugin>
++ </plugin-->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>buildnumber-maven-plugin</artifactId>
+@@ -569,10 +569,10 @@
+ <artifactId>apache-rat-plugin</artifactId>
+ <version>0.7</version>
+ </plugin>
+- <plugin>
++ <!--plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>ianal-maven-plugin</artifactId>
+- </plugin>
++ </plugin-->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>buildnumber-maven-plugin</artifactId>
diff --git a/bval.spec b/bval.spec
new file mode 100644
index 0000000..bd040de
--- /dev/null
+++ b/bval.spec
@@ -0,0 +1,181 @@
+%global namedreltag %{nil}
+%global namedversion %{version}%{?namedreltag}
+# disable guice module for now
+%global with_guice 0
+Name: bval
+Version: 0.4
+Release: 2%{?dist}
+Summary: Apache Bean Validation
+Group: Development/Libraries
+License: ASL 2.0
+Url: http://bval.apache.org/
+Source0: http://www.apache.org/dist/%{name}/%{namedversion}/%{name}-parent-%{namedversion}-source-release.zip
+
+# remove
+# findbugs-maven-plugin
+# ianal-maven-plugin
+# jdepend-maven-plugin
+# change org.apache.geronimo.specs geronimo-jpa_2.0_spec 1.1 with org.hibernate.javax.persistence hibernate-jpa-2.0-api 1.0.1.Final
+Patch0: %{name}-%{namedversion}-parent-pom.patch
+Patch1: %{name}-0.3-incubating-core-FeaturesCapable.patch
+# change org.codehaus.mojo jaxb2-maven-plugin with maven-jaxb22-plugin
+# change org.apache.geronimo.specs geronimo-jpa_2.0_spec 1.1 with org.hibernate.javax.persistence hibernate-jpa-2.0-api 1.0.1.Final
+Patch2: %{name}-%{namedversion}-jsr303-pom.patch
+# fix jaxb 2.2 apis
+Patch3: %{name}-%{namedversion}-jsr303-fix-jaxb-apis.patch
+
+# replace bundle with core and jsr303
+Patch4: %{name}-%{namedversion}-guice-pom.patch
+# build failure bval-guice/src/main/java/org/apache/bval/guice/ValidationModule.java:[61,12] error: cannot find symbol
+Patch5: %{name}-%{namedversion}-disable-guice.patch
+
+# replace bundle with core and jsr303
+Patch6: %{name}-%{namedversion}-extras-pom.patch
+# fix koji build problems missing org.apache.geronimo.osgi.locator.ProviderLocator
+Patch7: %{name}-%{namedversion}-jsr303-osgi-locator.patch
+
+BuildRequires: java-devel >= 0:1.7.0
+BuildRequires: jpackage-utils
+
+BuildRequires: apache-commons-beanutils
+BuildRequires: apache-commons-lang3
+BuildRequires: bean-validation-api
+BuildRequires: freemarker
+BuildRequires: geronimo-validation
+BuildRequires: glassfish-jaxb
+BuildRequires: glassfish-jaxb-api
+BuildRequires: hibernate-jpa-2.0-api
+BuildRequires: slf4j
+BuildRequires: xstream
+
+%if %with_guice
+BuildRequires: aopalliance
+BuildRequires: atinject
+BuildRequires: google-guice
+Requires: aopalliance
+Requires: atinject
+Requires: google-guice
+%endif
+
+Requires: apache-commons-beanutils
+Requires: apache-commons-lang3
+Requires: bean-validation-api
+Requires: freemarker
+Requires: geronimo-validation
+Requires: glassfish-jaxb
+Requires: glassfish-jaxb-api
+Requires: hibernate-jpa-2.0-api
+Requires: slf4j
+Requires: xstream
+
+# test deps
+BuildRequires: geronimo-osgi-support
+BuildRequires: junit
+BuildRequires: mockito
+
+BuildRequires: apache-rat-plugin
+BuildRequires: buildnumber-maven-plugin
+BuildRequires: maven-antrun-plugin
+BuildRequires: maven-compiler-plugin
+BuildRequires: maven-enforcer-plugin
+BuildRequires: maven-install-plugin
+BuildRequires: maven-jar-plugin
+BuildRequires: maven-javadoc-plugin
+BuildRequires: maven-jaxb2-plugin
+BuildRequires: maven-plugin-bundle
+BuildRequires: maven-resources-plugin
+BuildRequires: maven-surefire-plugin
+BuildRequires: maven-surefire-provider-junit4
+
+Requires: java
+Requires: jpackage-utils
+BuildArch: noarch
+
+%description
+Apache BVal delivers an implementation of the Bean Validation
+Specification (JSR303), which is TCK compliant and
+works on Java SE 5 or later. The initial codebase for the
+project was donated to the ASF by a SGA from Agimatec GmbH.
+
+%package javadoc
+Group: Documentation
+Summary: Javadoc for %{name}
+Requires: jpackage-utils
+
+%description javadoc
+This package contains javadoc for %{name}.
+
+%prep
+%setup -q -n %{name}-parent-%{namedversion}
+find . -name "*.class" -delete
+find . -name "*.jar" -delete
+
+%patch0 -p0
+%patch1 -p0
+%patch2 -p0
+%patch3 -p0
+%if %with_guice
+%patch4 -p0
+%else
+%patch5 -p0
+%endif
+%patch6 -p0
+%patch7 -p0
+
+# unavailable deps
+# org.hibernate.jsr303.tck jsr303-tck 1.0.6.GA
+# org.jboss.test-harness jboss-test-harness-jboss-as-51 1.0.0
+sed -i "s|<module>bval-tck</module>|<!--module>bval-tck</module-->|" pom.xml
+
+sed -i "s|<module>bundle</module>|<!--module>bundle</module-->|" pom.xml
+
+# fix non ASCII chars
+for s in bval-extras/src/main/java/org/apache/bval/extras/constraints/net/DomainValidator.java;do
+ native2ascii -encoding UTF8 ${s} ${s}
+done
+
+%build
+
+mvn-rpmbuild -Dri -Dproject.build.sourceEncoding=UTF-8 install javadoc:aggregate
+
+%install
+
+mkdir -p %{buildroot}%{_mavenpomdir}
+install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-parent.pom
+%add_maven_depmap JPP.%{name}-parent.pom
+
+# bundle guice tck
+mkdir -p %{buildroot}%{_javadir}/%{name}
+for m in core \
+ extras \
+ json \
+ jsr303 \
+ xstream;do
+ install -m 644 bval-${m}/target/bval-${m}-%{namedversion}.jar %{buildroot}%{_javadir}/%{name}/${m}.jar
+ install -pm 644 bval-${m}/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-${m}.pom
+ %add_maven_depmap JPP.%{name}-${m}.pom %{name}/${m}.jar
+done
+
+mkdir -p %{buildroot}%{_javadocdir}/%{name}
+cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
+
+%files
+%{_javadir}/%{name}/*.jar
+%{_mavenpomdir}/JPP.%{name}-*.pom
+%{_mavendepmapfragdir}/%{name}
+%doc CHANGES.txt LICENSE NOTICE README.txt
+
+%files javadoc
+%{_javadocdir}/%{name}
+%doc LICENSE NOTICE
+
+%changelog
+* Thu Jul 12 2012 gil cattaneo <puntogil at libero.it> 0.4-2
+- Installed NOTICE file in javadoc package
+- Fix preserve timestamps of installed POM files
+
+* Tue May 15 2012 gil cattaneo <puntogil at libero.it> 0.4-1
+- update to 0.4
+
+* Fri Apr 06 2012 gil cattaneo <puntogil at libero.it> 0.3-1
+- initial rpm
\ No newline at end of file
diff --git a/sources b/sources
index e69de29..8c263e4 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+5d5eae2cfacd9a988ff041985d9bbcbe bval-parent-0.4-source-release.zip
More information about the scm-commits
mailing list