Jboss 7.x redeploy option

笑着哭i 提交于 2019-12-25 02:50:19

问题


I was looking for hard-deploy option in Jboss &.x but I believe that option is no longer supported in Jboss 7.x what I found was this Jboss link containing latest plugins .

I have decided to use Jboss-as:redeploy option.It seems to work perfectly for me- kind of replacement for hard-deploy.But when I check my Jboss/standalone/deployment folder the timestamp of war is not updated.But code changes are reflected in the application.below is the maven plugin code that I am using

         <plugin>
            <groupId>org.jboss.as.plugins</groupId>
            <artifactId>jboss-as-maven-plugin</artifactId>
            <version>7.5.Final</version>
            <executions>
                <execution>
                    <phase>install</phase>
                    <goals>
                        <goal>redeploy</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>`

Is there any bug in jboss plugin there ?Is it the right way to achieve my hard-deploy goal in Jboss 7.x


回答1:


There seems to be no hard-deploy feature in the jboss 7.We have now used maven plugin to copy the new build to the deployment directory and Jboss will detect the change and deploy the new WAR.Below is the code for the same:

 <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>1.4</version>
            <executions>
                <execution>
                    <id>copy-war-file</id>
                    <phase>install</phase>
                    <configuration>
                        <tasks>
                            <copy file="target/myapp.war" tofile="${env.JBOSS_HOME}\standalone\deployments\myapp.war" />
                        </tasks>
                    </configuration>
                    <goals>
                        <goal>run</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>


来源:https://stackoverflow.com/questions/22936893/jboss-7-x-redeploy-option

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!