我有一个正在进行的网络应用程序,我需要不断重新部署它
我注意到,如果我只是部署旧文件,它有时不会更新
我继续寻找一个取消部署任务,以便在我的部署脚本中使用
部署脚本工作正常,如果服务器是新启动的,如果不是新启动的,它有时不会覆盖旧文件。
取消部署任务根本不起作用这是我的取消部署脚本
<target name="undeploy" depends="clean" description="Remove application in Tomcat">
<undeploy url="${tomcat.manager.url}"
username="${tomcat.username}"
password="${tomcat.password}"
path="/${webapp.name}"/>
</target>
我得到的异常 - 由于某种原因,它将上下文路径的"/"转换为"%2F",这就是为什么我得到文件找不到异常的原因,我该如何解决它?
C:DevwebworkspaceElectronicArenaLenasProjectbuild.xml:76: java.io.FileNotFou
ndException: http://localhost:8080/manager/undeploy?path=%2FElectronicArenaLe
nasProject
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1613)
at org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalina
Task.java:230)
at org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalina
Task.java:150)
at org.apache.catalina.ant.UndeployTask.execute(UndeployTask.java:44)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.jav
a:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:811)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
我猜雄猫没有运行。或者管理器 URL(即 ${tomcat.manager.url}
)未在构建中正确配置.xml
请参阅错误消息:
java.io.FileNotFoundException: http://localhost:8080/manager/undeploy?path=%2FElectronicArenaLenasProject