Kris Bravo wrote:
> Okay, finally worked it out.

Great!

> 
> First, the file:// url clearly won't work. That's a local reference, and
> the jar isn't shipped over to the server at any time.
> 
> So I changed to an http reference aimed at my internal maven-proxy
> repository deployment. That failed since "file:" is hardcoded into the
> DeployMojo.
> 
> So now I'm certain of one thing: you were pulling my leg :)

No..I use this for HTTP deployment for local development...still
considered the remote deployer.  I wrote it to use the remote deployer
since its not a persistent deployer.  As soon as you restart, you have a
fresh JBoss...great for developing lots of apps ;-)  I just never
deployed to a remote server.

> 
> Patch to be attached to a jira ticket somewhere, rsn.

Are you opening a JIRA or should I just fix it?

> 
> The outcome is that, after the patch, the following config will work:
>          <plugin>
>             <groupId>org.codehaus.mojo</groupId>
>             <artifactId>jboss-maven-plugin</artifactId>
>             <configuration>
> 
> <fileName>http://proxy-host/maven-proxy-webapp/repository/path-to-deployment/${project.artifactId}/${project.version}/${project.build.finalName}.jar</fileName>
>                <hostName>jboss-hostname</hostName>
>                <port>embedded-tomcat-port</port>
>             </configuration>
>          </plugin>         
> And a deploy is required before the jboss deploy because otherwise the
> file won't be available:
> 
> mvn deploy jboss:deploy
> 
> Kris
> 
> On Wed, 2006-01-11 at 21:59 -0500, Kris Bravo wrote:
>> No dice:
>> [ERROR] BUILD ERROR
>> [INFO]
>> ----------------------------------------------------------------------------
>> [INFO] Mojo error occurred: Server returned HTTP response code: 500 for
>> URL:
>> http://hostname.us:1115/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=deploy&argType=java.net.URL&arg0=file:target/bront-ejb-1.0.jar
>>
>> So what exactly is supposed to happen here? The file:// url looks like
>> it's only appropriate for my local box, not the server. 
>>
>> Kris
>>
>> On Wed, 2006-01-11 at 09:07 -0700, Jeff Genender wrote:
>>> Yeah...I was thinking a map too of some form...I was just hoping to
>>> leverage something that was already there.  There must be a mapping
>>> somewhere since maven already adds the extension on the backend.
>>>
>>> Lets see if Brett has an idea...and if not, I'll map the package to an
>>> extension.
>>>
>>> Let me know if it works for you.
>>>
>>> Jeff
>>>
>>> Kris Bravo wrote:
>>>> cool, thanks. I considered giving you a patch with a map, but the only
>>>> entry would have been ejb=jar.
>>>>
>>>> Kris Bravo
>>>> Corridor Software, Inc.
>>>> http://www.corridor-software.us
>>>>
>>>>> The problem is the packaging as its the only way I know can pull whether
>>>>> its a .jar or .war. Maybe Brett can show me a better way.  Anyways...you
>>>>> can fix this with an override:
>>>>>
>>>>> Add this to your configuration.
>>>>>
>>>>> <fileName>${project.build.directory}/app-ejb-1.0.jar</fileName>
>>>>>
>>>>> That should work for you.
>>>>>
>>>>> Jeff
>>>>>
>>>>> Kris Bravo wrote:
>>>>>> To the group as well...
>>>>>>
>>>>>> ---------------------------- Original Message
>>>>>> ----------------------------
>>>>>> Subject: Re: [mojo-dev] Jboss remote deployments?
>>>>>> From:    "Kris Bravo" <[EMAIL PROTECTED]>
>>>>>> Date:    Tue, January 10, 2006 1:49 pm
>>>>>> To:      [EMAIL PROTECTED]
>>>>>> --------------------------------------------------------------------------
>>>>>>
>>>>>> great, thanks for the feedback. I'm assuming that .ear and an .jar full
>>>>>> of
>>>>>> ejb's are deployable.
>>>>>>
>>>>>> My project packaging is ejb, I'm not sure why it's sending the name
>>>>>> artifact-version.ejb instead. Oh, wait, I just figured out why: The docs
>>>>>> say the fileName is
>>>>>> ${project.build.directory}/${project.build.finalName}.${project.packaging}.
>>>>>> That doesn't seem right for <packaging>ejb</packaging>. When I get back
>>>>>> to
>>>>>> the office I'll overwrite this to end with .jar and see where it takes
>>>>>> me.
>>>>>>
>>>>>> In the mean time, if you have an example plugin description I could
>>>>>> certainly use it. Or perhaps you could give feedback on mine:
>>>>>>
>>>>>>             <plugin>
>>>>>>                 <groupId>org.codehaus.mojo</groupId>
>>>>>>                 <artifactId>jboss-maven-plugin</artifactId>
>>>>>>                 <configuration>
>>>>>>                     <hostName>source.blah.blah.us</hostName>
>>>>>>                     <port>1115</port>
>>>>>>                     <server>intranet.j2ee</server>
>>>>>>                 </configuration>
>>>>>>             </plugin>
>>>>>> This doesn't seem to do it for an ejb project. But I suspect it's simply
>>>>>> the .ejb vs .jar ending issue.
>>>>>>
>>>>>> For the long term deployments, I have continuum running on the same
>>>>>> machine as the jboss server, so I should be okay for permanent
>>>>>> deployments
>>>>>> with proper profiles. Thanks for the heads up.
>>>>>>
>>>>>> Kris Bravo
>>>>>> Corridor Software, Inc.
>>>>>> http://www.corridor-software.us
>>>>>>
>>>>>>> Yes, the jboss plugin fully supports remote deployments and was really
>>>>>> the reason I wrote it ;-)
>>>>>>> Yes, IIRC you can only deploy valid supported types.
>>>>>>>
>>>>>>> .ejb is not a valid deployable.  Jboss wants to see a war/jar/sar, etc.
>>>>>>>
>>>>>>> Please also keep in mind that remote deploying on JBoss means the
>>>>>> deployment does not stick after a server reboot.  Its just good to use
>>>>>> for development.
>>>>>>> Jeff
>>>>>>>
>>>>>>> Kris Bravo wrote:
>>>>>>>> Does the jboss maven plugin support remote deployments? I assumed from
>>>>>> the docs that the following:
>>>>>>>>          <plugin>
>>>>>>>>             <groupId>org.codehaus.mojo</groupId>
>>>>>>>>             <artifactId>jboss-maven-plugin</artifactId>
>>>>>>>>             <configuration>
>>>>>>>>                <hostName>remote.server.domain</hostName>
>>>>>>>>                <port>1115</port>
>>>>>>>>             </configuration>
>>>>>>>>          </plugin>
>>>>>>>> would transmit an ejb or ear file to the server and deploy it;
>>>>>>>> however,
>>>>>> I'm getting the following error:
>>>>>>>> Caused by: java.io.IOException: Server returned HTTP response code:
>>>>>>>> 500
>>>>>> for URL:
>>>>>>>> http://server.atlanta.ga.us:1115/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=deploy&argType=java.net.URL&arg0=file:/path-to-file/target/app-ejb-1.0.ejb
>>>>>>>>         at
>>>>>>>> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1149)
>>>>>>>>         at
>>>>>>>> org.codehaus.mojo.jboss.AbstractDeployerMojo.doURL(AbstractDeployerMojo.java:96)
>>>>>>>>
>>>>>>>> throwing this url in a browser returns this error:
>>>>>>>> Cause: org.jboss.deployment.DeploymentException: url
>>>>>>>> file:/path-to-file/target/app-ejb-1.0.ejb could not be opened, does it
>>>>>> exist?
>>>>>>>> Is it a mistake that the file ends with .ejb instead of ear?
>>>>>>>>
>>>>>>>> If this isn't supported, please let me know. I've read somewhere that
>>>>>> so long as a url points to the file, it can be deployed on the jboss
>>>>>> instance. If that's the case, I'd like to modify the jboss plugin to
>>>>>> support deploying from the deployment destination (i.e., my internal
>>>>>> release repository).
>>>>>>>> Kris Bravo
>>>>>>>>
>>>>>>>>
>>>>>>

Reply via email to