Sync from SUSE:SLFO:Main maven-file-management revision 80e916a5ca8fa49a0570b4378ca6a2d3

This commit is contained in:
Adrian Schröter 2024-05-03 16:37:32 +02:00
commit f281cab47b
5 changed files with 310 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
file-management-3.0.0-source-release.zip (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,178 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="file-management" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Build environment properties -->
<!-- ====================================================================== -->
<property file="build.properties"/>
<property name="project.version" value="3.0.0"/>
<property name="project.groupId" value="org.apache.maven.shared"/>
<property name="project.artifactId" value="file-management"/>
<property name="project.name" value="Apache Maven File Management API"/>
<property name="project.organization.name" value="The Apache Software Foundation"/>
<property name="spec.version" value="3.0"/>
<property name="compiler.source" value="1.8"/>
<property name="compiler.target" value="${compiler.source}"/>
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
<property name="build.dir" value="target"/>
<property name="build.outputDir" value="${build.dir}/classes"/>
<property name="build.srcDir" value="src/main/java"/>
<property name="build.resourceDir" value="src/main/resources"/>
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
<property name="build.mdoDir" value="src/main/mdo"/>
<property name="build.mdoOutputDir" value="${build.dir}/generated-sources/modello"/>
<!-- ====================================================================== -->
<!-- Defining classpaths -->
<!-- ====================================================================== -->
<path id="build.classpath">
<fileset dir="lib">
<include name="**/*.jar"/>
</fileset>
</path>
<!-- ====================================================================== -->
<!-- Cleaning up target -->
<!-- ====================================================================== -->
<target name="clean" description="Clean the output directory">
<delete dir="${build.dir}"/>
</target>
<!-- ====================================================================== -->
<!-- Code generation target -->
<!-- ====================================================================== -->
<target name="mdo" description="Generate sources from mdo files">
<mkdir dir="${build.mdoOutputDir}"/>
<macrodef name="modello-single-mode">
<attribute name="file"/>
<attribute name="mode"/>
<attribute name="version"/>
<sequential>
<exec executable="modello" failonerror="true">
<arg file="@{file}"/> <!-- model file -->
<arg value="@{mode}"/> <!-- output type -->
<arg file="${build.mdoOutputDir}"/> <!-- output directory -->
<arg value="@{version}"/> <!-- model version -->
<arg value="false"/> <!-- package with version -->
<arg value="8"/> <!-- java source -->
</exec>
</sequential>
</macrodef>
<macrodef name="modello">
<attribute name="file"/>
<attribute name="version" default="1.1.0"/>
<sequential>
<echo taskname="modello" message="Generating sources for @{file}"/>
<modello-single-mode file="@{file}" version="@{version}" mode="java"/>
<modello-single-mode file="@{file}" version="@{version}" mode="xpp3-reader"/>
<modello-single-mode file="@{file}" version="@{version}" mode="xpp3-writer"/>
</sequential>
</macrodef>
<modello file="${build.mdoDir}/fileset.mdo"/>
</target>
<!-- ====================================================================== -->
<!-- Compilation target -->
<!-- ====================================================================== -->
<target name="compile" depends="mdo" description="Compile the code">
<mkdir dir="${build.outputDir}"/>
<javac destdir="${build.outputDir}"
nowarn="false"
debug="true"
encoding="UTF-8"
optimize="false"
deprecation="true"
target="${compiler.target}"
verbose="false"
fork="false"
source="${compiler.source}">
<src>
<pathelement location="${build.srcDir}"/>
<pathelement location="${build.mdoOutputDir}"/>
</src>
<classpath refid="build.classpath"/>
</javac>
<copy todir="${build.outputDir}">
<fileset dir="${build.resourceDir}"/>
</copy>
</target>
<!-- ====================================================================== -->
<!-- Javadoc target -->
<!-- ====================================================================== -->
<target name="javadoc" depends="mdo" description="Generates the Javadoc of the application">
<path id="src.path">
<pathelement location="${build.srcDir}"/>
<pathelement location="${build.mdoOutputDir}"/>
</path>
<javadoc sourcepathref="src.path"
packagenames="*"
destdir="${reporting.outputDirectory}/apidocs"
access="protected"
source="${compiler.source}"
verbose="false"
version="true"
use="true"
author="true"
splitindex="false"
nodeprecated="false"
nodeprecatedlist="false"
notree="false"
noindex="false"
nohelp="false"
nonavbar="false"
serialwarn="false"
encoding="UTF-8"
linksource="false"
breakiterator="false">
<classpath refid="build.classpath"/>
</javadoc>
</target>
<!-- ====================================================================== -->
<!-- Package target -->
<!-- ====================================================================== -->
<target name="package" depends="compile" description="Package the application">
<jar jarfile="${build.dir}/${build.finalName}.jar"
compress="true"
index="false"
basedir="${build.outputDir}"
excludes="**/package.html">
<manifest>
<attribute name="Implementation-Title" value="${project.name}"/>
<attribute name="Implementation-URL" value="http://maven.apache.org/shared/${project.artifactId}/"/>
<attribute name="Implementation-Vendor" value="${project.organization.name}"/>
<attribute name="Implementation-Vendor-Id" value="${project.groupId}"/>
<attribute name="Implementation-Version" value="${project.version}"/>
<attribute name="JavaPackages-ArtifactId" value="${project.artifactId}"/>
<attribute name="JavaPackages-GroupId" value="${project.groupId}"/>
<attribute name="JavaPackages-Version" value="${project.version}"/>
<attribute name="Specification-Title" value="${project.name}"/>
<attribute name="Specification-Vendor" value="${project.organization.name}"/>
<attribute name="Specification-Version" value="${spec.version}"/>
</manifest>
</jar>
</target>
<!-- ====================================================================== -->
<!-- A dummy target for the package named after the type it creates -->
<!-- ====================================================================== -->
<target name="jar" depends="package" description="Builds the jar for the application"/>
</project>

View File

@ -0,0 +1,20 @@
-------------------------------------------------------------------
Wed Sep 6 18:53:17 UTC 2023 - Fridrich Strba <fstrba@suse.com>
- Remove unnecessary dependency on xmvn tools and parent pom
-------------------------------------------------------------------
Fri May 13 09:39:28 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Fix build with modello 2.0.0
-------------------------------------------------------------------
Mon Mar 21 04:43:53 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Build with java source and target levels 8
-------------------------------------------------------------------
Tue Mar 26 12:36:05 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of maven-file-management 3.0.0
- Generate and customize ant build.xml file

View File

@ -0,0 +1,86 @@
#
# spec file for package maven-file-management
#
# 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: maven-file-management
Version: 3.0.0
Release: 0
Summary: Maven File Management API
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://maven.apache.org/shared/file-management
Source0: https://repo1.maven.org/maven2/org/apache/maven/shared/file-management/%{version}/file-management-%{version}-source-release.zip
Source1: %{name}-build.xml
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: javapackages-local >= 6
BuildRequires: maven-lib
BuildRequires: maven-shared-io
BuildRequires: maven-shared-utils
BuildRequires: modello >= 2.0.0
BuildRequires: plexus-containers-container-default
BuildRequires: plexus-utils
BuildRequires: unzip
BuildArch: noarch
%description
Provides a component for plugins to easily resolve project dependencies.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%setup -q -n file-management-%{version}
cp %{SOURCE1} build.xml
%build
mkdir -p lib
build-jar-repository -s lib \
maven/maven-plugin-api \
maven-shared-io/maven-shared-io \
maven-shared-utils/maven-shared-utils \
plexus-containers/plexus-container-default \
plexus/utils
%{ant} \
jar javadoc
%install
# jar
install -dm 0755 %{buildroot}%{_javadir}/%{name}
install -pm 0644 target/file-management-%{version}.jar %{buildroot}%{_javadir}/%{name}/file-management.jar
# pom
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{name}/file-management.pom
%add_maven_depmap %{name}/file-management.pom %{name}/file-management.jar
# javadoc
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
%fdupes -s %{buildroot}%{_javadocdir}
%files -f .mfiles
%license LICENSE NOTICE
%files javadoc
%{_javadocdir}/%{name}
%license LICENSE NOTICE
%changelog