Sync from SUSE:ALP:Source:Standard:1.0 tomcat-jakartaee-migration revision 398ddef4d75e0750652fd225f8630b8e

This commit is contained in:
Adrian Schröter 2023-12-19 16:29:22 +01:00
commit 5cbd2b0c6c
5 changed files with 262 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
jakartaee-migration-1.0.7-src.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="jakartaee-migration" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Build environment properties -->
<!-- ====================================================================== -->
<property file="build.properties"/>
<property name="project.groupId" value="org.apache.tomcat"/>
<property name="project.artifactId" value="jakartaee-migration"/>
<property name="spec.version" value="1.0"/>
<property name="project.version" value="${spec.version}.7"/>
<property name="compiler.release" value="8"/>
<property name="compiler.source" value="1.${compiler.release}"/>
<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"/>
<!-- ====================================================================== -->
<!-- Defining classpaths -->
<!-- ====================================================================== -->
<path id="build.classpath">
<fileset dir="lib">
<include name="**/*"/>
</fileset>
</path>
<path id="build.test.classpath">
<fileset dir="lib">
<include name="**/*"/>
</fileset>
</path>
<!-- ====================================================================== -->
<!-- Cleaning up target -->
<!-- ====================================================================== -->
<target name="clean" description="Clean the output directory">
<delete dir="${build.dir}"/>
</target>
<!-- ====================================================================== -->
<!-- Compilation target -->
<!-- ====================================================================== -->
<target name="compile" description="Compile the code">
<mkdir dir="${build.outputDir}"/>
<javac destdir="${build.outputDir}"
nowarn="false"
debug="true"
optimize="false"
deprecation="true"
release="${compiler.release}"
target="${compiler.target}"
verbose="false"
fork="false"
source="${compiler.source}">
<src>
<pathelement location="${build.srcDir}"/>
</src>
<classpath refid="build.classpath"/>
</javac>
<copy todir="${build.outputDir}">
<fileset dir="${build.resourceDir}"/>
</copy>
</target>
<!-- ====================================================================== -->
<!-- Javadoc target -->
<!-- ====================================================================== -->
<target name="javadoc" description="Generates the Javadoc of the application">
<javadoc sourcepath="${build.srcDir}"
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"
charset="ISO-8859-1"
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="Apache Tomcat Migration Tool for Jakarta EE"/>
<attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
<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="Main-Class" value="org.apache.tomcat.jakartaee.MigrationCLI"/>
<attribute name="Specification-Title" value="Apache Tomcat Migration Tool for Jakarta EE"/>
<attribute name="Specification-Vendor" value="The Apache Software Foundation"/>
<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,5 @@
-------------------------------------------------------------------
Tue Nov 14 10:51:23 UTC 2023 - Michele Bussolotto <michele.bussolotto@suse.com>
- initial packaging of tomcat-jakartaee-migration 1.0.7

View File

@ -0,0 +1,94 @@
#
# spec file for package tomcat-jakartaee-migration
#
# 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/
#
%global artifactId jakartaee-migration
Name: tomcat-jakartaee-migration
Version: 1.0.7
Release: 0
Summary: Tomcat JakartaEE Migration
License: Apache-2.0
URL: https://tomcat.apache.org/download-migration.cgi
Source0: https://archive.apache.org/dist/tomcat/%{artifactId}/v%{version}/source/%{artifactId}-%{version}-src.tar.gz
Source1: %{name}-build.xml
BuildRequires: ant
BuildRequires: bcel
BuildRequires: commons-compress
BuildRequires: commons-io
BuildRequires: commons-lang3
BuildRequires: javapackages-local
Requires: bcel
Requires: commons-compress
Requires: commons-io
Requires: commons-lang3
Requires: javapackages-tools
BuildArch: noarch
%description
The purpose of the tool is to take a web application written for
Java EE 8 that runs on Apache Tomcat 9 and convert it automatically
so it runs on Apache Tomcat 10 which implements Jakarta EE 9.
The tool can be used from the command line or as an Ant task.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
This package contains the API documentation for %{name}.
%prep
%setup -q -n %{artifactId}-%{version}
cp %{SOURCE1} build.xml
%build
mkdir -p lib
build-jar-repository -s lib bcel commons-compress commons-io ant/ant
%{ant} jar javadoc
%install
# jar
install -dm 0755 %{buildroot}%{_javadir}/%{name}
install -pm 0755 target/%{artifactId}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{artifactId}.jar
# pom
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{artifactId}.pom
%add_maven_depmap %{name}/%{artifactId}.pom %{name}/%{artifactId}.jar
# javadoc
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
cp -r target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}
# script
%jpackage_script org.apache.tomcat.jakartaee.MigrationCLI "" "" %{name}:bcel:commons-compress:commons-io:commons-lang3 javax2jakarta true
# ant
install -d -m 0755 %{buildroot}%{_sysconfdir}/ant.d
echo "%{name} bcel commons-compress commons-io commons-lang3" > %{buildroot}%{_sysconfdir}/ant.d/%{name}
%files -f .mfiles
%{_bindir}/javax2jakarta
%{_sysconfdir}/ant.d/%{name}
%license LICENSE.txt NOTICE.txt
%doc README.md CHANGES.md
%files javadoc
%{_javadocdir}/%{name}
%changelog