c46455
Name:           xmvn
c46455
Version:        1.3.0
c034af
Release:        6%{?dist}
c46455
Summary:        Local Extensions for Apache Maven
c46455
License:        ASL 2.0
c46455
URL:            http://mizdebsk.fedorapeople.org/xmvn
c46455
BuildArch:      noarch
c46455
Source0:        https://fedorahosted.org/released/%{name}/%{name}-%{version}.tar.xz
c46455
a5fc8a
Patch0001:      0001-Port-to-Maven-3.0.5-and-Sonatype-Aether.patch
a5fc8a
Patch0002:      0002-Remove-integration-with-for-Apache-Ivy.patch
a5fc8a
Patch0003:      0003-Port-to-Sonatype-Sisu.patch
a5fc8a
Patch0004:      0004-Add-support-for-absolute-artifact-symlinks.patch
c034af
Patch0005:      0005-Ignore-runtime-exceptions-thrown-by-ASM.patch
c46455
c46455
BuildRequires:  maven >= 3.0.5-14
c46455
BuildRequires:  maven-local
c46455
BuildRequires:  beust-jcommander
c46455
BuildRequires:  cglib
c46455
BuildRequires:  maven-dependency-plugin
c46455
BuildRequires:  maven-plugin-build-helper
c46455
BuildRequires:  maven-assembly-plugin
c46455
BuildRequires:  maven-invoker-plugin
c46455
BuildRequires:  objectweb-asm
c46455
BuildRequires:  xmlunit
c46455
c46455
Requires:       maven >= 3.0.5-14
c46455
c46455
%description
c46455
This package provides extensions for Apache Maven that can be used to
c46455
manage system artifact repository and use it to resolve Maven
c46455
artifacts in offline mode, as well as Maven plugins to help with
c46455
creating RPM packages containing Maven artifacts.
c46455
c46455
%package        javadoc
c46455
Summary:        API documentation for %{name}
c46455
c46455
%description    javadoc
c46455
This package provides %{summary}.
c46455
c46455
%prep
c46455
%setup -q
a5fc8a
%patch0001 -p1
a5fc8a
%patch0002 -p1
a5fc8a
%patch0003 -p1
a5fc8a
%patch0004 -p1
c034af
%patch0005 -p1
c46455
c46455
# remove dependency plugin maven-binaries execution
c46455
# we provide apache-maven by symlink
c46455
%pom_xpath_remove "pom:executions/pom:execution[pom:id[text()='maven-binaries']]"
c46455
c46455
# get mavenVersion that is expected
c46455
mver=$(sed -n '/<mavenVersion>/{s/.*>\(.*\)<.*/\1/;p}' \
c46455
           xmvn-parent/pom.xml)
c46455
mkdir -p target/dependency/
c46455
ln -s %{_datadir}/maven target/dependency/apache-maven-$mver
c46455
c46455
c46455
# skip ITs for now (mix of old & new XMvn config causes issues
c46455
rm -rf src/it
c46455
c46455
%build
c46455
%mvn_build -X
c46455
c46455
tar --delay-directory-restore -xvf target/*tar.bz2
c46455
chmod -R +rwX %{name}-%{version}*
c46455
c46455
c46455
%install
c46455
%mvn_install
c46455
c46455
install -d -m 755 %{buildroot}%{_datadir}/%{name}
c46455
cp -r %{name}-%{version}*/* %{buildroot}%{_datadir}/%{name}/
c46455
ln -sf %{_datadir}/maven/bin/mvn %{buildroot}%{_datadir}/%{name}/bin/mvn
c46455
ln -sf %{_datadir}/maven/bin/mvnDebug %{buildroot}%{_datadir}/%{name}/bin/mvnDebug
c46455
ln -sf %{_datadir}/maven/bin/mvnyjp %{buildroot}%{_datadir}/%{name}/bin/mvnyjp
c46455
c46455
c46455
# helper scripts
c46455
install -d -m 755 %{buildroot}%{_bindir}
c46455
install -m 755 xmvn-tools/src/main/bin/tool-script \
c46455
               %{buildroot}%{_datadir}/%{name}/bin/
c46455
c46455
for tool in subst resolve bisect install;do
c46455
    rm %{buildroot}%{_datadir}/%{name}/bin/%{name}-$tool
c46455
    ln -s tool-script \
c46455
          %{buildroot}%{_datadir}/%{name}/bin/%{name}-$tool
c46455
c46455
    cat <<EOF >%{buildroot}%{_bindir}/%{name}-$tool
c46455
#!/bin/sh -e
c46455
exec %{_datadir}/%{name}/bin/%{name}-$tool "\${@}"
c46455
EOF
c46455
    chmod +x %{buildroot}%{_bindir}/%{name}-$tool
