My settings file doesn't have a namespace specified. Can you try removing
the default namespace from your settings file and see if that works?
 
Just make the first element: <settings>

Remove:  xmlns="http://maven.apache.org/POM/4.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd";


-----Original Message-----
From: Vidya Mahavadi [mailto:[EMAIL PROTECTED] 
Sent: Friday, 2 February 2007 1:59 AM
To: Maven Users List
Subject: RE: jboss-maven-plugin

Thanks for the response and the hope. My settings.xml  in .m2 folder looks
like this now. However, it still has the same 401 unauthentication problem.

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/POM/4.0.0";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
                      http://maven.apache.org/xsd/settings-1.0.0.xsd";>
 
  <servers>
        <server>
                <id>default</id>
                <username>admin</username>
                 <password>admin</password>
                <privateKey></privateKey>
                <passphrase></passphrase>
                <filePermissions></filePermissions>
                <directoryPermissions></directoryPermissions>
                <configuration></configuration>
        </server>
  </servers>
</settings>





"Greg Jones" <[EMAIL PROTECTED]>
01/02/2007 15:41
Please respond to
"Maven Users List" <users@maven.apache.org>


To
"'Maven Users List'" <users@maven.apache.org>
cc

Subject
RE: jboss-maven-plugin






Aha!

Firstly, my apologies to the previous poster about the server element. I 
was
getting mixed up with the serverName element on the configure goal.

Response 401 is the HTTP Unauthorized code, which means that your Jboss 
has
been set up to expect a username/password combination for your 
jmx-console.

You need to create a file called settings.xml in your HOME/.m2 directory,
with information about the server, for example:

<settings>
  <server>
    <id>default</id>
    <username>Your Username</username>
    <password>Your Password</password>
  </server>
</settings>

This will tell the jboss plugin to use these credentials when logging in 
to
a server identified by 'default'.

If you are on Linux, your settings.xml will be in ~/.m2. On Windows, look 
at
the value of your HOMEDRIVE and HOMEPATH environment variables and look 
for
your .m2 directory there. This directory will contain your local 
repository
as well.

For more information on what you can store in your local settings file, 
see
http://maven.apache.org/settings.html.

Hope this helps.

Greg J.


-----Original Message-----
From: Vidya Mahavadi [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 1 February 2007 11:57 PM
To: Maven Users List
Subject: RE: jboss-maven-plugin

C:\Vidya\WorkSpace\dealamendments>mvn -e jboss:deploy
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'jboss'.
[INFO]
----------------------------------------------------------------------------
[INFO] Building RMB Calypso Schema
[INFO]    task-segment: [jboss:deploy]
[INFO]
----------------------------------------------------------------------------
[INFO] [jboss:deploy]
[INFO] Deploying
C:\Vidya\WorkSpace\dealamendments\target\dealamendments-1.0-SNAPSHOT.jar
to JBoss.
[INFO] No server specified for authentication - using defaults [INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Mojo error occurred: Server returned HTTP response code: 401 for
URL: http://localhost:8080/jmx-c
onsole/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDep
loyer&methodName=deploy&argT
ype=java.net.URL&arg0=file:C:\Vidya\WorkSpace\dealamendments\target\dealamen
dments-1.0-SNAPSHOT.jar

[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Mojo error
occurred: Server returned HTTP respon
se code: 401 for URL: 
http://localhost:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jbo

ss.sys
tem:service%3DMainDeployer&methodName=deploy&argType=java.net.URL&arg0=file:
C:\Vidya\WorkSpace\dealamend
ments\target\dealamendments-1.0-SNAPSHOT.jar
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife
cycleExecutor.jav
a:559)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(De
faultLifecycleExe
cutor.java:488)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifec
ycleExecutor.java
:458)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFail
ures(DefaultLifec
ycleExecutor.java:306)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defa
ultLifecycleExecu
tor.java:273)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycle
Executor.java:140
)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
        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:585)
        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: Server returned HTTP res
ponse code: 401 for URL: 
http://localhost:8080/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jbo

ss.
system:service%3DMainDeployer&methodName=deploy&argType=java.net.URL&arg0=fi
le:C:\Vidya\WorkSpace\dealam
endments\target\dealamendments-1.0-SNAPSHOT.jar
        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(DefaultPluginManage
r.java:412)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife
cycleExecutor.jav
a:534)
        ... 16 more
