forked from pool/buildnumber-maven-plugin
111 lines
4.4 KiB
RPMSpec
111 lines
4.4 KiB
RPMSpec
#
|
|
# spec file for package buildnumber-maven-plugin
|
|
#
|
|
# Copyright (c) 2023 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: buildnumber-maven-plugin
|
|
Version: 1.3
|
|
Release: 0
|
|
Summary: Build Number Maven Plugin
|
|
License: Apache-2.0 AND MIT
|
|
URL: http://svn.codehaus.org/mojo/tags/buildnumber-maven-plugin-%{version}
|
|
Source0: https://repo1.maven.org/maven2/org/codehaus/mojo/%{name}/%{version}/%{name}-%{version}-source-release.zip
|
|
Source1: http://www.apache.org/licenses/LICENSE-2.0.txt
|
|
BuildRequires: fdupes
|
|
BuildRequires: java-devel >= 1.8
|
|
BuildRequires: maven-local
|
|
BuildRequires: unzip
|
|
BuildRequires: mvn(net.java.dev.jna:jna)
|
|
BuildRequires: mvn(org.apache.maven.plugin-tools:maven-plugin-annotations)
|
|
BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin)
|
|
BuildRequires: mvn(org.apache.maven.scm:maven-scm-api)
|
|
BuildRequires: mvn(org.apache.maven.scm:maven-scm-manager-plexus)
|
|
BuildRequires: mvn(org.apache.maven.scm:maven-scm-provider-bazaar)
|
|
BuildRequires: mvn(org.apache.maven.scm:maven-scm-provider-clearcase)
|
|
BuildRequires: mvn(org.apache.maven.scm:maven-scm-provider-cvsexe)
|
|
BuildRequires: mvn(org.apache.maven.scm:maven-scm-provider-gitexe)
|
|
BuildRequires: mvn(org.apache.maven.scm:maven-scm-provider-hg)
|
|
BuildRequires: mvn(org.apache.maven.scm:maven-scm-provider-perforce)
|
|
BuildRequires: mvn(org.apache.maven.scm:maven-scm-provider-starteam)
|
|
BuildRequires: mvn(org.apache.maven.scm:maven-scm-provider-svn-commons)
|
|
BuildRequires: mvn(org.apache.maven.scm:maven-scm-provider-svnexe)
|
|
BuildRequires: mvn(org.apache.maven:maven-compat)
|
|
BuildRequires: mvn(org.apache.maven:maven-core)
|
|
BuildRequires: mvn(org.apache.maven:maven-plugin-api)
|
|
BuildRequires: mvn(org.apache.maven:maven-settings)
|
|
BuildRequires: mvn(org.codehaus.mojo:mojo-parent:pom:)
|
|
BuildRequires: mvn(org.codehaus.plexus:plexus-container-default)
|
|
BuildRequires: mvn(org.codehaus.plexus:plexus-utils)
|
|
BuildArch: noarch
|
|
|
|
%description
|
|
This mojo is designed to get a unique build number for each time you build
|
|
your project. So while your version may remain constant at 1.0-SNAPSHOT
|
|
for many iterations until release, you will have a build number that can
|
|
uniquely identify each build during that time. The build number is obtained
|
|
from scm, and in particular, at this time, from svn. You can then place that
|
|
build number in metadata, which can be accessed from your app, if desired.
|
|
|
|
The mojo also has a couple of extra functions to ensure you get the proper
|
|
build number. First, your local repository is checked to make sure it is
|
|
up to date. Second, your local repository is automatically updated, so that
|
|
you get the latest build number. Both these functions can be suppressed,
|
|
if desired.
|
|
|
|
Optionally, you can configure this mojo to produce a revision based on a
|
|
timestamp, or on a sequence, without requiring any interaction with an
|
|
SCM system. Note that currently, the only supported SCM is subversion.
|
|
|
|
%package javadoc
|
|
Summary: Javadoc for %{name}
|
|
|
|
%description javadoc
|
|
API documentation for %{name}.
|
|
|
|
%prep
|
|
%setup -q
|
|
cp -p %{SOURCE1} .
|
|
|
|
# migrate to maven 3
|
|
%pom_xpath_set pom:properties/pom:maven.api.version 3.8.6
|
|
%pom_change_dep :maven-project :maven-compat
|
|
|
|
%pom_xpath_set pom:properties/pom:maven.compiler.source 1.8
|
|
%pom_xpath_set pom:properties/pom:maven.compiler.target 1.8
|
|
%pom_xpath_set pom:properties/pom:mojo.java.target 8
|
|
|
|
%pom_remove_dep com.google.code.maven-scm-provider-svnjava:maven-scm-provider-svnjava
|
|
%pom_remove_dep org.tmatesoft.svnkit:svnkit
|
|
%pom_remove_plugin :maven-enforcer-plugin
|
|
%pom_remove_plugin :maven-invoker-plugin
|
|
|
|
%build
|
|
%{mvn_build} -f -- -Dsource=8
|
|
|
|
%install
|
|
%mvn_install
|
|
%fdupes -s %{buildroot}%{_javadocdir}
|
|
|
|
%files -f .mfiles
|
|
%license LICENSE.txt
|
|
%doc LICENSE-2.0.txt
|
|
|
|
%files javadoc -f .mfiles-javadoc
|
|
%license LICENSE.txt
|
|
%doc LICENSE-2.0.txt
|
|
|
|
%changelog
|