c46455
c46455
done
c46455
c46455
# copy over maven lib directory
c46455
cp -r %{_datadir}/maven/lib/* %{buildroot}%{_datadir}/%{name}/lib/
c46455
c46455
# possibly recreate symlinks that can be automated with xmvn-subst
c46455
%{name}-subst %{buildroot}%{_datadir}/%{name}/
c46455
c46455
# XXX temp until guice is rebuilt and no_aop has proper manifest so that xmvn-subst will work on it
c46455
for tool in subst resolver bisect installer;do
c46455
    # guice-no_aop doesn't contain correct pom.properties. Manually replace with symlinks
c46455
    pushd %{buildroot}%{_datadir}/%{name}/lib/$tool
c46455
       rm -f %{buildroot}%{_datadir}/%{name}/lib/google-guice*
c46455
       rm -f %{buildroot}%{_datadir}/%{name}/lib/sisu-guice*
c46455
       build-jar-repository . guice/google-guice-no_aop
c46455
    popd
c46455
done
c46455
rm -f %{buildroot}%{_datadir}/%{name}/lib/google-guice*
c46455
rm -f %{buildroot}%{_datadir}/%{name}/lib/sisu-guice*
c46455
build-jar-repository %{buildroot}%{_datadir}/%{name}/lib/ guice/google-guice-no_aop
c46455
c46455
# reenable after build
c46455
#if [[ `find %{buildroot}%{_datadir}/%{name}/lib -type f -name '*.jar' -not -name '*%{name}*' | wc -l` -ne 0 ]];then
c46455
#    echo "Some jar files were not symlinked during build. Aborting"
c46455
#    exit 1
c46455
#fi
c46455
c46455
c46455
# /usr/bin/xmvn script
c46455
cat <<EOF >%{buildroot}%{_bindir}/%{name}
c46455
#!/bin/sh -e
c46455
export M2_HOME="\${M2_HOME:-%{_datadir}/%{name}}"
c46455
exec mvn "\${@}"
c46455
EOF
c46455
c46455
# make sure our conf is identical to maven so yum won't freak out
c46455
cp -P %{_datadir}/maven/conf/settings.xml %{buildroot}%{_datadir}/%{name}/conf/
c46455
c46455
%pretrans -p <lua>
c46455
-- we changed symlink to dir in 0.5.0-1, workaround RPM issues
c46455
for key, dir in pairs({"conf", "conf/logging", "boot"}) do
c46455
    path = "%{_datadir}/%{name}/" .. dir
c46455
    if posix.readlink(path) then
c46455
       os.remove(path)
c46455
    end
c46455
end
c46455
c46455
%files -f .mfiles
c46455
%doc LICENSE NOTICE
c46455
%doc AUTHORS README
c46455
%attr(755,-,-) %{_bindir}/*
c46455
%{_datadir}/%{name}
c46455
c46455
%files javadoc -f .mfiles-javadoc
c46455
%doc LICENSE NOTICE
c46455
c46455
%changelog
c034af
* Wed Oct  5 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.3.0-6
c034af
- Ignore runtime exceptions thrown by ASM
c034af
- Resolves: rhbz#1381883
c034af
a5fc8a
* Fri Jan 10 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.3.0-5
a5fc8a
- Split 1 patch to 3 patches, one per feature
a5fc8a
- Add support for absolute artifact symlinks
a5fc8a
a5fc8a
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.3.0-4
a5fc8a
- Mass rebuild 2013-12-27
a5fc8a
c46455
* Thu Nov  7 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.3.0-3
c46455
- Fix guice symlinks
c46455
c46455
* Thu Nov  7 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.3.0-2
c46455
- Bump Maven requirement to 3.0.5-14
c46455
c46455
* Thu Nov  7 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.3.0-1
c46455
- Rebase upstream version 1.3.0
c46455
c46455
* Tue Oct 01 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.1.0-1
c46455
- Update to upstream version 1.1.0
c46455
c46455
* Fri Sep 27 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.0.2-3
c46455
- Add __default package specifier support
c46455
c46455
* Mon Sep 23 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.0.2-2
c46455
- Don't try to relativize symlink targets
c46455
- Restotre support for relative symlinks
c46455
c46455
* Fri Sep 20 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 1.0.2-1
c46455
- Update to upstream version 1.0.2
c46455
c46455
* Tue Sep 10 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.0.0-2
c46455
- Workaround broken symlinks for core and connector (#986909)
c46455
c46455
* Mon Sep 09 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 1.0.0-1
c46455
- Updating to upstream 1.0.0
c46455
c46455
* Tue Sep  3 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> 1.0.0-0.2.alpha1
c46455
- Update to upstream version 1.0.0 alpha1
c46455
c46455
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-4
c46455
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
c46455
c46455
* Tue Jul 23 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.5.1-3
c46455
- Rebuild without bootstrapping
c46455
c46455
* Tue Jul 23 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.5.1-2
c46455
- Install symlink to simplelogger.properties in %{_sysconfdir}
c46455
c46455
* Tue Jul 23 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.5.1-1
c46455
- Update to upstream version 0.5.1
c46455
c46455
* Tue Jul 23 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.5.0-7
c46455
- Allow installation of Eclipse plugins in javadir
c46455
c46455
* Mon Jul 22 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.5.0-6
c46455
- Remove workaround for plexus-archiver bug
c46455
- Use sonatype-aether symlinks
c46455
c46455
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.5.0-5
c46455
- Rebuild to regenerate API documentation
c46455
- Resolves: CVE-2013-1571
c46455
c46455
* Wed Jun  5 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.5.0-5
c46455
- Fix resolution of tools.jar
c46455
c46455
* Fri May 31 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.5.0-4
c46455
- Fix handling of packages with dots in groupId
c46455
- Previous versions also fixed bug #948731
c46455
c46455
* Tue May 28 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.5.0-3
c46455
- Move pre scriptlet to pretrans and implement in lua
c46455
c46455
* Fri May 24 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.5.0-2
c46455
- Fix upgrade path scriptlet
c46455
- Add patch to fix NPE when debugging is disabled
c46455
c46455
* Fri May 24 2013 Stanislav Ochotnicky <sochotnicky@redhat.com> - 0.5.0-1
c46455
- Update to upstream version 0.5.0
c46455
c46455
* Fri May 17 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.2-3
c46455
- Add patch: install MOJO fix
c46455
c46455
* Wed Apr 17 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.2-2
c46455
- Update plexus-containers-container-default JAR location
c46455
c46455
* Tue Apr  9 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.2-1
c46455
- Update to upstream version 0.4.2
c46455
c46455
* Thu Mar 21 2013 Michal Srb <msrb@redhat.com> - 0.4.1-1
c46455
- Update to upstream version 0.4.1
c46455
c46455
* Fri Mar 15 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.0-1
c46455
- Update to upstream version 0.4.0
c46455
c46455
* Fri Mar 15 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.0-0.7
c46455
- Enable tests
c46455
c46455
* Thu Mar 14 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.0-0.6
c46455
- Update to newer snapshot
c46455
c46455
* Wed Mar 13 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.0-0.5
c46455
- Update to newer snapshot
c46455
c46455
* Wed Mar 13 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.0-0.4
c46455
- Set proper permissions for scripts in _bindir
c46455
c46455
* Tue Mar 12 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.0-0.3
c46455
- Update to new upstream snapshot
c46455
- Create custom /usr/bin/xmvn instead of using %%jpackage_script
c46455
- Mirror maven directory structure
c46455
- Add Plexus Classworlds config file
c46455
c46455
* Wed Mar  6 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.0-0.2
c46455
- Update to newer snapshot
c46455
c46455
* Wed Mar  6 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.4.0-0.1
c46455
- Update to upstream snapshot of version 0.4.0
c46455
c46455
* Mon Feb 25 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.3.1-2
c46455
- Install effective POMs into a separate directory
c46455
c46455
* Thu Feb  7 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.3.1-1
c46455
- Update to upstream version 0.3.1
c46455
c46455
* Tue Feb  5 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.3.0-1
c46455
- Update to upstream version 0.3.0
c46455
- Don't rely on JPP symlinks when resolving artifacts
c46455
- Blacklist more artifacts
c46455
- Fix dependencies
c46455
c46455
* Thu Jan 24 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.2.6-1
c46455
- Update to upstream version 0.2.6
c46455
c46455
* Mon Jan 21 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.2.5-1
c46455
- Update to upstream version 0.2.5
c46455
c46455
* Fri Jan 11 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.2.4-1
c46455
- Update to upstream version 0.2.4
c46455
c46455
* Wed Jan  9 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.2.3-1
c46455
- Update to upstream version 0.2.3
c46455
c46455
* Tue Jan  8 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.2.2-1
c46455
- Update to upstream version 0.2.2
c46455
c46455
* Tue Jan  8 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.2.1-1
c46455
- Update to upstream version 0.2.1
c46455
c46455
* Mon Jan  7 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.2.0-1
c46455
- Update to upstream version 0.2.0
c46455
- New major features: depmaps, compat symlinks, builddep MOJO
c46455
- Install effective POMs for non-POM artifacts
c46455
- Multiple major and minor bugfixes
c46455
- Drop support for resolving artifacts from %%_javajnidir
c46455
c46455
* Fri Dec  7 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.1.5-1
c46455
- Update to upstream version 0.1.5
c46455
c46455
* Fri Dec  7 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.1.4-1
c46455
- Update to upstream version 0.1.4
c46455
c46455
* Fri Dec  7 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.1.3-1
c46455
- Update to upstream version 0.1.3
c46455
c46455
* Fri Dec  7 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.1.2-1
c46455
- Update to upstream version 0.1.2
c46455
c46455
* Fri Dec  7 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.1.1-1
c46455
- Update to upstream version 0.1.1
c46455
c46455
* Thu Dec  6 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.1.0-1
c46455
- Update to upstream version 0.1.0
c46455
- Implement auto requires generator
c46455
c46455
* Mon Dec  3 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.0.2-1
c46455
- Update to upstream version 0.0.2
c46455
c46455
* Thu Nov 29 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0.0.1-1
c46455
- Update to upstream version 0.0.1
c46455
c46455
* Wed Nov 28 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0-2
c46455
- Add jpackage scripts
c46455
c46455
* Mon Nov  5 2012 Mikolaj Izdebski <mizdebsk@redhat.com> - 0-1
c46455
- Initial packaging