You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ricky <ri...@gmail.com> on 2008/08/13 20:40:41 UTC

Deploying war to JBOSS using maven

Hi,

I am using : http://mojo.codehaus.org/jboss-maven-plugin/usage.html to
deploy to JBOSS. I have set JBOSS_HOME as a system variable to
<some-directory>\jboss. Then i use the following entry in POM xml for the
project i am trying to deploy :
 <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>jboss-maven-plugin</artifactId>
                 <configuration>
                     <project></project>
                       <jbossHome>${JBOSS_HOME}/server/default</jbossHome>
                      <port>9090</port>
                </configuration>
              </plugin>


However, it doesn't work, when i do mvn jboss:deploy, following error :

*[INFO] No server specified for authentication - using defaults
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Mojo error occurred: Connection refused: connect*


*Any ideas??*

any help would be appreciable, thanks in advance.


Regards
Vyas, Anirudh
|| ॐ ||

Re: Deploying war to JBOSS using maven

Posted by Keerthana <ke...@gmail.com>.
Hi, Can anyone please help me to deploy my war file in jboss server?

Below is my pom.xml file,

<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jboss-maven-plugin</artifactId>
        <version>1.5.0</version>
        <configuration>
        	<hostName>localhost</hostName>
          	<port>9999</port>
            <serverId>Jboss-deploy</serverId>
          	
          	<fileNames>
            <fileName>target/deploy-app.war</fileName>
          </fileNames>
          </configuration>
      </plugin>
      
     </plugins>

I am getting the following error,

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO]
------------------------------------------------------------------------
[INFO] Building example 1.0.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO] 
[INFO] --- jboss-maven-plugin:1.5.0:deploy (default-cli) @ example ---
[INFO] Deploying target/deploy-app.war to JBoss.
[INFO] No server username specified - using default
[INFO] No server password specified - using default
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2.984s
[INFO] Finished at: Fri Jun 28 15:05:27 IST 2013
[INFO] Final Memory: 3M/15M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.codehaus.mojo:jboss-maven-plugin:1.5.0:deploy (default-cli) on project
example: Mojo error occurred: Connection refused: connect -> [Help 1]


Please help me. I am new to maven so kindly help me to deploy my war file to
Jboss server




--
View this message in context: http://maven.40175.n5.nabble.com/Deploying-war-to-JBOSS-using-maven-tp109904p5761026.html
Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Deploying war to JBOSS using maven

Posted by Siarhei Dudzin <si...@gmail.com>.
Ricky,

The 'Connection refused' message looks like no one is listening on that
ip/port.
Do you use port 9090 as on the example? If so try to change it to 8080
(which is the default listening port for http on JBoss).

The example on the link you've given in your original post clearly says:
"For example to change your port that JBoss is listening ...".

So, check whether you use correct port number.

Regards,
Siarhei

On Thu, Aug 14, 2008 at 4:26 PM, Anders Hammar <an...@hammar.net> wrote:

>
> Hi,
>
> Siarhei is right about the difference regarding the two goals of the
> plugin.
> I know the deploy target works (tested with JBoss 4.2.2), so you must be
> missing something. Is the right port specified? Is JBoss started?
> There is some info here:
> http://bill.burkecentral.com/2008/02/13/jboss-unit-testing-with-maven/
> Niether Bill or I could get the start target to work though. I spent some
> time trying to debug, but I just could figure out the problem. So what I've
> done is that I use the cargo plugin for starting/stopping JBoss.
>
> Hope it helps,
> /Anders
>
>
> Ricky-22 wrote:
> >
> > could be. I am going to dig and just as an FYI let you know. Thanks and
> > appreciate your response!
> >
> > Rick
> >
> > On Wed, Aug 13, 2008 at 6:34 PM, Siarhei Dudzin
> > <si...@gmail.com>wrote:
> >
> >> On Thu, Aug 14, 2008 at 12:18 AM, Ricky <ri...@gmail.com> wrote:
> >>
> >> > Hi,
> >> >
> >> > Thanks for your reply. I used jboss:harddeploy and it worked for me.
> >> > However
> >> > i see that jboss:start doesnt actually start the server. Am i missing
> >> > something?
> >>
> >>
> >> I never used jboss plugin so I can't tell why it doesn't start.
> >>
> >>
> >> > and also jboss:deploy vs hard deploy whats the difference?
> >>
> >>
> >> No idea, but I can imagine is that jboss:deploy is deployment via jmx
> >> deployer and hard deploy is just dropping the artifact to the hot
> >> deployment
> >> directory of jboss.
> >>
> >> Siarhei
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Deploying-war-to-JBOSS-using-maven-tp18968835p18982637.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Deploying war to JBOSS using maven

