Build.xml
<project name="DikshaPortal" default="dist" basedir=".">
<description>Build file for Portalv2.0 project</description>
<!-- set global properties for this build -->
<property name="src" location="src" />
<property name="conf" location="src/conf" />
<property name="build" location="${BUILD_TARGET}/Portal" />
<property name="GUI" location="../GUI" />
<property name="dist" location="${BUILD_EXPORT}/Portal" />
<property name="BaseDir" location="../DikshaPortal-Release-2013-12-12" />
<property name="UIBaseDir" location="../Portalv2.0_FlexCompileFiles" />
<property name="history" location="${UIBaseDir}/history" />
<property name="META-INF" location="WebContent/META-INF" />
<property name="com" location="${UIBaseDir}/com" />
<property name="pages" location="${UIBaseDir}/pages" />
<property name="WEB-INF" location="WebContent/WEB-INF" />
<property name="data" location="WebContent/data" />
<property name="temp" location="WebContent/temp" />
<property name="policies" location="WebContent/assets/images/Policies" />
<property name="TPL" value="${LIBRARIES}/ThirdParty" />
<property name="apache" value="${TPL}/apache_libs" />
<path id="classpath">
<fileset dir="${TPL}" includes="*.jar" />
<fileset dir="${apache}" includes="**/*.jar" />
<fileset dir="${WEB-INF}" includes="**/*.jar" />
</path>
<target name="clean" description="Removes the temporary directories used">
<delete dir="${GUI}" />
<delete dir="${build}" />
</target>
<target name="init" depends="clean">
<!-- Create the time stamp -->
<tstamp />
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}" />
<mkdir dir="${dist}" />
<mkdir dir="${GUI}" />
<mkdir dir="${data}" />
<mkdir dir="${temp}" />
</target>
<target name="compile" depends="init" description="Compile the source code">
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}" debug="on" debuglevel="lines,vars,source" classpathref="classpath" />
</target>
<target name="dist" depends="compile" description="generate the distribution">
<copy todir="${GUI}">
<fileset dir="${UIBaseDir}" includes="*.js,*.html,*.swf,*.jsp,favicon.png,favicon.ico" />
</copy>
<mkdir dir="${GUI}/assets/images/Policies" />
<copy todir="${GUI}/assets/images/Policies">
<fileset dir="${policies}" includes="*.*" />
</copy>
<mkdir dir="${GUI}/data" />
<copy todir="${GUI}/data">
<fileset dir="${data}" includes="**" />
</copy>
<mkdir dir="${GUI}/temp" />
<copy todir="${GUI}/temp">
<fileset dir="${temp}" includes="*.*" />
</copy>
<mkdir dir="${GUI}/history" />
<copy todir="${GUI}/history">
<fileset dir="${history}" includes="*.*" />
</copy>
<mkdir dir="${GUI}/com" />
<copy todir="${GUI}/com">
<fileset dir="${com}" includes="**" />
</copy>
<mkdir dir="${GUI}/pages" />
<copy todir="${GUI}/pages">
<fileset dir="${pages}" includes="**" />
</copy>
<mkdir dir="${GUI}/WEB-INF/flex" />
<copy todir="${GUI}/WEB-INF/flex">
<fileset dir="${WEB-INF}/flex" includes="*.*">
</fileset>
</copy>
<mkdir dir="${GUI}/WEB-INF/pages" />
<copy todir="${GUI}/WEB-INF/pages">
<fileset dir="${WEB-INF}/pages" includes="*.*">
</fileset>
</copy>
<mkdir dir="${dist}/conf" />
<copy todir="${dist}/conf">
<fileset dir="${BaseDir}/conf" includes="email.properties, Portal.properties" />
</copy>
<copy todir="${dist}">
<fileset dir="${BaseDir}/conf" includes="readme.txt" />
</copy>
<mkdir dir="${dist}/email/templates" />
<copy todir="${dist}/email/templates">
<fileset dir="${BaseDir}/email/templates" includes="*.*" />
</copy>
<mkdir dir="${dist}/jasper" />
<copy todir="${dist}/jasper">
<fileset dir="${BaseDir}/jasper" includes="*.*" />
</copy>
<mkdir dir="${dist}/conf" />
<copy todir="${dist}">
<fileset dir="${BaseDir}/db_scripts" includes="*.*" />
</copy>
<mkdir dir="${dist}/jars" />
<copy todir="${dist}/jars">
<fileset dir="${TPL}" includes="*.*" />
</copy>
<copy todir="${build}" file="src/MessageResources.properties">
</copy>
<!--
Put everything in ${build} into the MyProject-${DSTAMP}.war file
-->
<war destfile="${dist}/DikshaPortalv2.0.war" webxml="${WEB-INF}/web.xml" basedir="${GUI}">
<classes dir="${build}" />
<lib dir="${WEB-INF}/lib" />
<webinf dir="${WEB-INF}" includes="*.xml" excludes="web.xml" />
<fileset dir="${META-INF}" />
</war>
<copy todir="${build}">
<fileset dir="${dist}" includes="*.war" />
</copy>
<delete dir="${GUI}" />
<delete dir="${build}" />
</target>
Iam completely new to gradle, I was told to migrate the existing ant
script into gradle at my company. Somebody please help me on How to
convert the above given ant script into gradle.
Iam completely new to gradle, I was told to migrate the existing ant
script into gradle at my company. Somebody please help me on How to
convert the above given ant script into gradle.
I would start with a very basic build.gradle file in your root directory of the DikshaPortal project, run gradle build from the terminal or command line and see what happens. Do you understand your dependencies for this project? If so, then you can add that block into your gradle script.
apply plugin: 'war'
dependencies {
//enter your dependenices here such as
compile group: 'com.junit' name: 'junit' version: '4.12'
}
This is a start. Gradle docs are decent so I'd start to acquaint yourself with them. I just completed a decent size project converting Ant to Gradle in my first job as a developer and it took a while! Run a gradle build to check for errors. Even when it's successful check your war (or any generated artifact) against the Ant and keep on going. Hope that helps.
https://gradle.org/guides/
https://github.com/shekhargulati/gradle-tips
http://dougborg.org/what-makes-a-good-build-dot-gradle
https://docs.gradle.org/3.3/dsl/ You can change the version to whichever you are using.
Not an exact answer but a possible alternative solution.
I dont believe that there is a conversion tool for ant to gradle, but you can just import your ant file into gradle and run it from there.
Here is how to do it:
https://docs.gradle.org/current/userguide/ant.html?_ga=2.102231682.2042183466.1518506088-863573233.1518506088#sec:import_ant_build
Seems more viable than trying to rewrite the whole script to gradle.
build.gradle file
ant.importBuild 'build.xml'
Related
How to clear subdirectories without removing them in NAnt?
As the result of script execution, I need a directory with the same subdirectories, but empty:
<delete>
<fileset basedir="\\${conf.server.frontend}\wwwroot">
<include name="???" />
</fileset>
</delete>
This is what you need:
<delete>
<fileset basedir="\\${conf.server.frontend}\wwwroot">
<include name="**\*" />
</fileset>
</delete>
I'm trying to create an application über jar, but running into an issue due to a dependency on the spring framework. In particular, the namespaces for the xml schemas are problematic. You get the infamous NamespaceHandler problem:
Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/c]
For creating (simple) uber jars, Creating a bundle jar with ant, but this doesn't work if you have spring dependencies due to the fact that the spring jars have files such as spring.handlers, spring.schemas and spring.tooling in the META-INF directories of many of their jar files. The namespace resolution is dependent, I believe, on these files.
The über jar seems to somehow contain all necessary files, but I'm guessing the runtime is seeing only one.
For example, a jar -tf of my uber jar shows (in part)
META-INF/spring.handlers
META-INF/spring.schemas
META-INF/spring.tooling
META-INF/license.txt
META-INF/notice.txt
META-INF/spring.factories
META-INF/spring.handlers
META-INF/spring.schemas
META-INF/spring.tooling
META-INF/license.txt
META-INF/notice.txt
META-INF/license.txt
META-INF/notice.txt
META-INF/spring.handlers
META-INF/spring.schemas
META-INF/spring.tooling
META-INF/license.txt
META-INF/notice.txt
META-INF/license.txt
So: question.. is there a way to create an uber-jar that has the spring jars bundled inside? Do I need to merge the META-INF files? Anyone have experience doing file merger with ant builds?
Well.. this was a pain.
<target name="make-bundle" depends="jar">
<!-- retrieve the dependencies -->
<ivy:retrieve conf="deploy" pattern="${dist.dir}/dependencies/[artifact].[ext]"/>
<delete dir="${dist.dir}/dependencies/uber" failonerror="false" />
<mkdir dir="${dist.dir}/dependencies/uber"/>
<!-- iterate over the dependencies -->
<for param="file">
<path>
<fileset dir="${dist.dir}/dependencies">
<include name="**/*.jar"/>
</fileset>
</path>
<sequential>
<propertyregex override="yes"
property="jarname" input="#{file}"
regexp=".*/([^/]*)\.jar" replace="\1"/>
<!-- put the spring.* jars into special sub-directories -->
<mkdir dir="${dist.dir}/dependencies/${jarname}"/>
<unzip dest="${dist.dir}/dependencies/${jarname}" src="#{file}">
<patternset>
<include name="**/META-INF/spring.*"/>
</patternset>
</unzip>
<!-- put everything else in the 'uber' directory -->
<unzip dest="${dist.dir}/dependencies/uber" src="#{file}">
<patternset>
<exclude name="**/META-INF/spring.*"/>
</patternset>
</unzip>
</sequential>
</for>
<!-- build the concatenated spring.* files -->
<mkdir dir="${dist.dir}/dependencies/META-INF"/>
<concat destfile="${dist.dir}/dependencies/META-INF/spring.handlers" fixlastline="true">
<fileset dir="${dist.dir}/dependencies/" includes="*/*/spring.handlers"/>
</concat>
<concat destfile="${dist.dir}/dependencies/META-INF/spring.schemas" fixlastline="true">
<fileset dir="${dist.dir}/dependencies/" includes="*/*/spring.schemas"/>
</concat>
<concat destfile="${dist.dir}/dependencies/META-INF/spring.tooling" fixlastline="true">
<fileset dir="${dist.dir}/dependencies/" includes="*/*/spring.tooling"/>
</concat>
<concat destfile="${dist.dir}/dependencies/META-INF/spring.factories" fixlastline="true">
<fileset dir="${dist.dir}/dependencies/" includes="*/*/spring.factories"/>
</concat>
<!-- build the uber jar! -->
<delete file="${dist.dir}/myproject-with-dependencies.jar" failonerror="false"/>
<jar destfile="${dist.dir}/myproject-with-dependencies.jar">
<!-- all dependency files except spring.* -->
<fileset dir="${dist.dir}/dependencies/uber"/>
<!-- the spring.* files -->
<fileset dir="${dist.dir}/dependencies/" includes="META-INF/*"/>
<!-- my project's classes & etc -->
<zipgroupfileset dir="${dist.dir}" includes="myproject.jar" />
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
</jar>
</target>
i cannot seem to install my spring mvc app on tomcat 7 due to this error:
BUILD FAILED
C:\Users\xxxx\Work\My side projects\FreedomSpring\build.xml:106: java.io.FileNotFoundException: C:\spring (Access is denied)
I have disabled UAC and tried running Spring in admin mode and diddnt work.
here is my build.xml file
<?xml version="1.0"?>
<project name="springapp" basedir="." default="usage">
<property file="build.properties"/>
<property name="src.dir" value="src"/>
<property name="web.dir" value="war"/>
<property name="build.dir" value="${web.dir}/WEB-INF/classes"/>
<property name="name" value="FreedomSpring"/>
<path id="master-classpath">
<fileset dir="${web.dir}/WEB-INF/lib">
<include name="*.jar"/>
</fileset>
<!-- We need the servlet API classes: -->
<!-- * for Tomcat 5/6 use servlet-api.jar -->
<!-- * for other app servers - check the docs -->
<fileset dir="${appserver.lib}">
<include name="servlet*.jar"/>
</fileset>
<pathelement path="${build.dir}"/>
</path>
<target name="usage">
<echo message=""/>
<echo message="${name} build file"/>
<echo message="-----------------------------------"/>
<echo message=""/>
<echo message="Available targets are:"/>
<echo message=""/>
<echo message="build --> Build the application"/>
<echo message="deploy --> Deploy application as directory"/>
<echo message="deploywar --> Deploy application as a WAR file"/>
<echo message="install --> Install application in Tomcat"/>
<echo message="reload --> Reload application in Tomcat"/>
<echo message="start --> Start Tomcat application"/>
<echo message="stop --> Stop Tomcat application"/>
<echo message="list --> List Tomcat applications"/>
<echo message=""/>
</target>
<target name="build" description="Compile main source tree java files">
<mkdir dir="${build.dir}"/>
<javac destdir="${build.dir}" source="1.5" target="1.5" debug="true"
deprecation="false" optimize="false" failonerror="true">
<src path="${src.dir}"/>
<classpath refid="master-classpath"/>
</javac>
</target>
<target name="deploy" depends="build" description="Deploy application">
<copy todir="${deploy.path}/${name}" preservelastmodified="true">
<fileset dir="${web.dir}">
<include name="**/*.*"/>
</fileset>
</copy>
</target>
<target name="deploywar" depends="build" description="Deploy application as a WAR file">
<war destfile="${name}.war"
webxml="${web.dir}/WEB-INF/web.xml">
<fileset dir="${web.dir}">
<include name="**/*.*"/>
</fileset>
</war>
<copy todir="${deploy.path}" preservelastmodified="true">
<fileset dir=".">
<include name="*.war"/>
</fileset>
</copy>
</target>
<!-- ============================================================== -->
<!-- Tomcat tasks - remove these if you don't have Tomcat installed -->
<!-- ============================================================== -->
<path id="catalina-ant-classpath">
<!-- We need the Catalina jars for Tomcat -->
<!-- * for other app servers - check the docs -->
<fileset dir="${appserver.lib}">
<include name="catalina-ant.jar"/>
</fileset>
</path>
<taskdef name="install" classname="org.apache.catalina.ant.DeployTask">
<classpath refid="catalina-ant-classpath"/>
</taskdef>
<taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask">
<classpath refid="catalina-ant-classpath"/>
</taskdef>
<taskdef name="list" classname="org.apache.catalina.ant.ListTask">
<classpath refid="catalina-ant-classpath"/>
</taskdef>
<taskdef name="start" classname="org.apache.catalina.ant.StartTask">
<classpath refid="catalina-ant-classpath"/>
</taskdef>
<taskdef name="stop" classname="org.apache.catalina.ant.StopTask">
<classpath refid="catalina-ant-classpath"/>
</taskdef>
<target name="install" description="Install application in Tomcat">
<echo message="deploy path = ${deploy.path}/${name}"/>
<install url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="${deploy.path}/${name}"
war="${deploy.path}/"/>
</target>
<target name="reload" description="Reload application in Tomcat">
<reload url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${name}"/>
</target>
<target name="start" description="Start Tomcat application">
<start url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="${deploy.path}/${name}"/>
</target>
<target name="stop" description="Stop Tomcat application">
<stop url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="${deploy.path}/${name}"/>
</target>
<target name="list" description="List Tomcat applications">
<list url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"/>
</target>
<!-- End Tomcat tasks -->
</project>
Build properties:
# Ant properties for building the springapp
appserver.home=C:/Program Files/Apache Software Foundation/Tomcat 7.0
# for Tomcat 5 use $appserver.home}/server/lib
# for Tomcat 6 use $appserver.home}/lib
appserver.lib=${appserver.home}/lib
deploy.path=C:/spring
tomcat.manager.url=http://localhost:8080/manager
tomcat.manager.username=xxxxx
tomcat.manager.password=xxxxx
i notice that everytime i do a build, deply, deploywar and install, the c:/spring folder is always being set to read-only? i tried to manually change the permissions of that folder and just tried running the install ant target from my build and no joy. The build.xml succesfully creates the WAR file and the folder that contains the binary class files inside c:/spring but it cant istall it on tomcat7
Any suggestions?
im using windows 7 64bit by the way.
I am following this guide http://static.springsource.org/docs/Spring-MVC-step-by-step/part1.html
here is m web.xml if it helps:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<servlet>
<servlet-name>FreedomSpring</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>FreedomSpring</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>
index.jsp
</welcome-file>
</welcome-file-list>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/log4j.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
</web-app>
And here is my servlett.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<!-- the application context definition for the springapp DispatcherServlet -->
<bean name="/hello.htm" class="springapp.web.HelloController"/>
</beans>
I'm using Maven 3.0.3 on Solaris 10. I am using the antrun exec plugin. How do I figure out the command line statement that is actually being run? When running my command (designed to checkout code from the StarTeam version control system), I'm getting a permission denied error, although I have verified my user has proper perms. I would like to run the same command Maven is running from a shell so that I can compare the two commands.
Below is the relevant section from my pom.xml file …
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>verify</phase>
<configuration>
<tasks>
<!-- Backup CIRQUE_COMPLETE and freeze the backup label -->
<exec failonerror="true" executable="stcmd" dir="/opt/StarTeamCP_2009/bin/">
<arg value="label" />
<arg value="-p" />
<arg value="user:#mydomain.com:49201/myco/myco/Technology/nna/mycoUSA/cirquedusoleil" />
<arg value="-vl" />
<arg value="CIRQUE_${env}_COMPLETE" />
<arg value="-nl" />
<arg value="CIRQUE_${env}_COMPLETE_`date +"%Y%m%d-%T"`" />
<arg value="-f" />
<arg value="-r" />
</exec>
<!-- Slide CIRQUE_COMPLETE label up to build label -->
<exec failonerror="true" executable="stcmd" dir="/opt/StarTeamCP_2009/bin/">
<arg value="apply-label" />
<arg value="-p" />
<arg value="user:#mydomain.com:49201/myco/myco/Technology/nna/mycoUSA/cirquedusoleil" />
<arg value="-vl" />
<arg value="${env.BUILD_ID}" />
<arg value="-lbl" />
<arg value="CIRQUE_${env}_COMPLETE" />
<arg value="-is" />
<arg value="*" />
</exec>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
You can run maven with the -X option. This will give you more (debug) information and it will also run ant with the -debug option.
Use the 'chmod' tag before 'exec' to guarantee the right to execute the command, as follows:
<chmod file="/opt/StarTeamCP_2009/bin/stcmd" perm="a+x"/>
<exec failonerror="true" executable="stcmd" dir="/opt/StarTeamCP_2009/bin/">
...
</exec>
i am having issues deploying my spring app to tomcat 7 with the following error:
C:\Users\xxxxxx\Work\Online Racing
League\build.xml:61: Problem creating
war: C:\Program Files\Apache Software
Foundation\Tomcat 7.0\webapps\Online
Racing League.war (Access is denied)
(and the archive is probably corrupt
but I could not delete it)
Here is what my build.properties looks like:
# Ant properties for building the springapp
appserver.home=C:/Program Files/Apache Software Foundation/Tomcat 7.0
# for Tomcat 5 use $appserver.home}/server/lib
# for Tomcat 6 use $appserver.home}/lib
appserver.lib=${appserver.home}/lib/
deploy.path=${appserver.home}/webapps
tomcat.manager.url=http://localhost:8080/manager
tomcat.manager.username=
tomcat.manager.password=
Build file:
<?xml version="1.0"?>
<project name="Online Racing League" basedir="." default="usage">
<property file="build.properties"/>
<property name="src.dir" value="src"/>
<property name="web.dir" value="war"/>
<property name="build.dir" value="${web.dir}/WEB-INF/classes"/>
<property name="name" value="Online Racing League"/>
<path id="master-classpath">
<fileset dir="${web.dir}/WEB-INF/lib">
<include name="*.jar"/>
</fileset>
<!-- We need the servlet API classes: -->
<!-- * for Tomcat 5/6 use servlet-api.jar -->
<!-- * for other app servers - check the docs -->
<fileset dir="${appserver.lib}">
<include name="servlet*.jar"/>
</fileset>
<pathelement path="${build.dir}"/>
</path>
<target name="usage">
<echo message=""/>
<echo message="${name} build file"/>
<echo message="-----------------------------------"/>
<echo message=""/>
<echo message="Available targets are:"/>
<echo message=""/>
<echo message="build --> Build the application"/>
<echo message="deploy --> Deploy application as directory"/>
<echo message="deploywar --> Deploy application as a WAR file"/>
<echo message="install --> Install application in Tomcat"/>
<echo message="reload --> Reload application in Tomcat"/>
<echo message="start --> Start Tomcat application"/>
<echo message="stop --> Stop Tomcat application"/>
<echo message="list --> List Tomcat applications"/>
<echo message=""/>
</target>
<target name="build" description="Compile main source tree java files">
<mkdir dir="${build.dir}"/>
<javac destdir="${build.dir}" source="1.5" target="1.5" debug="true"
deprecation="false" optimize="false" failonerror="true">
<src path="${src.dir}"/>
<classpath refid="master-classpath"/>
</javac>
</target>
<target name="deploy" depends="build" description="Deploy application">
<copy todir="${deploy.path}/${name}" preservelastmodified="true">
<fileset dir="${web.dir}">
<include name="**/*.*"/>
</fileset>
</copy>
</target>
<target name="deploywar" depends="build" description="Deploy application as a WAR file">
<war destfile="${deploy.path}/${name}.war"
webxml="${web.dir}/WEB-INF/web.xml">
<fileset dir="${web.dir}">
<include name="**/*.*"/>
</fileset>
</war>
<copy todir="${deploy.path}" preservelastmodified="true">
<fileset dir=".">
<include name="*.war"/>
</fileset>
</copy>
</target>
<!-- ============================================================== -->
<!-- Tomcat tasks - remove these if you don't have Tomcat installed -->
<!-- ============================================================== -->
<path id="catalina-ant-classpath">
<!-- We need the Catalina jars for Tomcat -->
<!-- * for other app servers - check the docs -->
<fileset dir="${appserver.lib}">
<include name="catalina-ant.jar"/>
</fileset>
</path>
<taskdef name="install" classname="org.apache.catalina.ant.DeployTask">
<classpath refid="catalina-ant-classpath"/>
</taskdef>
<taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask">
<classpath refid="catalina-ant-classpath"/>
</taskdef>
<taskdef name="list" classname="org.apache.catalina.ant.ListTask">
<classpath refid="catalina-ant-classpath"/>
</taskdef>
<taskdef name="start" classname="org.apache.catalina.ant.StartTask">
<classpath refid="catalina-ant-classpath"/>
</taskdef>
<taskdef name="stop" classname="org.apache.catalina.ant.StopTask">
<classpath refid="catalina-ant-classpath"/>
</taskdef>
<target name="install" description="Install application in Tomcat">
<install url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${name}"
war="${name}"/>
</target>
<target name="reload" description="Reload application in Tomcat">
<reload url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${name}"/>
</target>
<target name="start" description="Start Tomcat application">
<start url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${name}"/>
</target>
<target name="stop" description="Stop Tomcat application">
<stop url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${name}"/>
</target>
<target name="list" description="List Tomcat applications">
<list url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"/>
</target>
<!-- End Tomcat tasks -->
</project>
servlett:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<mvc:annotation-driven />
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
<context:component-scan base-package="com.jr" />
</beans>
and finally the web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- index.htm web page -->
<welcome-file-list>
<welcome-file>
index.jsp
</welcome-file>
</welcome-file-list>
<!-- Register and setup my servlet xml files here -->
<servlet>
<servlet-name>raceLeague</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>raceLeague</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
</web-app>
It looks like you are on Windows Vista or Windows 7 with User Account Control (UAC) enabled.