60f6f2
%global namedreltag -b08
60f6f2
%global namedversion %{version}%{?namedreltag}
60f6f2
60f6f2
Name:          glassfish-el
60f6f2
Version:       3.0.1
60f6f2
Release:       0.7.b08%{?dist}
60f6f2
Summary:       J2EE Expression Language Implementation
60f6f2
License:       CDDL-1.1 or GPLv2 with exceptions
60f6f2
URL:           http://uel.java.net
60f6f2
# svn export https://svn.java.net/svn/uel~svn/tags/javax.el-3.0.1-b08/ glassfish-el-3.0.1-b08
60f6f2
# rm -r glassfish-el-3.0.1-b08/fonts
60f6f2
# rm -r glassfish-el-3.0.1-b08/parent-pom
60f6f2
# rm -r glassfish-el-3.0.1-b08/repo
60f6f2
# rm -r glassfish-el-3.0.1-b08/spec
60f6f2
# rm -r glassfish-el-3.0.1-b08/uel
60f6f2
# rm -r glassfish-el-3.0.1-b08/www
60f6f2
# tar cJf glassfish-el-3.0.1-b08.tar.xz glassfish-el-3.0.1-b08
60f6f2
Source0:       %{name}-%{namedversion}-clean.tar.xz
60f6f2
Source1:       http://www.apache.org/licenses/LICENSE-2.0.txt
60f6f2
60f6f2
BuildRequires: maven-local
60f6f2
BuildRequires: mvn(junit:junit)
60f6f2
BuildRequires: mvn(net.java:jvnet-parent:pom:)
60f6f2
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
60f6f2
BuildRequires: mvn(org.apache.maven.plugins:maven-remote-resources-plugin)
60f6f2
BuildRequires: mvn(org.apache.maven.surefire:surefire-junit47)
60f6f2
BuildRequires: mvn(org.codehaus.mojo:javacc-maven-plugin)
60f6f2
BuildRequires: mvn(org.glassfish:legal)
60f6f2
60f6f2
BuildArch:     noarch
60f6f2
60f6f2
%description
60f6f2
This project provides an implementation of the Expression Language (EL).
60f6f2
The main goals are:
60f6f2
 * Improves current implementation: bug fixes and performance improvements
60f6f2
 * Provides API for use by other tools, such as Netbeans
60f6f2
60f6f2
%package api
60f6f2
Summary:       Expression Language 3.0 API
60f6f2
License:       (CDDL or GPLv2 with exceptions) and ASL 2.0
60f6f2
60f6f2
%description api
60f6f2
Expression Language 3.0 API.
60f6f2
60f6f2
%package javadoc
60f6f2
Summary:       Javadoc for %{name}
60f6f2
60f6f2
%description javadoc
60f6f2
This package contains javadoc for %{name}.
60f6f2
60f6f2
%prep
60f6f2
%setup -q -n %{name}-%{namedversion}
60f6f2
60f6f2
cp -p %{SOURCE1} .
60f6f2
60f6f2
%pom_remove_plugin -r :findbugs-maven-plugin
60f6f2
%pom_remove_plugin -r :findbugs-maven-plugin api
60f6f2
%pom_remove_plugin -r :glassfish-copyright-maven-plugin
60f6f2
60f6f2
# Useless tasks
60f6f2
%pom_remove_plugin -r :maven-release-plugin
60f6f2
%pom_remove_plugin -r :maven-release-plugin api
60f6f2
%pom_remove_plugin -r :maven-source-plugin
60f6f2
%pom_remove_plugin -r :maven-source-plugin api
60f6f2
60f6f2
# Fix javadoc task
60f6f2
%pom_xpath_remove "pom:plugin[pom:artifactId ='maven-javadoc-plugin']/pom:executions/pom:execution/pom:goals"
60f6f2
%pom_xpath_remove "pom:plugin[pom:artifactId ='maven-javadoc-plugin']/pom:executions/pom:execution/pom:goals" api
60f6f2
%pom_xpath_remove "pom:plugin[pom:artifactId ='maven-javadoc-plugin']/pom:executions/pom:execution/pom:configuration/pom:sourcepath"
60f6f2
%pom_xpath_inject "pom:plugin[pom:artifactId='maven-javadoc-plugin']/pom:executions/pom:execution/pom:configuration" "<additionalparam>-Xdoclint:none</additionalparam>"
60f6f2
%pom_xpath_inject "pom:plugin[pom:artifactId='maven-javadoc-plugin']/pom:executions/pom:execution/pom:configuration" "<additionalparam>-Xdoclint:none</additionalparam>" api
60f6f2
60f6f2
# Fix apis version
60f6f2
%pom_xpath_set "pom:project/pom:version" %{namedversion} api
60f6f2
# Add missing build dep
60f6f2
%pom_add_dep javax.el:javax.el-api:'${project.version}'
60f6f2
60f6f2
# Move code without build-helper plugin in the proper folder
60f6f2
%pom_remove_plugin -r :build-helper-maven-plugin
60f6f2
mv impl/src/main src
60f6f2
60f6f2
# Do not use ant
60f6f2
%pom_add_plugin org.codehaus.mojo:javacc-maven-plugin:2.6 . "
60f6f2
<executions>
60f6f2
    <execution>
60f6f2
        <id>jjtree-javacc</id>
60f6f2
        <goals>
60f6f2
            <goal>jjtree-javacc</goal>
60f6f2
        </goals>
60f6f2
        <configuration>