Posted by Anders Hammar <an...@hammar.net>.
Hi,

Siarhei is right about the difference regarding the two goals of the plugin.
I know the deploy target works (tested with JBoss 4.2.2), so you must be
missing something. Is the right port specified? Is JBoss started?
There is some info here:
http://bill.burkecentral.com/2008/02/13/jboss-unit-testing-with-maven/
Niether Bill or I could get the start target to work though. I spent some
time trying to debug, but I just could figure out the problem. So what I've
done is that I use the cargo plugin for starting/stopping JBoss.

Hope it helps,
/Anders


Ricky-22 wrote:
> 
> could be. I am going to dig and just as an FYI let you know. Thanks and
> appreciate your response!
> 
> Rick
> 
> On Wed, Aug 13, 2008 at 6:34 PM, Siarhei Dudzin
> <si...@gmail.com>wrote:
> 
>> On Thu, Aug 14, 2008 at 12:18 AM, Ricky <ri...@gmail.com> wrote:
>>
>> > Hi,
>> >
>> > Thanks for your reply. I used jboss:harddeploy and it worked for me.
>> > However
>> > i see that jboss:start doesnt actually start the server. Am i missing
>> > something?
>>
>>
>> I never used jboss plugin so I can't tell why it doesn't start.
>>
>>
>> > and also jboss:deploy vs hard deploy whats the difference?
>>
>>
>> No idea, but I can imagine is that jboss:deploy is deployment via jmx
>> deployer and hard deploy is just dropping the artifact to the hot
>> deployment
>> directory of jboss.
>>
>> Siarhei
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Deploying-war-to-JBOSS-using-maven-tp18968835p18982637.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Deploying war to JBOSS using maven

Posted by Anders Hammar <an...@hammar.net>.
Might the problem be that you have authentication turned on for the
jmx-console? If so, turn it of and see if it makes any difference. If you
want it on you need to define a server id (the 'server' parameter for the
plugin) and add credentials for that server in your settings.xml.

/Anders

Ricky-22 wrote:
> 
> Hey,
> 
> org.apache.maven.lifecycle.LifecycleExecutionException: Mojo error
> occurred:
> Connection refused: connect
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:56
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecuto
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycle
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at
> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Mojo error
> occurred: Connection refused: connect
>         at
> org.codehaus.mojo.jboss.AbstractDeployerMojo.doURL(AbstractDeployerMojo.java:101)
>         at org.codehaus.mojo.jboss.DeployMojo.execute(DeployMojo.java:40)
>         at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:53
> ... 16 more
> Caused by: java.net.ConnectException: Connection refused: connect
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>         at
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>         at java.net.Socket.connect(Socket.java:518)
>         at java.net.Socket.connect(Socket.java:468)
> Rick
> 
> On Thu, Aug 14, 2008 at 7:58 AM, Martin Gainty <mg...@hotmail.com>
> wrote:
> 
>>
>> Rick-
>> please display stacktrace from your logMartin
>> ______________________________________________ Disclaimer and
>> confidentiality note Everything in this e-mail and any attachments
>> relates
>> to the official business of Sender. This transmission is of a
>> confidential
>> nature and Sender does not endorse distribution to any party other than
>> intended recipient. Sender does not necessarily endorse content contained
>> within this transmission. > Date: Thu, 14 Aug 2008 07:45:03 -0400> From:
>> ricky.nj@gmail.com> To: users@maven.apache.org> Subject: Re: Deploying
>> war
>> to JBOSS using maven> > could be. I am going to dig and just as an FYI
>> let
>> you know. Thanks and> appreciate your response!> > Rick> > On Wed, Aug
>> 13,
>> 2008 at 6:34 PM, Siarhei Dudzin <si...@gmail.com>wrote:> > > On
>> Thu, Aug 14, 2008 at 12:18 AM, Ricky <ri...@gmail.com> wrote:> >> > >
>> Hi,> > >> > > Thanks for your reply. I used jboss:harddeploy and it
>> worked
>> for me.> > > However> > > i see that jboss:start doesnt actually start
>> the
>> server. Am i missing> > > something?> >> >> > I never used jboss plugin
>> so I
>> can't tell why it doesn't start.> >> >> > > and also jboss:deploy vs hard
>> deploy whats the difference?> >> >> > No idea, but I can imagine is that
>> jboss:deploy is deployment via jmx> > deployer and hard deploy is just
>> dropping the artifact to the hot> > deployment> > directory of jboss.> >>
>> >
>> Siarhei> >
>> _________________________________________________________________
>> Your PC, mobile phone, and online services work together like never
>> before.
>> http://clk.atdmt.com/MRT/go/108587394/direct/01/
> 
> 

