Hi Scott,
After some battling I have managed to do a sort of a work around...
I only include the weblogic deployment plugin in those projects that
need it, and
I bind that plugin to the install phase.
:
<executions>
<execution>
<goals>redeploy</goals><!-- undeploy / deploy / redeploy as needed
-->
<phase>install</phase>
</execution>
</executions>
:
I can then go to the 'parent' and issue mvn install.
All projects are built and installed into repository, and those which
have the plugin are deployed. Close enough to what I want for now. I
don't know if it's possible to create your own lifecycle (copy of the
default, but with a post-deployment phase which would be the right place
to bind the plugin into).
I can also install an individual project by going to that project's
folder and doing
Mvn weblogic:deploy there.
Regards
Anton Schoultz
-----Original Message-----
From: Scott Ryan [mailto:[EMAIL PROTECTED] On Behalf Of Scott Ryan
Sent: Tuesday 07 August 2007 14:26
To: Maven Users List
Subject: Re: WebLogic Deployment ok from child, fails from parent ?
You have to run the deploy command from the war directory if you want
to deploy the war. This is because the project type and object location
are dynamically determined from the pom.xml of the directory
you are running in. You cannot run the command from the parent
directory because it will then try to deploy all artifacts in all
projects which is not what you want. What is it you are trying to do
exactly? The plugin will work with the deployment information defined
anywhere in any parent pom but you must run the command from the proper
project. I suppose I could include code to ignore deployments made from
directories that are not supported but that
breaks complex projects. For example if you have a parent and a war
child and jar child and ear child. You only want the ear to deploy but
how does the plugin know not to deploy the war as well.
You will have to describe the scenario that you want to occur so that I
can understand what you are expecting to happen. Use a complex project
containing a parent pom of project type pom and 3 child
projects one jar, one ear, and one war. What would you like to
happen in this case?
Scott Ryan
On Aug 6, 2007, at 6:25 PM, [EMAIL PROTECTED] wrote:
> Scott,
>
> I have the same problem here, I have the plugin defined in parent pom
> (under pluginManagement).
>
> When I run "mvn weblogic:deploy" from the parent, it assumes that the
> parent pom is a war project and then tries to deploy the war artifact
> of the parent at the parent level. This immediately fails because the
> parent pom is simply an aggregate of sub modules and the war artifacts
> of the parent does not exists.
>
> Is this supported? If so I'd love to get it going too.
>
> Cheers,
> rOnn c.
>
>
>
>
>
>
>
> Scott Ryan <[EMAIL PROTECTED]>
> Sent by: Scott Ryan <[EMAIL PROTECTED]>
> 08/03/2007 11:53 PM
> Please respond to
> "Maven Users List" <[email protected]>
>
>
> To
> "Maven Users List" <[email protected]> cc
>
> Subject
> Re: WebLogic Deployment ok from child, fails from parent ?
>
>
>
>
>
>
> Why is the plugin definition not in your parent? If you run the
> command in the parent directory then the plugin definition needs to be
> there as well.
>
> Scott Ryan
> On Aug 3, 2007, at 1:04 AM, Anton Schoultz wrote:
>
>> Hi,
>>
>> I have an prototype setup with three modules, 2 Jars and a WEB app.
>> I have set up the WebLogic plugins in the web project.
>>
>> When I CD to the web project and "mvn weblogic:deploy" the web app is
>> deployed as expected.
>>
>> However, if I go to the root/parent dir and try "mvn weblogic:deploy"
>> I get this error
>>
>> [INFO] Reactor build order:
>> [INFO] Unnamed - com.mergere.mvnbook:build-all-aggregator:pom:1
>> [INFO] console
>> [INFO] helloworld
>> [INFO] helloWeb
>> [INFO] Searching repository for plugin with prefix: 'weblogic'.
>> [INFO]
>> ---------------------------------------------------------------------
>> -
>> --
>> [ERROR] BUILD ERROR
>> [INFO]
>> ---------------------------------------------------------------------
>> -
>> --
>> [INFO] The plugin 'org.apache.maven.plugins:maven-weblogic-plugin'
>> does
>> not exist or no valid version could be found
>>
>> in this setup I'm ONLY looking at deployment issues.
>>
>> Here's the parent pom
>>
>> <project>
>> <modelVersion>4.0.0</modelVersion>
>> <groupId>com.mergere.mvnbook</groupId>
>> <artifactId>build-all-aggregator</artifactId>
>> <version>1</version>
>> <packaging>pom</packaging>
>> <modules>
>> <module>console</module>
>> <module>helloworld</module>
>> <module>helloWeb</module>
>> </modules>
>> </project>
>>
>>
>>
>> And here's the web-app (child) pom
>>
>> <project>
>> <parent>
>> <artifactId>build-all-aggregator</artifactId>
>> <groupId>com.mergere.mvnbook</groupId>
>> <version>1</version>
>> </parent>
>> <modelVersion>4.0.0</modelVersion>
>> <groupId>anton</groupId>
>> <artifactId>helloWeb</artifactId>
>> <name>helloWeb</name>
>> <description>testWeb</description>
>> <packaging>war</packaging>
>> <version>1.0-SNAPSHOT</version>
>> <url>http://maven.apache.org</url>
>> <dependencies>
>> <dependency>
>> <groupId>junit</groupId>
>> <artifactId>junit</artifactId>
>> <version>3.8.1</version>
>> <scope>test</scope>
>> </dependency>
>> </dependencies>
>>
>> <build>
>> <plugins>
>> <plugin><!-- WebLogic Plugin for
>> deploy ================================== WebLogic -->
>> <groupId>org.codehaus.mojo</groupId>
>> <artifactId>weblogic-maven-plugin</artifactId>
>> <version>2.9.0-SNAPSHOT</version>
>> <configuration>
>>
>> <adminServerHostName>${weblogicServerHostName}</
>> adminServerHostName><!--
>> localhost -->
>>
>> <adminServerPort>${weblogicServerPort}</adminServerPort>
>>
>> <adminServerProtocol>http</adminServerProtocol>
>> <userId>${weblogicUserId}</userId>
>> <password>${weblogicPassword}</password>
>> <upload>true</
>> upload>
>> <remote>true</
>> remote>
>> <verbose>true</
>> verbose>
>> <debug>false</debug>
>>
>> <targetNames>${weblogicTargetNames}</targetNames>
>>
>> <artifactPath>D:\build\helloWeb\target\helloWeb-1.0-SNAPSHOT.war</
>> artifa
>> ctPath>
>> <name>helloWeb</name><!-- app name on the server -->
>> <projectPackaging>war</projectPackaging>
>> </configuration>
>> </plugin>
>> </plugins>
>> </build>
>>
>> </project>
>>
>>
>> Any ideas? How should I be approaching this?
>>
>> In our situataion we have 50 odd projects, most of which are
>> deployable (ear / war), with only a handfull being jar projects. We'd
>> like to be able to deploy all of them in one cmd.
>> I figure each deployable project will have it's own weblogic plugin
>> and config - with more generic handling of the artifactPath
>> obviously.
>>
>> TestBox: WinXp; WebLogic:9.2x; Maven:2.0.6; Jdk:1.5.0_06
>>
>> Anton Schoultz
>> Senior Java developer
>> Life Systems - Servicing
>> Discovery Life
>> Direct: +27 11 529 1636
>> Mobile: +27 83 651 7191
>> Email: [EMAIL PROTECTED]
>>
>>
>> Discovery Holdings Limited
>>
>> Registration number: 1999/007789/06
>>
>> This message and any attachments are confidential and intended solely
>> for the addressee. If you have received this message in error, please
>> notify Discovery immediately, telephone number +27 11
>> 529 2888. Any unauthorised use; alteration or dissemination of the
>> contents of this email is strictly prohibited. In no event will
>> Discovery or the sender be liable in any manner whatsoever to any
>> person for any loss or any direct, indirect, special or consequential
>> damages arising from use of this email or any linked website,
>> including, without limitation, from any lost profits, business
>> interruption, loss of programmes or other data that may be stored on
>> any information handling system or otherwise from any assurance that
>> this email is virus free even if Discovery is expressly advised of
>> the possibility of such damages. Discovery is an Authorised Financial
>> Services Provider. A full list of directors is available on our
>> website at https://www.discovery.co.za/index_login.jhtml?p_content=/
>> investor_relations/directorate.jhtml alternatively, to obtain a full
>> list of Directors via email, please email
>> [EMAIL PROTECTED]
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
> Scott Ryan
> CTO Soaring Eagle L.L.C.
> Denver, Co. 80129
> www.soaringeagleco.com
> www.theryansplace.com
> (303) 263-3044
> [EMAIL PROTECTED]
>
>
>
>
> ######################################################################
> DISCLAIMER:
> This email and any attachment may contain confidential information.
> If you are not the intended recipient you are not authorized to copy
> or disclose all or any part of it without the prior written consent of
> Toyota.
>
> Opinions expressed in this email and any attachments are those of the
> sender and not necessarily the opinions of Toyota.
> Please scan this email and any attachment(s) for viruses.
> Toyota does not accept any responsibility for problems caused by
> viruses, whether it is Toyota's fault or not.
> ######################################################################
Scott Ryan
CTO Soaring Eagle L.L.C.
Denver, Co. 80129
www.soaringeagleco.com
www.theryansplace.com
(303) 263-3044
[EMAIL PROTECTED]
Discovery Holdings Limited
Registration number: 1999/007789/06
This message and any attachments are confidential and intended solely for the
addressee. If you have received this message in error, please notify Discovery
immediately, telephone number +27 11 529 2888. Any unauthorised use; alteration
or dissemination of the contents of this email is strictly prohibited. In no
event will Discovery or the sender be liable in any manner whatsoever to any
person for any loss or any direct, indirect, special or consequential damages
arising from use of this email or any linked website, including, without
limitation, from any lost profits, business interruption, loss of programmes or
other data that may be stored on any information handling system or otherwise
from any assurance that this email is virus free even if Discovery is expressly
advised of the possibility of such damages. Discovery is an Authorised
Financial Services Provider. A full list of directors is available on our
website at
https://www.discovery.co.za/index_login.jhtml?p_content=/investor_relations/directorate.jhtml
alternatively, to obtain a full list of Directors via email, please email
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]