Name: grizzly Version: 2.2.18 Release: 1%{?dist} Summary: Java NIO Server Framework Group: Development/Libraries # see Grizzly_THIRDPARTYLICENSEREADME.txt License: BSD and CDDL and GPLv2 with exceptions and Public Domain URL: http://grizzly.java.net/ # git clone git://java.net/grizzly~git # (cd grizzly~git/ && git archive --format=tar --prefix=grizzly-2.3-beta3/ 2_3_beta3 | xz > ../grizzly-2.3-beta3.tar.xz) Source0: %{name}-%{version}.tar.xz # forcing the use of tomcat 6.x apis (with tomcat 7.x there are some problems/conflicts, the latest snapshoot use servlet 3.1 apis) Source1: %{name}-%{version}-depmap # wget -O glassfish-LICENSE.txt https://svn.java.net/svn/glassfish~svn/tags/legal-1.1/src/main/resources/META-INF/LICENSE.txt # glassfish-management-api package don't include the license file Source2: glassfish-LICENSE.txt BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: jvnet-parent BuildRequires: felix-osgi-compendium BuildRequires: felix-osgi-core BuildRequires: glassfish-gmbal BuildRequires: tomcat6-servlet-2.5-api # test deps # BuildRequires: jersey BuildRequires: junit BuildRequires: maven BuildRequires: maven-compiler-plugin BuildRequires: maven-enforcer-plugin BuildRequires: maven-install-plugin BuildRequires: maven-istack-commons-plugin BuildRequires: maven-jar-plugin BuildRequires: maven-javadoc-plugin BuildRequires: maven-plugin-build-helper BuildRequires: maven-plugin-bundle BuildRequires: maven-resources-plugin BuildRequires: maven-source-plugin BuildRequires: maven-surefire-plugin BuildRequires: maven-surefire-provider-junit4 BuildRequires: maven-war-plugin Requires: glassfish-gmbal Requires: tomcat6-servlet-2.5-api Requires: java Requires: jpackage-utils BuildArch: noarch # config %description Writing scalable server applications in the Java programming language has always been difficult. Before the advent of the Java New I/O API (NIO), thread management issues made it impossible for a server to scale to thousands of users. The Grizzly framework has been designed to help developers to take advantage of the Java NIO API. Originally developed under the GlassFish umbrella, the framework is now available as a standalone project. Grizzly goals is to help developers to build scalable and robust servers using NIO. %package samples Group: Development/Libraries Summary: Grizzly samples Requires: %{name} = %{version}-%{release} Requires: jpackage-utils %description samples This package contains samples for %{name}. %package javadoc Group: Documentation Summary: Javadoc for %{name} Requires: jpackage-utils %description javadoc This package contains javadoc for %{name}. %prep %setup -q find . -name '*.jar' -delete find . -name '*.class' -delete # TODO unavailable deps # com.agilejava.docbkx:docbkx-maven-plugin:jar:2.0.9 %pom_disable_module documentation/ %pom_disable_module bundles extras # com.sun.xml.ws jaxws-rt :2.2.5 %pom_disable_module http-server-jaxws extras # org.ops4j maven-pax-plugin 1.5 %pom_disable_module grizzly-httpservice extras # org.codehaus.mojo clirr-maven-plugin %pom_disable_module bundles modules # com.sun.xml.ws jaxws-rt 2.2.5 # org.glassfish.grizzly grizzly-http-server-jaxws %pom_disable_module http-jaxws-samples samples # remove internal libraries %pom_disable_module websockets/chat samples # org.glassfish.hk2 config-generator 2.1.9 %pom_disable_module config modules %pom_remove_dep org.codehaus.mojo:cobertura-maven-plugin %pom_remove_dep org.apache.felix:maven-bundle-plugin %pom_remove_dep org.apache.maven:maven-plugin-tools-api %pom_remove_dep org.glassfish.hk2:config-types %pom_remove_dep org.glassfish.hk2:core %pom_remove_dep org.glassfish.hk2:hk2-config %pom_remove_dep org.glassfish.hk2:hk2-locator %pom_remove_dep org.glassfish.hk2:osgi-adapter %pom_remove_plugin org.codehaus.mojo:clirr-maven-plugin %pom_remove_plugin org.glassfish.copyright:glassfish-copyright-maven-plugin # circular deps %if 0 %pom_xpath_inject "pom:project/pom:dependencies" ' com.sun.jersey jersey-servlet ${jersey-version} test ' modules/http-servlet %else %pom_remove_dep com.sun.jersey:jersey-client modules/http-servlet %pom_remove_dep com.sun.jersey:jersey-server modules/http-servlet rm -rf modules/http-servlet/src/test/java/filter/* %endif cp -p %{SOURCE2} LICENSE.txt cp -p modules/grizzly/src/main/resources/Grizzly_THIRDPARTYLICENSEREADME.txt . sed -i 's/\r//' LICENSE.txt Grizzly_THIRDPARTYLICENSEREADME.txt %build # Tests in error: # testSimpleSendFileViaStaticResourceAdapter(org.glassfish.grizzly.http.server.SendFileTest) mvn-rpmbuild -Dmaven.local.depmap.file="%{SOURCE1}" -Dmaven.test.failure.ignore=true install javadoc:aggregate %install mkdir -p %{buildroot}%{_mavenpomdir} install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-project.pom %add_maven_depmap JPP.%{name}-%{name}-project.pom install -pm 644 extras/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-extras.pom %add_maven_depmap JPP.%{name}-%{name}-extras.pom mkdir -p %{buildroot}%{_javadir}/%{name} # TODO http-server-jaxws grizzly-httpservice for ext in http-server-multipart \ http-servlet-extras; do install -m 644 extras/${ext}/target/%{name}-${ext}-%{version}.jar \ %{buildroot}%{_javadir}/%{name}/%{name}-${ext}.jar install -pm 644 extras/${ext}/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-${ext}.pom %add_maven_depmap JPP.%{name}-%{name}-${ext}.pom %{name}/%{name}-${ext}.jar done install -pm 644 modules/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-modules.pom %add_maven_depmap JPP.%{name}-%{name}-modules.pom # TODO modules/config install -m 644 modules/grizzly/target/grizzly-framework-%{version}.jar \ %{buildroot}%{_javadir}/%{name}/%{name}-framework.jar ( cd %{buildroot}%{_javadir}/%{name} ln -sf %{name}-framework.jar %{name}.jar ) install -pm 644 modules/grizzly/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-framework.pom %add_maven_depmap JPP.%{name}-%{name}-framework.pom %{name}/%{name}-framework.jar # TODO bundles for mod in comet \ http \ http-ajp \ http-server \ http-servlet \ portunif \ rcm \ websockets; do install -m 644 modules/${mod}/target/%{name}-${mod}-%{version}.jar \ %{buildroot}%{_javadir}/%{name}/%{name}-${mod}.jar install -pm 644 modules/${mod}/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-${mod}.pom %add_maven_depmap JPP.%{name}-%{name}-${mod}.pom %{name}/%{name}-${mod}.jar done install -pm 644 samples/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-samples.pom %add_maven_depmap -f samples JPP.%{name}-%{name}-samples.pom install -pm 644 samples/comet/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-comet-samples.pom %add_maven_depmap -f samples JPP.%{name}-%{name}-comet-samples.pom install -pm 644 samples/comet/comet-counter/target/%{name}-comet-counter.war \ %{buildroot}%{_javadir}/%{name}/ install -pm 644 samples/comet/comet-counter/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-comet-counter.pom %add_maven_depmap -f samples JPP.%{name}-%{name}-comet-counter.pom %{name}/%{name}-comet-counter.war install -pm 644 samples/comet/comet-jmaki/target/%{name}-jmaki.war \ %{buildroot}%{_javadir}/%{name}/ install -pm 644 samples/comet/comet-jmaki/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-jmaki.pom %add_maven_depmap -f samples JPP.%{name}-%{name}-jmaki.pom %{name}/%{name}-jmaki.war install -pm 644 samples/portunif/target/%{name}-portunif-samples-%{version}.jar \ %{buildroot}%{_javadir}/%{name}/%{name}-portunif-samples.jar install -pm 644 samples/portunif/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-portunif-samples.pom %add_maven_depmap -f samples JPP.%{name}-%{name}-portunif-samples.pom %{name}/%{name}-portunif-samples.jar # TODO websockets/chat # http-jaxws-samples for s in framework-samples \ http-ajp-samples \ http-multipart-samples \ http-samples \ http-server-samples; do install -pm 644 samples/${s}/target/%{name}-${s}-%{version}.jar \ %{buildroot}%{_javadir}/%{name}/%{name}-${s}.jar install -pm 644 samples/${s}/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-${s}.pom %add_maven_depmap -f samples JPP.%{name}-%{name}-${s}.pom %{name}/%{name}-${s}.jar done mkdir -p %{buildroot}%{_javadocdir}/%{name} cp -rp target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name} %files %dir %{_javadir}/%{name} %{_javadir}/%{name}/%{name}*.jar %{_mavenpomdir}/JPP.%{name}-%{name}-*.pom %{_mavendepmapfragdir}/%{name} %doc LICENSE.txt Grizzly_THIRDPARTYLICENSEREADME.txt # config %files samples %{_javadir}/%{name}/%{name}-*-samples.jar %{_javadir}/%{name}/%{name}-*.war %{_mavenpomdir}/JPP.%{name}-%{name}-comet-counter.pom %{_mavenpomdir}/JPP.%{name}-%{name}-jmaki.pom %{_mavenpomdir}/JPP.%{name}-%{name}*-samples.pom %{_mavendepmapfragdir}/%{name}-samples %doc LICENSE.txt Grizzly_THIRDPARTYLICENSEREADME.txt %files javadoc %{_javadocdir}/%{name} %doc LICENSE.txt Grizzly_THIRDPARTYLICENSEREADME.txt %changelog * Wed Sep 19 2012 gil cattaneo 2.2.18-1 - initial rpm