alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Java example source code file (build.xml)

This example Java source code file (build.xml) is included in the alvinalexander.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Learn more about this Java project at its project page.

Java - Java tags/keywords

ant, maven, test-142bininding, test-150binding, test-api166, test-binding166, test-incompatiblemultibinding, test-match, test-mismatch-1511api, test-mismatch-1511binding, test-mixed-17, test-securitymanager, this, when

The build.xml Java example source code

<project name="integration" default="testAll" basedir=".">

	<!--
		This build file is usually run indirectly via Maven.
		
		When running this build file through Ant directly, you must
		define the currentVersion property on the command line, e.g.:
		
		ant  -DcurrentVersion=1.5.4-SNAPSHOT	
	-->
	
	<echo message="compile classpath: ${compile_classpath}" />
	<echo message="runtime classpath: ${runtime_classpath}" />
	<echo message="test classpath:    ${test_classpath}" />
	<echo message="plugin classpath:  ${plugin_classpath}" />
	<echo message="basedir:  ${basedir}" />


  <!--


	<path id="path142Binding">
		<pathelement location="target/test-classes/" />
		<pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" />
		<pathelement location="./lib/slf4j-simple-1.4.2.jar" />
	</path >

	<path id="path150Binding">
		<pathelement location="target/test-classes/" />
		<pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" />
		<pathelement location="./lib/slf4j-simple-1.5.0.jar" />
	</path >

	<path id="path1511API">
		<pathelement location="target/test-classes/" />
		<pathelement location="./lib/slf4j-api-1.5.11.jar" />
		<pathelement location="../slf4j-simple/target/slf4j-simple-${currentVersion}.jar" />
	</path >

	<path id="path1511Binding">
		<pathelement location="target/test-classes/" />
		<pathelement location="../slf4j-api/target/slf4j-api-${currentVersion}.jar" />
		<pathelement location="./lib/slf4j-simple-1.5.11.jar" />
	</path >

  <!--
    <property name="path_to_policy" value="file:./integration/src/policy/java-under-ant.policy"/>
  </target>

  <target name="setPathToPolicy_FromIntegration" if="runFromWithinIntegrationModule">
    <echo>setPathToPolicy_FromInegration 
    <property name="path_to_policy" value="file:./src/policy/java-under-ant.policy"/>
  </target>


	<target name="testActiveSecurityManager" depends="setPathToPolicy_FromTop, setPathToPolicy_FromIntegration">
		<junit printsummary="yes" fork="no" haltonfailure="yes">
      <jvmarg value="-Djava.security.manager"/>
      <jvmarg value="-Djava.security.policy=${path_to_policy}"/>
      <jvmarg value="-Dslf4j.detectLoggerNameMismatch=true"/>
			<classpath refid="pathCurrent" />
			<formatter type="plain" />
			<test fork="yes" todir="target/unit-reports" 
            outfile="TEST-SecurityManager" 
            name="org.slf4j.issues.Issue324Test" />
		</junit>
	</target>

</project>

Other Java examples (source code examples)

Here is a short list of links related to this Java build.xml source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.