-- 
View this message in context: http://www.nabble.com/Deploying-war-to-JBOSS-using-maven-tp18968835p18982725.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Deploying war to JBOSS using maven

Posted by Ricky <ri...@gmail.com>.
Hey,

org.apache.maven.lifecycle.LifecycleExecutionException: Mojo error occurred:
Connection refused: connect
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:56
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecuto
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:463
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycle
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Mojo error
occurred: Connection refused: connect
        at
org.codehaus.mojo.jboss.AbstractDeployerMojo.doURL(AbstractDeployerMojo.java:101)
        at org.codehaus.mojo.jboss.DeployMojo.execute(DeployMojo.java:40)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:53
... 16 more
Caused by: java.net.ConnectException: Connection refused: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.Socket.connect(Socket.java:518)
        at java.net.Socket.connect(Socket.java:468)
Rick

On Thu, Aug 14, 2008 at 7:58 AM, Martin Gainty <mg...@hotmail.com> wrote:

>
> Rick-
> please display stacktrace from your logMartin
> ______________________________________________ Disclaimer and
> confidentiality note Everything in this e-mail and any attachments relates
> to the official business of Sender. This transmission is of a confidential
> nature and Sender does not endorse distribution to any party other than
> intended recipient. Sender does not necessarily endorse content contained
> within this transmission. > Date: Thu, 14 Aug 2008 07:45:03 -0400> From:
> ricky.nj@gmail.com> To: users@maven.apache.org> Subject: Re: Deploying war
> to JBOSS using maven> > could be. I am going to dig and just as an FYI let
> you know. Thanks and> appreciate your response!> > Rick> > On Wed, Aug 13,
> 2008 at 6:34 PM, Siarhei Dudzin <si...@gmail.com>wrote:> > > On
> Thu, Aug 14, 2008 at 12:18 AM, Ricky <ri...@gmail.com> wrote:> >> > >
> Hi,> > >> > > Thanks for your reply. I used jboss:harddeploy and it worked
> for me.> > > However> > > i see that jboss:start doesnt actually start the
> server. Am i missing> > > something?> >> >> > I never used jboss plugin so I
> can't tell why it doesn't start.> >> >> > > and also jboss:deploy vs hard
> deploy whats the difference?> >> >> > No idea, but I can imagine is that
> jboss:deploy is deployment via jmx> > deployer and hard deploy is just
> dropping the artifact to the hot> > deployment> > directory of jboss.> >> >
> Siarhei> >
> _________________________________________________________________
> Your PC, mobile phone, and online services work together like never before.
> http://clk.atdmt.com/MRT/go/108587394/direct/01/

RE: Deploying war to JBOSS using maven

Posted by Martin Gainty <mg...@hotmail.com>.
Rick-
please display stacktrace from your logMartin ______________________________________________ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > Date: Thu, 14 Aug 2008 07:45:03 -0400> From: ricky.nj@gmail.com> To: users@maven.apache.org> Subject: Re: Deploying war to JBOSS using maven> > could be. I am going to dig and just as an FYI let you know. Thanks and> appreciate your response!> > Rick> > On Wed, Aug 13, 2008 at 6:34 PM, Siarhei Dudzin <si...@gmail.com>wrote:> > > On Thu, Aug 14, 2008 at 12:18 AM, Ricky <ri...@gmail.com> wrote:> >> > > Hi,> > >> > > Thanks for your reply. I used jboss:harddeploy and it worked for me.> > > However> > > i see that jboss:start doesnt actually start the server. Am i missing> > > something?> >> >> > I never used jboss plugin so I can't tell why it doesn't start.> >> >> > > and also jboss:deploy vs hard deploy whats the difference?> >> >> > No idea, but I can imagine is that jboss:deploy is deployment via jmx> > deployer and hard deploy is just dropping the artifact to the hot> > deployment> > directory of jboss.> >> > Siarhei> >
_________________________________________________________________
Your PC, mobile phone, and online services work together like never before.
http://clk.atdmt.com/MRT/go/108587394/direct/01/

Re: Deploying war to JBOSS using maven

Posted by Ricky <ri...@gmail.com>.
could be. I am going to dig and just as an FYI let you know. Thanks and
appreciate your response!

Rick

On Wed, Aug 13, 2008 at 6:34 PM, Siarhei Dudzin <si...@gmail.com>wrote:

