aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Install task cannot find file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Install task cannot find file" Watch "Install task cannot find file" New topic
Author

Install task cannot find file

Vinod Maladkar
Greenhorn

Joined: Jan 05, 2012
Posts: 1
I changed the build.xml with Deploytask..

getting.. java.io.FileNotFoundException: SpringApp (The system cannot find the file specified)

I am using Windows7 laptop and runing Spring samples..........................



<target name="install" description="Install application in Tomcat">
<echo message="-------------${name}----------------" />
<install url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${name}"
war="${name}"/>
</target>


Does anyone why this is happening? It is creating folders in Tomcat webapps folders without any issues....From below example: name = SpringApp....I tried with other values too....but fails in Install task...

below is entire build.xml

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5827
    
    7

Vinod, welcome to Java Ranch!

The error message says it all, you should have been able to fix the problem based on that alone. But here are some hints:

Look at line 60 where you declare the name of your war file.

Then compare that to line 107 where you tell the <install> task the name of the war file.

What's missing on line 107?


JBoss In Action
Damian Kober
Greenhorn

Joined: Aug 15, 2013
Posts: 2
Peter Johnson wrote:Vinod, welcome to Java Ranch!

The error message says it all, you should have been able to fix the problem based on that alone. But here are some hints:

Look at line 60 where you declare the name of your war file.

Then compare that to line 107 where you tell the <install> task the name of the war file.

What's missing on line 107?


adding the .war at the end made it work altough every single example you find on the web just uses the name with no .war ending

however, it didn't quite worked until I put the full path. I ended up with something like:

<install url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${name}"
war="C:/dev/research/springtest/${name}.war"/>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Install task cannot find file