[hibernate-validator] First import after review (#799976)

Juan Hernandez jhernand at fedoraproject.org
Tue Mar 13 16:33:33 UTC 2012


commit 30c7487675e748866066bec4b4ef603a2474b275
Author: Juan Hernandez <juan.hernandez at redhat.com>
Date:   Tue Mar 13 17:33:10 2012 +0100

    First import after review (#799976)

 .gitignore                                         |    1 +
 ...nate-validator-dont-generate-test-reports.patch |   29 ++++
 hibernate-validator-remove-jdocbook-plugin.patch   |  120 ++++++++++++++++
 hibernate-validator-remove-shade-plugin.patch      |   55 +++++++
 hibernate-validator-use-maven-jaxb2-plugin.patch   |   60 ++++++++
 hibernate-validator.spec                           |  148 ++++++++++++++++++++
 sources                                            |    1 +
 7 files changed, 414 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..9a7df1e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/hibernate-validator-4.2.0.Final.tar.xz
diff --git a/hibernate-validator-dont-generate-test-reports.patch b/hibernate-validator-dont-generate-test-reports.patch
new file mode 100644
index 0000000..0b58901
--- /dev/null
+++ b/hibernate-validator-dont-generate-test-reports.patch
@@ -0,0 +1,29 @@
+diff --git a/pom.xml b/pom.xml
+index 3c68a0e..6356337 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -254,24 +254,6 @@
+                 </plugin>
+                 <plugin>
+                     <groupId>org.apache.maven.plugins</groupId>
+-                    <artifactId>maven-surefire-report-plugin</artifactId>
+-                    <version>2.4.3</version>
+-                    <executions>
+-                        <execution>
+-                            <id>generate-test-report</id>
+-                            <phase>test</phase>
+-                            <goals>
+-                                <goal>report-only</goal>
+-                            </goals>
+-                        </execution>
+-                    </executions>
+-                    <configuration>
+-                        <outputDirectory>${project.build.directory}/surefire-reports</outputDirectory>
+-                        <outputName>test-report</outputName>
+-                    </configuration>
+-                </plugin>
+-                <plugin>
+-                    <groupId>org.apache.maven.plugins</groupId>
+                     <artifactId>maven-source-plugin</artifactId>
+                     <version>2.1.1</version>
+                     <executions>
diff --git a/hibernate-validator-remove-jdocbook-plugin.patch b/hibernate-validator-remove-jdocbook-plugin.patch
new file mode 100644
index 0000000..326c450
--- /dev/null
+++ b/hibernate-validator-remove-jdocbook-plugin.patch
@@ -0,0 +1,120 @@
+From efc546aefa84a3f4f6883a09566d8eeff8f6bb62 Mon Sep 17 00:00:00 2001
+From: Juan Hernandez <juan.hernandez at redhat.com>
+Date: Mon, 5 Mar 2012 13:18:11 +0100
+Subject: [PATCH 2/2] Remove jdocbook plugin
+
+---
+ hibernate-validator/pom.xml |   75 -------------------------------------------
+ pom.xml                     |   10 ------
+ 2 files changed, 0 insertions(+), 85 deletions(-)
+
+diff --git a/hibernate-validator/pom.xml b/hibernate-validator/pom.xml
+index fb479ba..5f84b4e 100644
+--- a/hibernate-validator/pom.xml
++++ b/hibernate-validator/pom.xml
+@@ -265,81 +265,6 @@
+                 </executions>
+             </plugin>
+             <plugin>
+-                <groupId>org.jboss.maven.plugins</groupId>
+-                <artifactId>maven-jdocbook-plugin</artifactId>
+-                <extensions>true</extensions>
+-                <dependencies>
+-                    <dependency>
+-                        <groupId>org.hibernate</groupId>
+-                        <artifactId>hibernate-jdocbook-style</artifactId>
+-                        <version>2.0.1</version>
+-                        <type>jdocbook-style</type>
+-                    </dependency>
+-                </dependencies>
+-                <configuration>
+-                    <sourceDocumentName>master.xml</sourceDocumentName>
+-                    <sourceDirectory>${basedir}/src/main/docbook</sourceDirectory>
+-                    <masterTranslation>en-US</masterTranslation>
+-                    <translations>
+-                        <translation>zh-CN</translation>
+-                    </translations>
+-                    <!-- 
+-                        The jdookbook plug-in doesn't define an expression for this property, therefore
+-                        it can't be passed on the command line. To address this issue the value is retrieved
+-                        from a custom property, which itself can be set using -DignoreTranslations=...  
+-                    -->
+-                    <ignoreTranslations>${jdocbook.ignoreTranslations}</ignoreTranslations>
+-                    <imageResource>
+-                        <directory>${basedir}/src/main/docbook/en-US/images</directory>
+-                    </imageResource>
+-                    <formats>
+-                        <format>
+-                            <formatName>pdf</formatName>
+-                            <stylesheetResource>classpath:/xslt/org/hibernate/jdocbook/xslt/pdf.xsl</stylesheetResource>
+-                            <finalName>hibernate_validator_reference.pdf</finalName>
+-                        </format>
+-                        <format>
+-                            <formatName>html_single</formatName>
+-                            <stylesheetResource>classpath:/xslt/org/hibernate/jdocbook/xslt/xhtml-single.xsl
+-                            </stylesheetResource>
+-                            <finalName>index.html</finalName>
+-                        </format>
+-                        <format>
+-                            <formatName>html</formatName>
+-                            <stylesheetResource>classpath:/xslt/org/hibernate/jdocbook/xslt/xhtml.xsl
+-                            </stylesheetResource>
+-                            <finalName>index.html</finalName>
+-                        </format>
+-                    </formats>
+-                    <options>
+-                        <xincludeSupported>true</xincludeSupported>
+-                        <xmlTransformerType>saxon</xmlTransformerType>
+-                        <!-- needed for uri-resolvers; can be omitted if using 'current' uri scheme -->
+-                        <!--     could also locate the docbook dependency and inspect its version... -->
+-                        <docbookVersion>1.72.0</docbookVersion>
+-                        <localeSeparator>-</localeSeparator>
+-                    </options>
+-                    <profiling>
+-                        <enabled>true</enabled>
+-                    </profiling>
+-                </configuration>
+-                <executions>
+-                    <execution>
+-                        <id>make-doc</id>
+-                        <phase>deploy</phase>
+-                        <goals>
+-                            <goal>resources</goal>
+-                            <goal>translate</goal>
+-                            <goal>generate</goal>
+-                        </goals>
+-                    </execution>
+-                </executions>
+-            </plugin>
+-            <plugin>
+-                <groupId>org.jboss.maven.plugins</groupId>
+-                <artifactId>maven-jdocbook-style-plugin</artifactId>
+-            </plugin>
+-            <plugin>
+                 <groupId>org.apache.maven.plugins</groupId>
+                 <artifactId>maven-release-plugin</artifactId>
+             </plugin>
+diff --git a/pom.xml b/pom.xml
+index e2e3c9f..3c68a0e 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -324,16 +324,6 @@
+                     <version>1.4</version>
+                 </plugin>
+                 <plugin>
+-                    <groupId>org.jboss.maven.plugins</groupId>
+-                    <artifactId>maven-jdocbook-plugin</artifactId>
+-                    <version>2.2.3</version>
+-                </plugin>
+-                <plugin>
+-                    <groupId>org.jboss.maven.plugins</groupId>
+-                    <artifactId>maven-jdocbook-style-plugin</artifactId>
+-                    <version>2.0.0</version>
+-                </plugin>
+-                <plugin>
+                     <groupId>org.apache.maven.plugins</groupId>
+                     <artifactId>maven-project-info-reports-plugin</artifactId>
+                     <version>2.0.1</version>
+-- 
+1.7.9
+
diff --git a/hibernate-validator-remove-shade-plugin.patch b/hibernate-validator-remove-shade-plugin.patch
new file mode 100644
index 0000000..835732c
--- /dev/null
+++ b/hibernate-validator-remove-shade-plugin.patch
@@ -0,0 +1,55 @@
+diff --git a/hibernate-validator/pom.xml b/hibernate-validator/pom.xml
+index c93ecad..e68d9c2 100644
+--- a/hibernate-validator/pom.xml
++++ b/hibernate-validator/pom.xml
+@@ -218,34 +218,6 @@
+             </plugin>
+             <plugin>
+                 <groupId>org.apache.maven.plugins</groupId>
+-                <artifactId>maven-shade-plugin</artifactId>
+-                <executions>
+-                    <execution>
+-                        <phase>package</phase>
+-                        <goals>
+-                            <goal>shade</goal>
+-                        </goals>
+-                        <configuration>
+-                            <artifactSet>
+-                                <includes>
+-                                    <include>com.googlecode.jtype:jtype</include>
+-                                </includes>
+-                            </artifactSet>
+-                            <relocations>
+-                                <relocation>
+-                                    <pattern>com.googlecode.jtype</pattern>
+-                                    <shadedPattern>org.hibernate.validator.jtype</shadedPattern>
+-                                </relocation>
+-                            </relocations>
+-                            <transformers>
+-                                <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer" />
+-                            </transformers>
+-                        </configuration>
+-                    </execution>
+-                </executions>
+-            </plugin>
+-            <plugin>
+-                <groupId>org.apache.maven.plugins</groupId>
+                 <artifactId>maven-javadoc-plugin</artifactId>
+                 <configuration>
+                     <links>
+diff --git a/pom.xml b/pom.xml
+index 6356337..1ede529 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -302,11 +302,6 @@
+                 </plugin>
+                 <plugin>
+                     <groupId>org.apache.maven.plugins</groupId>
+-                    <artifactId>maven-shade-plugin</artifactId>
+-                    <version>1.4</version>
+-                </plugin>
+-                <plugin>
+-                    <groupId>org.apache.maven.plugins</groupId>
+                     <artifactId>maven-project-info-reports-plugin</artifactId>
+                     <version>2.0.1</version>
+                 </plugin>
diff --git a/hibernate-validator-use-maven-jaxb2-plugin.patch b/hibernate-validator-use-maven-jaxb2-plugin.patch
new file mode 100644
index 0000000..3a6f854
--- /dev/null
+++ b/hibernate-validator-use-maven-jaxb2-plugin.patch
@@ -0,0 +1,60 @@
+From 7b9ff18a2cdfe298f892bba182ec2e3042ee7009 Mon Sep 17 00:00:00 2001
+From: Juan Hernandez <juan.hernandez at redhat.com>
+Date: Mon, 5 Mar 2012 12:49:51 +0100
+Subject: [PATCH 2/2] Use maven-jaxb2-plugin
+
+---
+ hibernate-validator/pom.xml |   12 +++++++-----
+ pom.xml                     |    6 +++---
+ 2 files changed, 10 insertions(+), 8 deletions(-)
+
+diff --git a/hibernate-validator/pom.xml b/hibernate-validator/pom.xml
+index 0fd452a..c93ecad 100644
+--- a/hibernate-validator/pom.xml
++++ b/hibernate-validator/pom.xml
+@@ -138,18 +138,20 @@
+                 <artifactId>maven-source-plugin</artifactId>
+             </plugin>
+             <plugin>
+-                <groupId>org.codehaus.mojo</groupId>
+-                <artifactId>jaxb2-maven-plugin</artifactId>
++                <groupId>org.jvnet.jaxb2.maven2</groupId>
++                <artifactId>maven-jaxb22-plugin</artifactId>
+                 <executions>
+                     <execution>
+                         <goals>
+-                            <goal>xjc</goal>
++                            <goal>generate</goal>
+                         </goals>
+                     </execution>
+                 </executions>
+                 <configuration>
+-                    <packageName>org.hibernate.validator.xml</packageName>
+-                    <outputDirectory>${basedir}/target/generated-sources</outputDirectory>
++                    <schemaDirectory>src/main/xsd</schemaDirectory>
++                    <bindingDirectory>src/main/xjb</bindingDirectory>
++                    <generatePackage>org.hibernate.validator.xml</generatePackage>
++                    <generateDirectory>${basedir}/target/generated-sources</generateDirectory>
+                     <extension>true</extension>
+                 </configuration>
+             </plugin>
+diff --git a/pom.xml b/pom.xml
+index c641d25..3c68a0e 100644
+--- a/pom.xml
++++ b/pom.xml
+@@ -314,9 +314,9 @@
+                     <version>1.1.1</version>
+                 </plugin>
+                 <plugin>
+-                    <groupId>org.codehaus.mojo</groupId>
+-                    <artifactId>jaxb2-maven-plugin</artifactId>
+-                    <version>1.3</version>
++                    <groupId>org.jvnet.jaxb2.maven2</groupId>
++                    <artifactId>maven-jaxb22-plugin</artifactId>
++                    <version>0.8.1</version>
+                 </plugin>
+                 <plugin>
+                     <groupId>org.apache.maven.plugins</groupId>
+-- 
+1.7.9
+
diff --git a/hibernate-validator.spec b/hibernate-validator.spec
new file mode 100644
index 0000000..75930df
--- /dev/null
+++ b/hibernate-validator.spec
@@ -0,0 +1,148 @@
+%global namedreltag .Final
+%global namedversion %{version}%{?namedreltag}
+
+Name: hibernate-validator
+Version: 4.2.0
+Release: 4%{?dist}
+Summary: Bean Validation (JSR 303) Reference Implementation
+
+Group: Development/Libraries
+License: ASL 2.0 
+
+URL: http://www.hibernate.org/subprojects/validator.html
+
+# git clone git://github.com/hibernate/hibernate-validator
+# cd hibernate-validator/ && git archive --format=tar --prefix=hibernate-validator-4.2.0.Final/ 4.2.0.Final | xz > hibernate-validator-4.2.0.Final.tar.xz
+Source0: hibernate-validator-4.2.0.Final.tar.xz
+
+# Remove the jdocbook plugin as it is not available in the distribution:
+Patch0: %{name}-remove-jdocbook-plugin.patch
+
+# Use maven-jaxb2-plugin (already packaged) to avoid adding packaging
+# jaxb2-maven-plugin:
+Patch1: %{name}-use-maven-jaxb2-plugin.patch         
+
+# Don't generate test reports:
+Patch2: %{name}-dont-generate-test-reports.patch
+
+# Remove the shade plugin:
+Patch3: %{name}-remove-shade-plugin.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-enforcer-plugin
+BuildRequires: jsoup
+BuildRequires: jtype
+BuildRequires: joda-time
+BuildRequires: geronimo-validation
+BuildRequires: maven-injection-plugin
+BuildRequires: hibernate-jpa-2.0-api
+BuildRequires: maven-jaxb2-plugin
+BuildRequires: dos2unix
+
+Requires: hibernate-jpa-2.0-api
+Requires: jpackage-utils
+Requires: geronimo-validation
+Requires: java
+Requires: jsoup
+Requires: jtype
+Requires: joda-time
+Requires: slf4j
+
+
+%description
+Bean Validation (JSR 303) Reference Implementation
+
+
+%package javadoc
+Summary: API docs for %{name}
+Group: Documentation
+Requires: jpackage-utils
+
+
+%description javadoc
+Reference implementation of JSR 303 - Bean Validation. Bean Validation defines
+a metadata model and API for JavaBean validation. The default metadata source
+is annotations, with the ability to override and extend the meta-data through
+the use of XML validation descriptors.
+
+
+%prep
+%setup -q -n hibernate-validator-%{namedversion}
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+
+
+%build
+
+# Rrunning tests requires hibernate proper, so skip for now:
+mvn-rpmbuild \
+  -Dmaven.test.skip=true \
+  -pl hibernate-validator \
+  install \
+  javadoc:javadoc
+
+# Fix the line endings:
+dos2unix readme.txt
+
+
+%install
+
+# Jar files:
+install -d -m 755 %{buildroot}%{_javadir}
+install -m 644 hibernate-validator/target/%{name}-%{namedversion}.jar %{buildroot}%{_javadir}/%{name}.jar
+
+# POM files:
+install -d -m 755 %{buildroot}%{_mavenpomdir}
+install -pm 644 pom.xml  %{buildroot}%{_mavenpomdir}/JPP-%{name}-parent.pom
+install -pm 644 %{name}/pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+
+# Javadoc files:
+install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
+cp -rp %{name}/target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
+
+# Dependencies map:
+%add_maven_depmap JPP-%{name}-parent.pom
+%add_maven_depmap JPP-%{name}.pom %{name}.jar
+
+
+%files
+%{_mavenpomdir}/JPP-%{name}-parent.pom
+%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavendepmapfragdir}/%{name}
+%{_javadir}/%{name}.jar
+%doc license.txt
+%doc readme.txt
+%doc changelog.txt
+
+
+%files javadoc
+%{_javadocdir}/%{name}
+%doc license.txt
+
+
+%changelog
+* Mon Mar 5 2012 Juan Hernandez <juan.hernandez at redhat.com> - 4.2.0-4
+- Cleanup of the spec file
+- Replace jaxb2-maven-plugin with maven-jaxb2-plugin
+
+* Sat Jan 21 2012 Marek Goldmann <mgoldman at redhat.com> - 4.2.0-3
+- Building all classes with jaxb2 xjc target
+
+* Wed Dec 14 2011 Andy Grimm <agrimm at gmail.com> - 4.2.0-2
+- include both pom files, with correct names
+
+* Tue Oct 18 2011 Andy Grimm <agrimm at gmail.com> - 4.2.0-1
+- Initial package
diff --git a/sources b/sources
index e69de29..0ed7217 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+a8b207d957a09556872750163eaa8791  hibernate-validator-4.2.0.Final.tar.xz


More information about the scm-commits mailing list