Sync from SUSE:SLFO:Main maven-script-interpreter revision 9aafc64b647673d9f5c020561eb9ad32

This commit is contained in:
Adrian Schröter 2024-05-03 16:41:38 +02:00
commit e97bca20a7
5 changed files with 289 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
maven-script-interpreter-1.3-source-release.zip (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,129 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="maven-script-interpreter" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Build environment properties -->
<!-- ====================================================================== -->
<property file="build.properties"/>
<property name="project.groupId" value="org.apache.maven.shared"/>
<property name="project.artifactId" value="maven-script-interpreter"/>
<property name="project.version" value="1.3"/>
<property name="project.name" value="Apache Maven Script Interpreter"/>
<property name="project.organization.name" value="The Apache Software Foundation"/>
<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"/>
<!-- ====================================================================== -->
<!-- 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>
<!-- ====================================================================== -->
<!-- Compilation target -->
<!-- ====================================================================== -->
<target name="compile" 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}"/>
</src>
<classpath refid="build.classpath"/>
</javac>
</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"
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="${project.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,34 @@
-------------------------------------------------------------------
Thu Apr 28 11:43:55 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Upgrade to version 1.3
* Improvement
+ [MSHARED-828] - Require Java 7
+ [MSHARED-879] - make build Reproducible
+ [MSHARED-906] - Add GitHub Action to confirm build PR
+ [MSHARED-907] - Output build log from script to maven mojo log
+ [MSHARED-910] - Redundant option failOnException
+ [MSHARED-911] - Replace AntClassLoader by RootLoader
+ [MSHARED-914] - Detailed message from failed script evaluation
shouldn't be propagated
+ [MSHARED-917] - Remove dependency to
plexus-component-annotations
+ [MSHARED-939] - Remove Apache Ivy from dependency
* Task
+ [MSHARED-960] - document how to use Grapes in a Groovy script
-------------------------------------------------------------------
Mon Mar 21 04:36:58 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Build with java source and target levels 8
-------------------------------------------------------------------
Tue May 11 15:03:57 UTC 2021 - Fridrich Strba <fstrba@suse.com>
- Do not build against the legacy guava20 package
-------------------------------------------------------------------
Fri Mar 29 07:33:58 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of maven-script-interpreter 1.2
- Generate and customize ant build.xml file

View File

@ -0,0 +1,100 @@
#
# spec file for package maven-script-interpreter
#
# Copyright (c) 2022 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-script-interpreter
Version: 1.3
Release: 0
Summary: Maven Script Interpreter
License: Apache-2.0
Group: Development/Libraries/Java
URL: https://maven.apache.org/shared/maven-script-interpreter/
Source0: https://dlcdn.apache.org/maven/shared/%{name}-%{version}-source-release.zip
Source1: %{name}-build.xml
BuildRequires: ant
BuildRequires: apache-commons-io
BuildRequires: bsh2
BuildRequires: fdupes
BuildRequires: javapackages-local
BuildRequires: slf4j
BuildRequires: unzip
Requires: mvn(commons-io:commons-io)
Requires: mvn(org.apache-extras.beanshell:bsh)
Requires: mvn(org.slf4j:slf4j-api)
BuildArch: noarch
%description
This component provides some utilities to interpret/execute some scripts for
various implementations: Groovy or BeanShell.
Groovy script is currently disabled.
%package javadoc
Summary: Javadoc for %{name}
Group: Documentation/HTML
%description javadoc
API documentation for %{name}.
%prep
%setup -q
cp %{SOURCE1} build.xml
%pom_remove_parent
%pom_xpath_inject pom:project "<groupId>org.apache.maven.shared</groupId>"
%pom_remove_dep :groovy
rm src/main/java/org/apache/maven/shared/scriptinterpreter/GroovyScriptInterpreter.java
rm src/test/java/org/apache/maven/shared/scriptinterpreter/GroovyScriptInterpreterTest.java
rm src/test/java/org/apache/maven/shared/scriptinterpreter/ScriptRunnerTest.java
sed -i /GroovyScriptInterpreter/d src/main/java/org/apache/maven/shared/scriptinterpreter/ScriptRunner.java
%build
mkdir -p lib
build-jar-repository -s lib \
bsh2/bsh \
commons-io \
slf4j/api \
slf4j/simple
%{ant} \
jar javadoc
%install
# jar
install -dm 0755 %{buildroot}%{_javadir}/%{name}
install -pm 0644 target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}/%{name}.jar
# pom
install -dm 0755 %{buildroot}%{_mavenpomdir}/%{name}
install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}/%{name}.pom
%add_maven_depmap %{name}/%{name}.pom %{name}/%{name}.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
%doc DEPENDENCIES
%files javadoc
%{_javadocdir}/%{name}
%license LICENSE NOTICE
%changelog