Jboss-Maven-Plugin can't start?

I am using Jboss-Maven-Plugin version 1.4. I am looking at an example using the JBoss Maven plugin , and I am pom.xml

<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jboss-maven-plugin</artifactId> <version>1.4</version> <configuration> <jbossHome>E:\JavaWorkingTools\JBoss\jboss-5.1.0.GA</jbossHome> <serverName>default</serverName> <hostName>localhost</hostName> <port>8080</port> <fileName>${project.build.directory}/${{project.build.finalName}.war</fileName> </configuration> </plugin> 

When I enter the message jboss: start console is INfo! But does terminate not work?

Announcement:

 [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building SSH2Maven JEE5 Webapp 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- jboss-maven-plugin:1.4:start (default-cli) @ SSH2Maven --- [INFO] Starting JBoss... [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.328s [INFO] Finished at: Sun Jul 11 19:10:15 CST 2010 [INFO] Final Memory: 2M/15M [INFO] ------------------------------------------------------------------------ 

Why? Can this version be used only in 4.x below?

+4
source share
1 answer

Well, first of all, the plugin is not really intended for JBoss AS 5, and while some functions will work (start, stop, and hard deployment), some deployment functions may not work.

Secondly, the jboss:start target does not “block”, it will launch JBoss in the background as an independent process.

Here is what I get after some time when starting jboss:start with JBoss 5 (and a plugin configuration similar to yours):

  $ mvn jboss: start
 [INFO] Scanning for projects ...
 [INFO] ----------------------------------------------- -------------------------
 [INFO] Building my-webapp Maven Webapp
 [INFO] task-segment: [jboss: start] (aggregator-style)
 [INFO] ----------------------------------------------- -------------------------
 [INFO] [jboss: start {execution: default-cli}]
 [INFO] Starting JBoss ...
 [INFO] ----------------------------------------------- -------------------------
 [INFO] BUILD SUCCESSFUL
 [INFO] ----------------------------------------------- -------------------------
 ...
 $ ps aux |  grep -i jboss
 pascal 23080 0.0 0.0 1828 292 pts / 3 S 23:02 0:00 sh -c cd /home/pascal/opt/jboss-5.1.0.GA/bin;  export JBOSS_HOME = "/ home / pascal / opt / jboss-5.1.0.GA";  ./run.sh null
 pascal 23107 91.4 30.3 1116240 624824 pts / 3 Sl 23:02 3:19 / usr / lib / jvm / java-6-sun / bin / java -Dprogram.name = run.sh -server -Xms128m -Xmx512m -XX: MaxPermSize = 256m -Dorg.jboss.resolver.warning = true -Dsun.rmi.dgc.client.gcInterval = 3600000 -Dsun.rmi.dgc.server.gcInterval = 3600000 -Djava.net.preferIPv4Stack = true -Djava.endorsed.dirs = / home / pascal / opt / jboss-5.1.0.GA / lib / endorsed -classpath /home/pascal/opt/jboss-5.1.0.GA/bin/run.jar:/usr/lib/jvm/java -6-sun / lib / tools.jar org.jboss.Main null
 pascal 23298 0.0 0.0 3324 916 pts / 3 S + 23:06 0:00 grep -i jboss

JBoss is running as expected.

Update: Here is the configuration I used (quick and dirty, for testing purposes):

  <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jboss-maven-plugin</artifactId> <version>1.4.1</version> <configuration> <jbossHome>/home/pascal/opt/jboss-5.1.0.GA</jbossHome> <serverName>default</serverName> <fileName>target/my-project.war</fileName> </configuration> </plugin> 
+3
source

Source: https://habr.com/ru/post/1315325/


All Articles