get maven 1.0.2 working

This commit is contained in:
Some One committed 2025-09-21 17:18:28 +02:00
1 parent d689f8ef20
commit f4ab9f48c6
48 files changed
+2384 -40

No files matched your search

@@ -0,0 +1,30 @@
{stdenv, fetchurl, fetchFromGitHub, jdk6, ant_1_7, commons-jelly, junit_3_8_1}: stdenv.mkDerivation rec {
pname = "commons-jelly-tags-interaction";
version = "1.0";
outJar = "commons-jelly-tags-interaction-1.0-SNAPSHOT.jar";
org = "commons-jelly";
src = fetchFromGitHub {
owner = "apache";
repo = pname;
rev = "717379e1b4db3edcc1404bd33242d6342530ad88";
hash = "sha256-FACLrmbwn7Z0eYc7vb54O35Lu9j/a+7dB0+Jv6/xDUk=";
};
nativeBuildInputs = [jdk6 ant_1_7];
env = {
JAVA_HOME="${jdk6}";
CLASSPATH="${commons-jelly}/commons-jelly-1.0-beta-4-SNAPSHOT.jar:${junit_3_8_1}/junit.jar";
};
buildPhase = ''
cd jelly-tags/interaction
ant dist
'';
installPhase = ''
mkdir $out
cp -r ./dist/* $out/
'';
}
+36
View File
@@ -0,0 +1,36 @@
{stdenv, fetchsvn, jdk6, ant_1_7, mavenDep, commons-jelly, commons-logging_1_0_3, werkz, fake-maven, commons-jelly-tags-ant,
commons-grant}: stdenv.mkDerivation rec {
pname = "maven-jelly-tags";
version = "1.0.1";
outJar = "maven-jelly-tags-1.0.1.jar";
org = "maven";
src = fetchsvn {
url = "https://svn.apache.org/repos/asf/maven/maven-1/jelly-tags/tags/MAVEN_JELLY_TAGS_1_0_1";
rev = "1928317";
hash = "sha256-GeCVa/BzFqL5DrNVagWIZtn+fLs5+SpiDl7B6IuKj7w=";
};
patches = [./commons-jelly-tags-maven.patch];
nativeBuildInputs = [jdk6 ant_1_7
(mavenDep commons-jelly {})
(mavenDep commons-logging_1_0_3 {})
(mavenDep werkz {})
(mavenDep fake-maven {})
(mavenDep commons-jelly-tags-ant {})
(mavenDep commons-grant {})];
env = {
JAVA_HOME="${jdk6}";
};
buildPhase = ''
ant dist
'';
installPhase = ''
mkdir $out
cp -r ./dist/* $out/
'';
}
+302
View File
@@ -0,0 +1,302 @@
diff --git a/build.xml b/build.xml
new file mode 100644
index 0000000..6e06165
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--build.xml generated by maven from project.xml version 1.0.1
+ on date September 21 2025, time 1229-->
+<project default="jar" name="maven-jelly-tags" basedir=".">
+ <!--Load local and user build preferences-->
+ <property file="build.properties"></property>
+ <property file="${user.home}/build.properties"></property>
+ <!--Build properties-->
+ <property name="defaulttargetdir" value="${basedir}/target"></property>
+ <property name="libdir" value="${user.home}/.maven/repository"></property>
+ <property name="classesdir" value="${basedir}/target/classes"></property>
+ <property name="testclassesdir" value="${basedir}/target/test-classes"></property>
+ <property name="testreportdir" value="${basedir}/target/test-reports"></property>
+ <property name="distdir" value="${basedir}/dist"></property>
+ <property name="javadocdir" value="${basedir}/dist/docs/api"></property>
+ <property name="final.name" value="maven-jelly-tags-1.0.1"></property>
+ <property name="proxy.host" value=""></property>
+ <property name="proxy.port" value=""></property>
+ <property name="proxy.username" value=""></property>
+ <property name="proxy.password" value=""></property>
+ <path id="build.classpath">
+ <pathelement location="${libdir}/commons-jelly/jars/commons-jelly-20030902.160215.jar"></pathelement>
+ <pathelement location="${libdir}/commons-graph/jars/commons-graph-0.8.1.jar"></pathelement>
+ <pathelement location="${libdir}/fake-maven/jars/fake-maven-1.0.jar"></pathelement>
+ <pathelement location="${libdir}/werkz/jars/werkz-20040426.222000.jar"></pathelement>
+ <pathelement location="${libdir}/ant/jars/ant-1.5.3-1.jar"></pathelement>
+ <pathelement location="${libdir}/commons-logging/jars/commons-logging-1.0.3.jar"></pathelement>
+ <pathelement location="${libdir}/commons-grant/jars/commons-grant-1.0-beta-4.jar"></pathelement>
+ <pathelement location="${libdir}/commons-jelly/jars/commons-jelly-tags-ant-1.0.jar"></pathelement>
+ <pathelement location="${libdir}/commons-lang/jars/commons-lang-2.0.jar"></pathelement>
+ </path>
+ <target name="init" description="o Initializes some properties">
+ <mkdir dir="${libdir}"></mkdir>
+ <!--Test if JUNIT is present in ANT classpath-->
+ <available property="Junit.present" classname="junit.framework.Test"></available>
+ </target>
+ <target name="compile" description="o Compile the code">
+ <mkdir dir="${classesdir}"></mkdir>
+ <javac destdir="${classesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
+ <src>
+ <pathelement location="${basedir}/src/java/main"></pathelement>
+ </src>
+ <classpath refid="build.classpath"></classpath>
+ </javac>
+ </target>
+ <target name="jar" description="o Create the jar" depends="compile,test">
+ <jar jarfile="${defaulttargetdir}/${final.name}.jar" excludes="**/package.html" basedir="${classesdir}"></jar>
+ </target>
+ <target name="clean" description="o Clean up the generated directories">
+ <delete dir="${defaulttargetdir}"></delete>
+ <delete dir="${distdir}"></delete>
+ </target>
+ <target name="dist" description="o Create a distribution" depends="jar, javadoc">
+ <mkdir dir="dist"></mkdir>
+ <copy todir="dist">
+ <fileset dir="${defaulttargetdir}" includes="*.jar"></fileset>
+ <fileset dir="${basedir}" includes="LICENSE*, README*"></fileset>
+ </copy>
+ </target>
+ <target name="test" description="o Run the test cases" if="test.failure" depends="internal-test">
+ <fail message="There were test failures."></fail>
+ </target>
+ <target name="internal-test" if="Junit.present" depends="junit-present,compile-tests">
+ <mkdir dir="${testreportdir}"></mkdir>
+ <junit dir="${basedir}" failureproperty="test.failure" printSummary="yes" fork="true" haltonerror="true">
+ <sysproperty key="basedir" value="."></sysproperty>
+ <formatter type="xml"></formatter>
+ <formatter usefile="false" type="plain"></formatter>
+ <classpath>
+ <path refid="build.classpath"></path>
+ <pathelement path="${testclassesdir}"></pathelement>
+ <pathelement path="${classesdir}"></pathelement>
+ </classpath>
+ <batchtest todir="${testreportdir}">
+ <fileset dir="${basedir}/src/java/test">
+ <include name="**/*Test.java"></include>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+ <target name="junit-present" unless="Junit.present" depends="init">
+ <echo>================================= WARNING ================================</echo>
+ <echo>Junit isn't present in your ${ANT_HOME}/lib directory. Tests not executed.</echo>
+ <echo>==========================================================================</echo>
+ </target>
+ <target name="compile-tests" if="Junit.present" depends="junit-present,compile">
+ <mkdir dir="${testclassesdir}"></mkdir>
+ <javac destdir="${testclassesdir}" deprecation="true" debug="true" optimize="false" excludes="**/package.html">
+ <src>
+ <pathelement location="${basedir}/src/java/test"></pathelement>
+ </src>
+ <classpath>
+ <path refid="build.classpath"></path>
+ <pathelement path="${classesdir}"></pathelement>
+ </classpath>
+ </javac>
+ </target>
+ <target name="javadoc" description="o Generate javadoc">
+ <mkdir dir="${javadocdir}"></mkdir>
+ <tstamp>
+ <format pattern="2001-yyyy" property="year"></format>
+ </tstamp>
+ <property name="copyright" value="Copyright &amp;copy; Apache Software Foundation. All Rights Reserved."></property>
+ <property name="title" value="Maven Jelly Tag Library 1.0.1 API"></property>
+ <javadoc use="true" private="true" destdir="${javadocdir}" author="true" version="true" sourcepath="${basedir}/src/java/main" packagenames="org.apache.maven.jelly.tags.*">
+ <classpath>
+ <path refid="build.classpath"></path>
+ </classpath>
+ </javadoc>
+ </target>
+</project>
diff --git a/src/java/main/org/apache/maven/jelly/tags/maven/GraphDependencyResolver.java b/src/java/main/org/apache/maven/jelly/tags/maven/GraphDependencyResolver.java
deleted file mode 100644
index 41ef723..0000000
--- a/src/java/main/org/apache/maven/jelly/tags/maven/GraphDependencyResolver.java
+++ /dev/null
@@ -1,178 +0,0 @@
-package org.apache.maven.jelly.tags.maven;
-
-/* ====================================================================
- * Copyright 2001-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ====================================================================
- */
-
-import org.apache.commons.graph.domain.dependency.DependencyGraph;
-import org.apache.maven.project.Dependency;
-import org.apache.maven.project.Project;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Takes a list of maven projects and determines the overall
- * dependency ordering among the project.
- *
- * @author <a href="mailto:jason@zenplex.com">Jason van Zyl</a>
- * @version $Id: GraphDependencyResolver.java 112246 2004-11-06 14:18:06Z $
- */
-public class GraphDependencyResolver implements DependencyResolverInterface
-{
- /**
- * The dependency graph.
- */
- private DependencyGraph dependencyGraph;
-
- /**
- * List of maven projects to analyse.
- */
- private List projects;
-
- /**
- * Flag to indicate whether the graph has been built.
- */
- private boolean graphBuilt;
-
- /**
- * Default constructor.
- */
- public GraphDependencyResolver()
- {
- dependencyGraph = new DependencyGraph();
- projects = new ArrayList();
- graphBuilt = false;
- }
-
- /**
- * @see org.apache.maven.jelly.tags.maven.DependencyResolverInterface#clear()
- */
- public void clear()
- {
- graphBuilt = false;
- projects.clear();
- }
-
- /**
- * @see org.apache.maven.jelly.tags.maven.DependencyResolverInterface#setProjects(List)
- */
- public void setProjects( List projects )
- {
- this.projects = projects;
- }
-
- /**
- * @see org.apache.maven.jelly.tags.maven.DependencyResolverInterface#getSortedDependencies(Project)
- */
- public List getSortedDependencies( Project project )
- {
- return getSortedDependencies( project, false );
- }
-
- /**
- * @see org.apache.maven.jelly.tags.maven.DependencyResolverInterface#getSortedDependencies(Project, boolean)
- */
- public List getSortedDependencies( Project project, boolean sourceBuild )
- {
- buildGraph();
- List sortedDependencies = dependencyGraph.getSortedDependencies( project );
-
- if ( sourceBuild )
- {
- return sortedDependencies;
- }
-
- return getBinaryDependencies( sortedDependencies );
- }
-
- /**
- * @see org.apache.maven.jelly.tags.maven.DependencyResolverInterface#getSortedDependencies(boolean)
- */
- public List getSortedDependencies( boolean sourceBuild )
- {
- buildGraph();
-
- List sortedDependencies = dependencyGraph.getSortedDependencies();
-
- if ( sourceBuild )
- {
- return sortedDependencies;
- }
-
- return getBinaryDependencies( sortedDependencies );
- }
-
- /**
- * Get dependency graph for a build based on binary inputs.
- *
- * @param sortedDependencies List of projects that have been dependency sorted.
- * @return The list of projects.
- */
- private List getBinaryDependencies( List sortedDependencies )
- {
- HashMap idMap = new HashMap();
- for ( Iterator i = projects.iterator(); i.hasNext(); )
- {
- Project p = (Project) i.next();
- idMap.put( p.getId(), p );
- }
-
- List binaryDeps = new ArrayList();
- for ( Iterator i = sortedDependencies.iterator(); i.hasNext(); )
- {
- Project p = (Project) i.next();
-
- Project dep = (Project) idMap.get( p.getId() );
- if ( dep != null )
- {
- binaryDeps.add( dep );
- }
- }
-
- return binaryDeps;
- }
-
- /**
- * Build the dependency graph.
- */
- private void buildGraph()
- {
- if ( graphBuilt )
- {
- return;
- }
-
- for ( Iterator i = projects.iterator(); i.hasNext(); )
- {
- Project p = (Project) i.next();
-
- ArrayList dependencies = new ArrayList();
- for ( Iterator j = p.getDependencies().iterator(); j.hasNext(); )
- {
- Dependency d = (Dependency) j.next();
- Project dependentProject = new Project();
- dependentProject.setId( d.getId() );
- dependencies.add( dependentProject );
- }
-
- dependencyGraph.addDependencies( p, dependencies );
- }
- graphBuilt = true;
- }
-}
@@ -0,0 +1,30 @@
{stdenv, fetchurl, fetchFromGitHub, jdk6, ant_1_7, commons-jelly, velocity_1_3, junit_3_8_1, commons-collections_2_1}: stdenv.mkDerivation rec {
pname = "commons-jelly-tags-velocity";
version = "1.0";
outJar = "commons-jelly-tags-velocity-1.0-SNAPSHOT.jar";
org = "commons-jelly";
src = fetchFromGitHub {
owner = "apache";
repo = pname;
rev = "717379e1b4db3edcc1404bd33242d6342530ad88";
hash = "sha256-FACLrmbwn7Z0eYc7vb54O35Lu9j/a+7dB0+Jv6/xDUk=";
};
nativeBuildInputs = [jdk6 ant_1_7];
env = {
JAVA_HOME="${jdk6}";
CLASSPATH="${commons-jelly}/commons-jelly-1.0-beta-4-SNAPSHOT.jar:${velocity_1_3}/velocity-1.3.jar:${junit_3_8_1}/junit.jar:${commons-collections_2_1}/commons-collections.jar";
};
buildPhase = ''
cd jelly-tags/velocity
ant dist
'';
installPhase = ''
mkdir $out
cp -r ./dist/* $out/
'';
}