> On Thu, Aug 14, 2008 at 12:18 AM, Ricky <ri...@gmail.com> wrote:
>
> > Hi,
> >
> > Thanks for your reply. I used jboss:harddeploy and it worked for me.
> > However
> > i see that jboss:start doesnt actually start the server. Am i missing
> > something?
>
>
> I never used jboss plugin so I can't tell why it doesn't start.
>
>
> > and also jboss:deploy vs hard deploy whats the difference?
>
>
> No idea, but I can imagine is that jboss:deploy is deployment via jmx
> deployer and hard deploy is just dropping the artifact to the hot
> deployment
> directory of jboss.
>
> Siarhei
>

Re: Deploying war to JBOSS using maven

Posted by Siarhei Dudzin <si...@gmail.com>.
On Thu, Aug 14, 2008 at 12:18 AM, Ricky <ri...@gmail.com> wrote:

> Hi,
>
> Thanks for your reply. I used jboss:harddeploy and it worked for me.
> However
> i see that jboss:start doesnt actually start the server. Am i missing
> something?


I never used jboss plugin so I can't tell why it doesn't start.


> and also jboss:deploy vs hard deploy whats the difference?


No idea, but I can imagine is that jboss:deploy is deployment via jmx
deployer and hard deploy is just dropping the artifact to the hot deployment
directory of jboss.

Siarhei

Re: Deploying war to JBOSS using maven

Posted by Ricky <ri...@gmail.com>.
Hi,

Thanks for your reply. I used jboss:harddeploy and it worked for me. However
i see that jboss:start doesnt actually start the server. Am i missing
something? and also jboss:deploy vs hard deploy whats the difference?



On Wed, Aug 13, 2008 at 4:47 PM, Siarhei Dudzin <si...@gmail.com>wrote:

> Does your JBoss instance listen to port 9090?
>
> Anyway, cargo plugin used to work for me.
>
> Siarhei
>
> On Wed, Aug 13, 2008 at 8:40 PM, Ricky <ri...@gmail.com> wrote:
>
> > Hi,
> >
> > I am using : http://mojo.codehaus.org/jboss-maven-plugin/usage.html to
> > deploy to JBOSS. I have set JBOSS_HOME as a system variable to
> > <some-directory>\jboss. Then i use the following entry in POM xml for the
> > project i am trying to deploy :
> >  <plugin>
> >                    <groupId>org.codehaus.mojo</groupId>
> >                    <artifactId>jboss-maven-plugin</artifactId>
> >                 <configuration>
> >                     <project></project>
> >                       <jbossHome>${JBOSS_HOME}/server/default</jbossHome>
> >                      <port>9090</port>
> >                </configuration>
> >              </plugin>
> >
> >
> > However, it doesn't work, when i do mvn jboss:deploy, following error :
> >
> > *[INFO] No server specified for authentication - using defaults
> > [INFO]
> > ------------------------------------------------------------------------
> > [ERROR] BUILD ERROR
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Mojo error occurred: Connection refused: connect*
> >
> >
> > *Any ideas??*
> >
> > any help would be appreciable, thanks in advance.
> >
> >
> > Regards
> > Vyas, Anirudh
> > || ॐ ||
> >
>



-- 

Regards
Vyas, Anirudh
|| ॐ ||

Re: Deploying war to JBOSS using maven

Posted by Siarhei Dudzin <si...@gmail.com>.
Does your JBoss instance listen to port 9090?

Anyway, cargo plugin used to work for me.

Siarhei

On Wed, Aug 13, 2008 at 8:40 PM, Ricky <ri...@gmail.com> wrote:

> Hi,
>
> I am using : http://mojo.codehaus.org/jboss-maven-plugin/usage.html to
> deploy to JBOSS. I have set JBOSS_HOME as a system variable to
> <some-directory>\jboss. Then i use the following entry in POM xml for the
> project i am trying to deploy :
>  <plugin>
>                    <groupId>org.codehaus.mojo</groupId>
>                    <artifactId>jboss-maven-plugin</artifactId>
>                 <configuration>
>                     <project></project>
>                       <jbossHome>${JBOSS_HOME}/server/default</jbossHome>
>                      <port>9090</port>
>                </configuration>
>              </plugin>
>
>
> However, it doesn't work, when i do mvn jboss:deploy, following error :
>
> *[INFO] No server specified for authentication - using defaults
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Mojo error occurred: Connection refused: connect*
>
>
> *Any ideas??*
>
> any help would be appreciable, thanks in advance.
>
>
> Regards
> Vyas, Anirudh
> || ॐ ||
>