60f6f2
            <sourceDirectory>src/main/java/com/sun/el/parser</sourceDirectory>
60f6f2
            <outputDirectory>src/main/java/com/sun/el/parser</outputDirectory>
60f6f2
        </configuration>
60f6f2
    </execution>
60f6f2
</executions>"
60f6f2
60f6f2
# Fix impl resources path
60f6f2
%pom_xpath_remove "pom:build/pom:resources/pom:resource"
60f6f2
%pom_xpath_inject "pom:build/pom:resources" "
60f6f2
    <resource>
60f6f2
        <directory>src/main/java</directory>
60f6f2
        <includes>
60f6f2
            <include>**/*.properties</include>
60f6f2
            <include>**/*.xml</include>
60f6f2
        </includes>
60f6f2
    </resource>"
60f6f2
60f6f2
# This is a dummy POM added just to ease building in the RPM platforms
60f6f2
cat > pom-parent.xml << EOF
60f6f2
60f6f2
60f6f2
  xmlns="http://maven.apache.org/POM/4.0.0"
60f6f2
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
60f6f2
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
60f6f2
60f6f2
  <modelVersion>4.0.0</modelVersion>
60f6f2
  <groupId>org.glassfish.web</groupId>
60f6f2
  <artifactId>javax.el-root</artifactId>
60f6f2
  <version>%{namedversion}</version>
60f6f2
  <packaging>pom</packaging>
60f6f2
  <name>%{name} Parent</name>
60f6f2
  <modules>
60f6f2
    <module>api</module>
60f6f2
    <module>pom.xml</module>
60f6f2
  </modules>
60f6f2
</project>
60f6f2
EOF
60f6f2
60f6f2
%mvn_file javax.el:javax.el-api %{name}-api
60f6f2
%mvn_alias javax.el:javax.el-api "javax.el:el-api" "org.glassfish:javax.el-api"
60f6f2
60f6f2
%mvn_file org.glassfish:javax.el %{name}
60f6f2
%mvn_alias org.glassfish:javax.el "org.eclipse.jetty.orbit:com.sun.el" "org.glassfish.web:javax.el" "org.glassfish:javax.el-impl"
60f6f2
60f6f2
%mvn_package :javax.el-root __noinstall
60f6f2
60f6f2
%build
60f6f2
60f6f2
%mvn_build -s -- -f pom-parent.xml
60f6f2
60f6f2
%install
60f6f2
%mvn_install
60f6f2
60f6f2
cp -p api/target/classes/META-INF/LICENSE.txt .
60f6f2
cp -p api/src/main/javadoc/doc-files/*-spec-license.html .
60f6f2
60f6f2
%files -f .mfiles-javax.el
60f6f2
%files api -f .mfiles-javax.el-api
60f6f2
%license LICENSE.txt LICENSE-2.0.txt *-spec-license.html
60f6f2
60f6f2
%files javadoc -f .mfiles-javadoc
60f6f2
%license LICENSE.txt LICENSE-2.0.txt
60f6f2
60f6f2
%changelog
60f6f2
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-0.7.b08
60f6f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
60f6f2
60f6f2
* Thu Nov 09 2017 Michael Simacek <msimacek@redhat.com> - 3.0.1-0.6.b08
60f6f2
- Specify CDDL license version
60f6f2
60f6f2
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-0.5.b08
60f6f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
60f6f2
60f6f2
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-0.4.b08
60f6f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
60f6f2
60f6f2
* Fri Oct 14 2016 Mat Booth <mat.booth@redhat.com> - 3.0.1-0.3.b08
60f6f2
- Rebuild
60f6f2
60f6f2
* Wed Oct 12 2016 gil cattaneo <puntogil@libero.it> 3.0.1-0.2.b08
60f6f2
- use default bundle plugin settings
60f6f2
60f6f2
* Mon Oct 03 2016 gil cattaneo <puntogil@libero.it> 3.0.1-0.1.b08
60f6f2
- update to 3.0.1-b08
60f6f2
60f6f2
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.0-6
60f6f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
60f6f2
60f6f2
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-5
60f6f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
60f6f2
60f6f2
* Mon Aug  4 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.0.0-4
60f6f2
- Fix build-requires on jvnet-parent
60f6f2
60f6f2
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-3
60f6f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
60f6f2
60f6f2
* Tue Mar 04 2014 Stanislav Ochotnicky <sochotnicky@redhat.com> - 3.0.0-2
60f6f2
- Use Requires: java-headless rebuild (#1067528)
60f6f2
60f6f2
* Mon Dec 09 2013 Michal Srb <msrb@redhat.com> - 3.0.0-1
60f6f2
- Update to upstream version 3.0.0
60f6f2
60f6f2
* Mon Aug 12 2013 Alexander Kurtakov <akurtako@redhat.com> 2.2.5-5
60f6f2
- Move xmvn customizations to prep.
60f6f2
60f6f2
* Wed Aug 07 2013 gil cattaneo <puntogil@libero.it> 2.2.5-4
60f6f2
- switch to XMvn, fix for rhbz#992384
60f6f2
- install license file
60f6f2
60f6f2
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.5-3
60f6f2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
60f6f2
60f6f2
* Wed Mar  6 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.2.5-2
60f6f2
- Add depmap for org.eclipse.jetty.orbit
60f6f2
- Resolves: rhbz#918514
60f6f2
60f6f2
* Fri Feb 1 2013 David Xie <david.scriptfan@gmail.com> - 2.2.5-1
60f6f2
- Initial version of package
60f6f2