恢复了下系统在打开原来的工程时候却总是部署失败,升级eclipse 更新jboss等均属失败,但把之前已经发布的WAR下载下来重新部分又正常,郁闷…
后来重新新建工程项目,把文件复制过去,NND居然OK了,没搞通。
顺便把部署的方式改了下,更改为服装文件的形式而非打包部署。原文见 http://www.goodluck4u.com/?p=112
不过文中的注释符需要更改,下面是我的文件,保留一下以示纪念
(jboss323.xml配置文件在plugins\org.eclipse.jst.server.generic.jboss_1.*\buildfiles目录下)
<project name="deployextension" default="deploy.j2ee.web" basedir=".">
<property name="pause.deploy" value="10"/>
<property name="pause.undeploy" value="5"/>
<!--
<target name="deploy.j2ee.web">
<jar compress="false" destfile="${project.working.dir}/${module.name}.war">
<zipfileset dir="${module.dir}">
<include name="**/*.*"/>
<exclude name="**/*.war"/>
</zipfileset>
</jar>
<move file="${project.working.dir}/${module.name}.war" todir="${server.publish.dir}"/>
<sleep seconds="${pause.deploy}"/>
</target>
-->
<target name="deploy.j2ee.web">
<copy todir="${server.publish.dir}/${module.name}.war">
<fileset dir="${module.dir}">
<include name="**/*.*"/>
<exclude name="**/*.war"/>
</fileset>
</copy>
<sleep seconds="${pause.deploy}"/>
</target>
<target name="deploy.j2ee.ejb">
<jar compress="false" destfile="${project.working.dir}/${module.name}.jar">
<zipfileset dir="${module.dir}">
<include name="**/*.*"/>
<exclude name="**/*.java"/>
</zipfileset>
</jar>
<move file="${project.working.dir}/${module.name}.jar" todir="${server.publish.dir}"/>
<sleep seconds="${pause.deploy}"/>
</target>
<!--
<target name="deploy.j2ee.ear">
<jar compress="false" destfile="${project.working.dir}/${module.name}.ear">
<zipfileset dir="${module.dir}">
<include name="**/*.*"/>
<exclude name="**/*.java"/>
</zipfileset>
</jar>
<move file="${project.working.dir}/${module.name}.ear" todir="${server.publish.dir}"/>
<sleep seconds="${pause.deploy}"/>
</target>
-->
<target name="deploy.j2ee.ear">
<copy todir="${server.publish.dir}/${module.name}.ear">
<fileset dir="${module.dir}">
<include name="**/*.*"/>
<exclude name="**/*.java"/>
</fileset>
</copy>
<copy todir="${server.publish.dir}/${module.name}.ear/Project1.war">
<fileset dir="${project.working.dir}/Project1">
<include name="**/*.*"/>
</fileset>
</copy>
<sleep seconds="${pause.deploy}"/>
</target>
<target name="undeploy.j2ee.web">
<delete file="${server.publish.dir}/${module.name}.war" failοnerrοr="false"> </delete>
<sleep seconds="${pause.undeploy}"/>
</target>
<target name="undeploy.j2ee.ejb">
<delete file="${server.publish.dir}/${module.name}.jar" failοnerrοr="false"> </delete>
<sleep seconds="${pause.undeploy}"/>
</target>
<target name="undeploy.j2ee.ear">
<delete file="${server.publish.dir}/${module.name}.ear" failοnerrοr="false"> </delete>
<sleep seconds="${pause.undeploy}"/>
</target>
</project>