$ ant deploy
Buildfile: /Users/simpatico/SOLR_HOME/build.xml
deploy:
BUILD FAILED
/Users/simpatico/SOLR_HOME/build.xml:531: java.io.IOException: Server returned HTTP response code: 403 for URL: http://localhost:8080/manager/deploy?path=%2Fsolr
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
at org.apache.catalina.ant.AbstractCatalinaTask.execute(AbstractCatalinaTask.java:228)
Total time: 2 seconds
在 build.xml 中:
<!--http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html#Executing_Manager_Commands_With_Ant-->
<!-- Configure properties to access the Manager application -->
<property name="url" value="http://localhost:8080/manager"/>
<property name="username" value="admin"/>
<property name="password" value="admin"/>
<!-- Configure the custom Ant tasks for the Manager application -->
<taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask"/>
<!-- Configure the context path for this application -->
<property name="path" value="solr"/>
<target name="deploy" description="Install web application"
>
<deploy url="${url}" username="${username}" password="${password}"
path="${path}" war="file:${dist}/solr.war"/>
</target>
/solr 和 solr 的路径都不起作用。
<tomcat-users>
<role rolename="manager-gui"/>
<user password="admin" roles="manager-gui,manager-script,admin" username="admin"/>
</tomcat-users>
编辑:现在它无法部署,因为应用程序已经存在于路径 /solr
undeploy: [undeploy] OK - 在上下文路径 /solr 取消部署的应用程序
deploy: [deploy] FAIL - 应用程序已存在于路径 /solr
构建失败 /Users/simpatico/SOLR_HOME/build.xml:532: FAIL - 应用程序已存在于路径 /solr