OBS-URL: https://build.opensuse.org/package/show/Java:packages/maven-script-interpreter?expand=0&rev=8
This commit is contained in:
parent
55b4e5c052
commit
a45198d586
3
maven-script-interpreter-1.2-source-release.zip
Normal file
3
maven-script-interpreter-1.2-source-release.zip
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7ba2559ad70ca48d96a08be9243a40e3563cdd518945a36a58d188a1ce859709
|
||||
size 36768
|
BIN
maven-script-interpreter-1.3-source-release.zip
(Stored with Git LFS)
BIN
maven-script-interpreter-1.3-source-release.zip
(Stored with Git LFS)
Binary file not shown.
@ -10,7 +10,7 @@
|
||||
|
||||
<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.version" value="1.2"/>
|
||||
<property name="project.name" value="Apache Maven Script Interpreter"/>
|
||||
<property name="project.organization.name" value="The Apache Software Foundation"/>
|
||||
|
||||
@ -22,7 +22,10 @@
|
||||
<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="build.testOutputDir" value="${build.dir}/test-classes"/>
|
||||
<property name="build.testDir" value="src/test/java"/>
|
||||
<property name="build.testResourceDir" value="src/test/resources"/>
|
||||
<property name="test.reports" value="${build.dir}/test-reports"/>
|
||||
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
@ -34,6 +37,11 @@
|
||||
<include name="**/*.jar"/>
|
||||
</fileset>
|
||||
</path>
|
||||
<path id="build.test.classpath">
|
||||
<fileset dir="lib">
|
||||
<include name="**/*.jar"/>
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Cleaning up target -->
|
||||
@ -66,6 +74,129 @@
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Target to generate Plexus component.xml -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="plexus"
|
||||
depends="compile"
|
||||
description="Generate Plexus component.xml">
|
||||
<mkdir dir="${build.outputDir}/META-INF/plexus"/>
|
||||
<java classname="org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
|
||||
failonerror="true"
|
||||
fork="true">
|
||||
<!-- <jvmarg value="-verbose"/> -->
|
||||
<classpath>
|
||||
<path refid="build.classpath"/>
|
||||
<pathelement location="${build.outputDir}"/>
|
||||
</classpath>
|
||||
<arg value="-X"/>
|
||||
<arg value="-s"/>
|
||||
<arg value="${build.srcDir}"/>
|
||||
<arg value="-c"/>
|
||||
<arg value="${build.outputDir}"/>
|
||||
<arg value="-m"/>
|
||||
<arg value="${build.outputDir}/META-INF/plexus"/>
|
||||
<arg value="-o"/>
|
||||
<arg value="${build.outputDir}/META-INF/plexus/components.xml"/>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Test-compilation target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="compile-tests"
|
||||
depends="plexus"
|
||||
description="Compile the test code"
|
||||
unless="test.skip">
|
||||
<mkdir dir="${build.testOutputDir}"/>
|
||||
<javac destdir="${build.testOutputDir}"
|
||||
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.testDir}"/>
|
||||
</src>
|
||||
<classpath>
|
||||
<path refid="build.test.classpath"/>
|
||||
<pathelement location="${build.outputDir}"/>
|
||||
</classpath>
|
||||
</javac>
|
||||
<copy todir="${build.testOutputDir}">
|
||||
<fileset dir="${build.testResourceDir}"/>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Run all tests -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="test"
|
||||
depends="compile-tests, junit-missing"
|
||||
unless="junit.skipped"
|
||||
description="Run the test cases">
|
||||
<mkdir dir="${test.reports}"/>
|
||||
<junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
|
||||
<sysproperty key="basedir" value="."/>
|
||||
<formatter type="xml"/>
|
||||
<formatter type="plain" usefile="false"/>
|
||||
<classpath>
|
||||
<path refid="build.test.classpath"/>
|
||||
<pathelement location="${build.outputDir}"/>
|
||||
<pathelement location="${build.testOutputDir}"/>
|
||||
</classpath>
|
||||
<batchtest todir="${test.reports}" unless="test">
|
||||
<fileset dir="${build.testDir}">
|
||||
<include name="**/Test*.java"/>
|
||||
<include name="**/*Test.java"/>
|
||||
<include name="**/*TestCase.java"/>
|
||||
<exclude name="**/*Abstract*Test.java"/>
|
||||
</fileset>
|
||||
</batchtest>
|
||||
<batchtest todir="${test.reports}" if="test">
|
||||
<fileset dir="${build.testDir}">
|
||||
<include name="**/${test}.java"/>
|
||||
<exclude name="**/*Abstract*Test.java"/>
|
||||
</fileset>
|
||||
</batchtest>
|
||||
</junit>
|
||||
</target>
|
||||
|
||||
<target name="test-junit-present">
|
||||
<available classname="junit.framework.Test" property="junit.present" classpathref="build.test.classpath"/>
|
||||
</target>
|
||||
|
||||
<target name="test-junit-status"
|
||||
depends="test-junit-present">
|
||||
<condition property="junit.missing">
|
||||
<and>
|
||||
<isfalse value="${junit.present}"/>
|
||||
<isfalse value="${test.skip}"/>
|
||||
</and>
|
||||
</condition>
|
||||
<condition property="junit.skipped">
|
||||
<or>
|
||||
<isfalse value="${junit.present}"/>
|
||||
<istrue value="${test.skip}"/>
|
||||
</or>
|
||||
</condition>
|
||||
</target>
|
||||
|
||||
<target name="junit-missing"
|
||||
depends="test-junit-status"
|
||||
if="junit.missing">
|
||||
<echo>=================================== WARNING ===================================</echo>
|
||||
<echo> JUnit is not present in the test classpath or your $ANT_HOME/lib directory. Tests not executed.</echo>
|
||||
<echo>===============================================================================</echo>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Javadoc target -->
|
||||
<!-- ====================================================================== -->
|
||||
@ -99,7 +230,7 @@
|
||||
<!-- Package target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="package" depends="compile" description="Package the application">
|
||||
<target name="package" depends="plexus,test" description="Package the application">
|
||||
<jar jarfile="${build.dir}/${build.finalName}.jar"
|
||||
compress="true"
|
||||
index="false"
|
||||
|
@ -16,23 +16,45 @@
|
||||
#
|
||||
|
||||
|
||||
%bcond_with tests
|
||||
Name: maven-script-interpreter
|
||||
Version: 1.3
|
||||
Version: 1.2
|
||||
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
|
||||
Source0: https://repo1.maven.org/maven2/org/apache/maven/shared/%{name}/%{version}/%{name}-%{version}-source-release.zip
|
||||
Source1: %{name}-build.xml
|
||||
BuildRequires: ant
|
||||
BuildRequires: apache-commons-io
|
||||
BuildRequires: apache-commons-cli
|
||||
BuildRequires: atinject
|
||||
BuildRequires: bsh2
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: google-guice
|
||||
BuildRequires: guava
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: slf4j
|
||||
BuildRequires: jdom2
|
||||
BuildRequires: maven-lib
|
||||
BuildRequires: maven-shared-utils
|
||||
BuildRequires: objectweb-asm
|
||||
BuildRequires: plexus-classworlds
|
||||
BuildRequires: plexus-cli
|
||||
BuildRequires: plexus-containers-component-annotations
|
||||
BuildRequires: plexus-metadata-generator
|
||||
BuildRequires: plexus-utils
|
||||
BuildRequires: qdox
|
||||
BuildRequires: sisu-inject
|
||||
BuildRequires: sisu-plexus
|
||||
BuildRequires: unzip
|
||||
BuildRequires: xbean
|
||||
BuildRequires: xmvn-install
|
||||
BuildRequires: xmvn-resolve
|
||||
BuildRequires: mvn(org.apache.maven.shared:maven-shared-components:pom:)
|
||||
BuildArch: noarch
|
||||
%if %{with tests}
|
||||
BuildRequires: ant-junit
|
||||
%endif
|
||||
|
||||
%description
|
||||
This component provides some utilities to interpret/execute some scripts for
|
||||
@ -51,9 +73,6 @@ API documentation for %{name}.
|
||||
%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
|
||||
@ -63,35 +82,41 @@ sed -i /GroovyScriptInterpreter/d src/main/java/org/apache/maven/shared/scriptin
|
||||
%build
|
||||
mkdir -p lib
|
||||
build-jar-repository -s lib \
|
||||
atinject \
|
||||
bsh2/bsh \
|
||||
commons-io \
|
||||
slf4j/api \
|
||||
slf4j/simple
|
||||
commons-cli \
|
||||
guava/guava \
|
||||
guice/google-guice-no_aop \
|
||||
jdom2/jdom2 \
|
||||
maven/maven-plugin-api \
|
||||
maven-shared-utils/maven-shared-utils \
|
||||
objectweb-asm/asm \
|
||||
org.eclipse.sisu.inject \
|
||||
org.eclipse.sisu.plexus \
|
||||
plexus-classworlds \
|
||||
plexus/cli \
|
||||
plexus-containers/plexus-component-annotations \
|
||||
plexus-metadata-generator \
|
||||
plexus/utils \
|
||||
qdox \
|
||||
xbean/xbean-reflect
|
||||
|
||||
%ant \
|
||||
%{ant} \
|
||||
-Dtest.skip=true \
|
||||
jar javadoc
|
||||
|
||||
%{mvn_artifact} pom.xml target/%{name}-%{version}.jar
|
||||
|
||||
%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}/
|
||||
%mvn_install
|
||||
%fdupes -s %{buildroot}%{_javadocdir}
|
||||
|
||||
%files -f .mfiles
|
||||
%license LICENSE NOTICE
|
||||
%doc DEPENDENCIES
|
||||
%license LICENSE
|
||||
%doc DEPENDENCIES NOTICE
|
||||
|
||||
%files javadoc
|
||||
%{_javadocdir}/%{name}
|
||||
%license LICENSE NOTICE
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
%license LICENSE
|
||||
%doc NOTICE
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user