Refactor pom, add tests package

This commit is contained in:
Jakub Janco 2018-05-05 15:07:27 +02:00
parent 433097914e
commit c50a9a0011
2 changed files with 42 additions and 8 deletions

View File

@ -1,6 +1,6 @@
Name: mariadb-java-client
Version: 2.2.4
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Connects applications developed in Java to MariaDB and MySQL databases
# added BSD license because of https://bugzilla.redhat.com/show_bug.cgi?id=1291558#c13
License: BSD and LGPLv2+
@ -36,6 +36,20 @@ Summary: Javadoc for %{name}
%description javadoc
This package contains the API documentation for %{name}.
%package tests
Summary: Tests for %{name}
Requires: mvn(ch.qos.logback:logback-classic:pom:)
Requires: mvn(com.amazonaws:aws-java-sdk:pom:)
Requires: mvn(com.zaxxer:HikariCP:pom:)
Requires: mvn(net.java.dev.jna:jna:pom:)
Requires: mvn(net.java.dev.jna:jna-platform:pom:)
BuildRequires: mvn(ch.qos.logback:logback-classic:pom:)
BuildRequires: mvn(com.amazonaws:aws-java-sdk:pom:)
BuildRequires: mvn(com.zaxxer:HikariCP:pom:)
%description tests
This package contains JUnit tests for %{name}.
%prep
%setup -qn mariadb-connector-j-%{version}
@ -60,12 +74,24 @@ rm -f src/main/java/org/mariadb/jdbc/internal/com/send/gssapi/WindowsNativeSspiA
%pom_remove_plugin org.apache.maven.plugins:maven-source-plugin
%pom_remove_plugin org.sonatype.plugins:nexus-staging-maven-plugin
%pom_remove_plugin pl.project13.maven:git-commit-id-plugin
%pom_remove_plugin -r :maven-gpg-plugin
# remove preconfigured OSGi manifest file and generate OSGi manifest file
# with maven-bundle-plugin instead of using maven-jar-plugin
rm src/main/resources/META-INF/MANIFEST.MF
%pom_remove_plugin :maven-jar-plugin
%pom_xpath_set "pom:packaging" bundle
%pom_xpath_set "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-jar-plugin']/pom:configuration/pom:archive/pom:manifestFile" '${project.build.outputDirectory}/META-INF/MANIFEST.MF'
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-jar-plugin']/pom:configuration/pom:archive/pom:manifestEntries"
%pom_xpath_inject "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-jar-plugin']" '
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>'
%pom_add_plugin org.apache.felix:maven-bundle-plugin:2.5.4 . '
<extensions>true</extensions>
<configuration>
@ -95,10 +121,11 @@ rm src/main/resources/META-INF/MANIFEST.MF
%build
# tests are skipped, while they require running application server
%mvn_build -f
%mvn_build -- -DskipTests
%install
%mvn_install
cp target/%{name}-%{version}-tests.jar %{buildroot}/%{_jnidir}/%{name}-tests.jar
%files -f .mfiles
%doc documentation/* README.md
@ -107,7 +134,14 @@ rm src/main/resources/META-INF/MANIFEST.MF
%files javadoc -f .mfiles-javadoc
%license LICENSE
%files tests
%{_jnidir}/%{name}-tests.jar
%license LICENSE
%changelog
* Sat May 05 2018 Jakub Janco <jjanco@redhat.com> - 2.2.4-2
- Refactor pom, add tests package
* Sat May 05 2018 Jakub Janco <jjanco@redhat.com> - 2.2.4-1
- new version

View File

@ -1,8 +1,8 @@
From 9e5c6cc9d3e91a7b09db5cd66c012ffc56b9aad7 Mon Sep 17 00:00:00 2001
From d4d3f02f3b940693e99f065dd543e6bc03721f53 Mon Sep 17 00:00:00 2001
From: Jakub Janco <jjanco@redhat.com>
Date: Wed, 22 Nov 2017 14:23:08 +0100
Subject: [PATCH] Remove WindowsNativeSspiAuthentication, because this
dependency is not in Fedora and is optional
Date: Sat, 5 May 2018 15:37:06 +0200
Subject: [PATCH] Remove WindowsNativeSspiAuthentication This dependency is
optional and not in Fedora
---
.../internal/com/send/SendGssApiAuthPacket.java | 26 +---------------------
@ -59,5 +59,5 @@ index 55771a61..d6a76979 100644
}
--
2.13.6
2.14.3