Caused by: java.io.IOException: Server returned HTTP response code: 401 
for
URL: http://localhost:8080/j
mx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMai
nDeployer&methodName=deploy&
argType=java.net.URL&arg0=file:C:\Vidya\WorkSpace\dealamendments\target\deal
amendments-1.0-SNAPSHOT.jar
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection
.java:1149)
        at
org.codehaus.mojo.jboss.AbstractDeployerMojo.doURL(AbstractDeployerMojo.java
:96)
        ... 19 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Thu Feb 01 14:55:58 GMT+02:00 2007 [INFO] Final 
Memory:
2M/5M [INFO]
------------------------------------------------------------------------





"Greg Jones" <[EMAIL PROTECTED]>
01/02/2007 13:41
Please respond to
"Maven Users List" <users@maven.apache.org>


To
"'Maven Users List'" <users@maven.apache.org>
cc

Subject
RE: jboss-maven-plugin






Hi Vidya,

Ignore the previous response. The <server> element in the 
jboss-maven-plugin
specifies which server definition to use for Jboss, not which (host) 
server
to use. In your case it is probably 'default' so leave it at that.

I suspect your problem stems from something else. Can you run Maven with
error reporting turned on (e.g. mvn -e clean install) and send your output
to this list.

Regards,

Greg.


-----Original Message-----
From: Vidya Mahavadi [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 1 February 2007 8:35 PM
To: Maven Users List
Subject: Re: jboss-maven-plugin

Where is settings.xml located.. I cannot find it in jboss or my project
folder. I am using jboss 4.0.5 and maven2.





"Arik Kfir" <[EMAIL PROTECTED]> 
31/01/2007 17:51
Please respond to
"Maven Users List" <users@maven.apache.org>


To
"Maven Users List" <users@maven.apache.org>
cc

Subject
Re: jboss-maven-plugin






the <server> specifies the corresponding "<server>" block in your
settings.xml file which should contain the username/password to login to 
the
machine where the jbosshome is located.

On 1/31/07, Wayne Fay <[EMAIL PROTECTED]> wrote:
>
> I don't use jboss-m-p. However reading the error message, I would try
> removing the <server>default</> line from the config and try again.
>
> Wayne
>
> On 1/31/07, Vidya Mahavadi <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I am trying to use jboss-maven-plugin(maven2) from codehaus for
> deployment
> > in jboss 4.0. Here is my plugin configuration, can anyone please tell 
me
> > what I am missing in here..
> >
> >            <plugin>
> >                <groupId>org.codehaus.mojo</groupId>
> >                <artifactId>jboss-maven-plugin</artifactId>
> >                <configuration>
> >                    <jbossHome>c:/software/jboss-4.0.5.GA</jbossHome>
> >                    <server>default</server>
> >                    <hostName>localhost</hostName>
> >                    <port>8080</port>
> >                    <fileName>
> >
> > ${project.build.directory}\${project.build.finalName}.${
> project.packaging}
> >                    </fileName>
> >
> >                </configuration>
> >            </plugin>
> >
> > And here is the error trace.
> >
> > [INFO] [jboss:deploy]
> > [INFO] Deploying
> > 
C:\Vidya\WorkSpace\dealamendments\target\dealamendments-1.0-SNAPSHOT.jar
> > to JBoss.
> > [INFO]
> > 
------------------------------------------------------------------------
> > [ERROR] BUILD ERROR
> > [INFO]
> > 
------------------------------------------------------------------------
> > [INFO] Mojo error occurred: Server not defined in settings.xml: 
default
> >
> >
> > Thanks,
> > Vidya
> >
> > This e-mail is subject to a disclaimer, available at
> >
> 
http://www.rmb.co.za/web/elements.nsf/online/disclaimer-communications.html



> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


This e-mail is subject to a disclaimer, available at
http://www.rmb.co.za/web/elements.nsf/online/disclaimer-communications.html




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



This e-mail is subject to a disclaimer, available at
http://www.rmb.co.za/web/elements.nsf/online/disclaimer-communications.html



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



This e-mail is subject to a disclaimer, available at
http://www.rmb.co.za/web/elements.nsf/online/disclaimer-communications.html


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to