Benötigte Dateien erstellen

manifest.mf

Main-Class: de/mydomain/alphaagent/example/ExamplePlugin


plugin.properties

Archive = example.jar
Main-Class = de.mydomain.alphaagent.example.ExamplePlugin


build.xml

<project name="AlphaAgent" default="main" basedir=".">
	<!-- 
      ==================================================================
      ALPHAAGENT BUILDFILE
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -k
      Author: Norbert Schaefers <n.schaefers@sowas.com>
      ======================================================= 
   -->
	<property file="build.properties" />
	<property name="noparse" value="**/*.gif,**/*.exe,**/*.dll,**/*.jar,**/*.jpg" />

	<target name="main" description="--> Build the plain files, for development">
		<antcall target="build:classes" />
		<antcall target="build:jars" />
	</target> 

	<path id="cp.alpha">
		<pathelement location="alphaagent.jar" />
	</path>
		
	<!-- Erzeugt nötige Verzeichnisse für den build -->
	<target name="build:prepare">
		<mkdir dir="${build.classes}" />
        <mkdir dir="${build.classes}" />
        <copy todir="${build.classes}" overwrite="true">
            <fileset dir="${src.java}">
                <include name="lang/*.properties" />
            </fileset>
        </copy>
	</target>

	<!-- Erzeugt die class-Dateien -->
	<target name="build:classes" depends="build:prepare">
		<javac target="1.6" srcdir="${src.java}" destdir="${build.classes}" classpathref="cp.alpha" debug="${debug}">
			<include name="**/*.java" />
		</javac>
	</target>

	<!-- Kopiert alles zur Erzeugung der jar-Dateien und erzeugt diese -->
	<target name="build:jars" depends="build:prepare,build:classes">
		<mkdir dir="${build.classes}/lib" />
		<copy todir="${build.classes}" file="${src.java}/images/alphaagent.ico" />
		<copy file="${src.java}/images/alphaagent.ico" tofile="${build.classes}/alphaagent.ico" />
		<copy todir="${build.classes}/images">
			<fileset dir="${src.java}/images">
				<include name="**/*.gif" />
				<include name="**/*.png" />
			</fileset>
		</copy>
		<antcall target="build:example" />
	</target>

	<!-- Erzeugt das jar-Archiv für das Beispiel-Plugin -->
	<target name="build:example" depends="build:prepare,build:classes">
		<jar destfile="${build.classes}/example.jar" manifest="${src.java}/de/mydomain/alphaagent/example/meta-inf/manifest.mf">
			<fileset dir="${build.classes}/">
				<include name="de/mydomain/alphaagent/example/**/*.class" />
				<exclude name="**/*Test.class" />
			</fileset>
		</jar>
		<move file="${build.classes}/example.jar" tofile="${build.classes}/plugins/de.mydomain.alphaagent.example/example.jar" />
		<copy file="${src.java}/de/mydomain/alphaagent/example/plugin.properties" tofile="${build.classes}/plugins/de.mydomain.alphaagent.example/plugin.properties" />
		<copy todir="${build.classes}/plugins/de.mydomain.alphaagent.example/images">
			<fileset dir="${src.java}/de/mydomain/alphaagent/example/images">
				<include name="**/*" />
			</fileset>
		</copy>
	</target>

	<target name="build:clean"> 
		<delete dir="${build}" includeEmptyDirs="true" />
	</target>

</project>


build.properties

debug=true

build=build
build.classes=${build}/classes

src=src
src.java=${src}/java



Weiter

 

Strict Standards: Only variables should be passed by reference in /homepages/32/d69930110/htdocs/de.alphaagent/index.php on line 80