You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by mjohnsonaz74 <mj...@hotmail.com> on 2006/04/06 21:52:15 UTC

[m2] Weblogic J2EE Plugin

I am trying to convert an existing and convoluted project at work to Maven 2
from an existing Ant build script.  I'm starting to get the hang of breaking
one large project into multiple small projects (i.e. one artifact per
project), but I'm running into the following issue.  I create three projects
(we'll call them jar, war, ear) and then I call them in order from a parent
POM.  Each module depends on the one before it (war depends on jar, and ear
depends on war).  What I'm trying to do is build one ear file from the three
projects.  I'm a bit confused, however, since the ant script uses wlcompile,
wlappc, etc. to build the script and pre-compile the jsp code.  Finally, my
question...Can someobody please provide me a sample POM that uses the
weblogic plugin and calls these tasks so that I can see how it's used?  The
documentation on the plugin is less then enlightening and I'm running in
circles over what, I hope, is a trivial issue.  If I could see a working POM
file that uses this plugin that would help me out a lot.  Thank you in
advance!

--MJ
--
View this message in context: http://www.nabble.com/-m2-Weblogic-J2EE-Plugin-t1408033.html#a3791766
Sent from the Maven - Users forum at Nabble.com.


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


Re: [m2] Weblogic J2EE Plugin

Posted by Konstantin Polyzois <po...@gmail.com>.
cool glad to be of assistance.

On 4/10/06, mjohnsonaz74 <mj...@hotmail.com> wrote:
>
>
> Thank you.  As I suspected it was a significant, yet trivial
> misunderstanding
> on my part.  I wasn't specifying goals inside of an execution block and
> instead I was trying to stack POM's and have the plugin point to another
> project as its artifiact.  If that last sentence didn't make any sense,
> then
> you'll truly understand how confused I was... =)  thank you again for the
> sample, it helped me out tremendously.
>
> --MJ
> --
> View this message in context:
> http://www.nabble.com/-m2-Weblogic-J2EE-Plugin-t1408033.html#a3849556
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: [m2] Weblogic J2EE Plugin

Posted by mjohnsonaz74 <mj...@hotmail.com>.
Thank you.  As I suspected it was a significant, yet trivial misunderstanding
on my part.  I wasn't specifying goals inside of an execution block and
instead I was trying to stack POM's and have the plugin point to another
project as its artifiact.  If that last sentence didn't make any sense, then
you'll truly understand how confused I was... =)  thank you again for the
sample, it helped me out tremendously.

--MJ
--
View this message in context: http://www.nabble.com/-m2-Weblogic-J2EE-Plugin-t1408033.html#a3849556
Sent from the Maven - Users forum at Nabble.com.


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


Re: [m2] Weblogic J2EE Plugin

Posted by Konstantin Polyzois <po...@gmail.com>.
Ok basic pom for building using appc follows (please note that you have to
install weblogic files in to your repo):

<project 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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.mycompany.app</groupId>
  <artifactId>my-webapp</artifactId>
  <packaging>war</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>Maven Webapp Archetype</name>
  <url>http://maven.apache.org</url>


  <pluginRepositories>
  <pluginRepository>
    <id>snapshots</id>
    <url>http://snapshots.maven.codehaus.org/maven2</url>
  </pluginRepository>
</pluginRepositories>


  <build>
    <finalName>my-webapp</finalName>

    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>weblogic-maven-plugin</artifactId>
        <version>2.8.0-SNAPSHOT</version>
    <executions>
      <execution>
          <phase>package</phase>
              <goals>
             <goal>appc</goal>
          </goals>
      </execution>
    </executions>
      </plugin>
    </plugins>

  </build>
</project>

On 4/10/06, mjohnsonaz74 <mj...@hotmail.com> wrote:
>
>
> Yes, this is a Maven 2 plugin.  "This plugin provides support for Weblogic
> 9.0 deployment capabilities as well as artifact (EAR, WAR, RAR, etc.)
> compilation within the maven 2 environment."  It also supports Weblogic
> 8.x.
> You can find this plugin at
> http://mojo.codehaus.org/weblogic-maven-plugin/index.html
>
> --MJ
> --
> View this message in context:
> http://www.nabble.com/-m2-Weblogic-J2EE-Plugin-t1408033.html#a3844699
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: [m2] Weblogic J2EE Plugin

Posted by mjohnsonaz74 <mj...@hotmail.com>.
Yes, this is a Maven 2 plugin.  "This plugin provides support for Weblogic
9.0 deployment capabilities as well as artifact (EAR, WAR, RAR, etc.)
compilation within the maven 2 environment."  It also supports Weblogic 8.x. 
You can find this plugin at
http://mojo.codehaus.org/weblogic-maven-plugin/index.html

--MJ
--
View this message in context: http://www.nabble.com/-m2-Weblogic-J2EE-Plugin-t1408033.html#a3844699
Sent from the Maven - Users forum at Nabble.com.


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


RE: [m2] Weblogic J2EE Plugin

Posted by mjohnsonaz74 <mj...@hotmail.com>.

Scott Ryan-2 wrote:
> 
> I just returned from overseas so as soon as I catch up on some sleep I
> will
> update this issue.  There are samples posted on the Codehaus website but
> let
> me try and understand more of what you are trying to do and see if I can
> come up with a sample.  It looks like you are needing more of the base
> maven
> plugins rather than the weblogic plugin.  The weblogic plugin is to be
> used
> after you have assembled each artifact and want to compile and deploy
> those
> artifacts.  The base maven plugins (jar, ear, war, etc) should be used
> first
> to assemble your artifacts.
> 
> More after a few hours shuteye.....
> 
> Scott Ryan
> Chief Technology Officer
> Soaring Eagle L.L.C.
> scott@theryansplace.com
> www.soaringeagleco.com
> (303) 263-3044
> 

Hey Scott, it was good to finally meet you last night.  Let me rehash where
I'm at right now with the plugin and perhaps you can help me in the right
direction.  As it stands I realized that I needed to run the APPC goal
against the finished ear file, where before I was trying to run it against
the war file before I created the ear.  So, finally got that figured out. 
The problem I'm having now is that when APPC runs against the ear file,
nothing else can take place after the APPC goal.  The goal runs and then
maven stops.  I have the APPC goal set for the "package" phase and I execute
it by runnning mvn package.  However, when I run mvn install the APPC goal
executes (as expected), but then maven finishes without installing my ear. 
It seems like nothing else can run after APPC.  Perhaps theres a problem
with the plugin passing control back to Maven?  Below is my ear pom.  Please
let me know if it's something trivial that I did wrong (hopefully, this is
the cause) or if you think there's a bug in the plugin.  Thanks for your
help!

--MJ

<project> 
  <modelVersion>4.0.0</modelVersion> 
  <groupId>twtc</groupId> 
  <artifactId>um-ear</artifactId> 
  <version>1.0-SNAPSHOT</version> 
  <name>UM EAR</name> 
  <url>http://imatrix/</url> 
  <packaging>ear</packaging>
  <parent>
    <groupId>twtc</groupId>
    <artifactId>um</artifactId>
    <version>1.0-SNAPSHOT</version>
  </parent> 
  <build>
    <finalName>um</finalName>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-ear-plugin</artifactId>
          <configuration> 
          <defaultJavaBundleDir>APP-INF/lib</defaultJavaBundleDir>         
           <archive> 
	     <manifest> 
	       <addClasspath>true</addClasspath> 
	     </manifest> 
	    </archive>          
             <modules>
               <webModule>
                 <groupId>twtc</groupId>
                 <artifactId>um-web</artifactId>
                 <contextRoot>um</contextRoot>
               </webModule>
               <javaModule>
	         <groupId>twtc</groupId>
	         <artifactId>um-app</artifactId>	         
               </javaModule>
            </modules>
            <generateApplicationXml>true</generateApplicationXml>
          </configuration>          
        </plugin>
        <plugin> 
	  <groupId>org.codehaus.mojo</groupId> 
	  <artifactId>weblogic-maven-plugin</artifactId> 
	  <version>2.8.0-SNAPSHOT</version> 
	  <configuration>
	    <classpath>C:\bea\weblogic81\server\lib\weblogic.jar</classpath>	  
	   
<objectPath>${project.build.directory}/um.${project.packaging}</objectPath>	    
          </configuration>
	    <executions> 
	      <execution>	        
	        <phase>package</phase> 
	          <goals> 
	            <goal>appc</goal>	            
	          </goals>
	      </execution> 	      
	    </executions> 
        </plugin>        
      </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>twtc</groupId>
      <artifactId>um-app</artifactId>
      <version>1.0-SNAPSHOT</version>      
    </dependency>
    <dependency>
      <groupId>twtc</groupId>
      <artifactId>um-web</artifactId>
      <version>1.0-SNAPSHOT</version>
      <type>war</type>
    </dependency>								
    <dependency>
      <groupId>twtc</groupId>
      <artifactId>mailhandler-app</artifactId>
      <version>1.0-SNAPSHOT</version>  	    
    </dependency>
    <dependency>
      <groupId>twtc</groupId>
      <artifactId>common</artifactId>
      <version>1.0-SNAPSHOT</version>  	    
    </dependency>	
    <dependency>
        <groupId>weblogic</groupId>
        <artifactId>weblogic</artifactId>
        <version>8.1</version>   
        <scope>provided</scope>
    </dependency>    
  </dependencies>
</project> 

--
View this message in context: http://www.nabble.com/-m2-Weblogic-J2EE-Plugin-t1408033.html#a4029553
Sent from the Maven - Users forum at Nabble.com.


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


RE: [m2] Weblogic J2EE Plugin

Posted by Scott Ryan <sc...@theryansplace.com>.
I just returned from overseas so as soon as I catch up on some sleep I will
update this issue.  There are samples posted on the Codehaus website but let
me try and understand more of what you are trying to do and see if I can
come up with a sample.  It looks like you are needing more of the base maven
plugins rather than the weblogic plugin.  The weblogic plugin is to be used
after you have assembled each artifact and want to compile and deploy those
artifacts.  The base maven plugins (jar, ear, war, etc) should be used first
to assemble your artifacts.

More after a few hours shuteye.....

Scott Ryan
Chief Technology Officer
Soaring Eagle L.L.C.
scott@theryansplace.com
www.soaringeagleco.com
(303) 263-3044

-----Original Message-----
From: Konstantin Polyzois [mailto:polyzois@gmail.com]
Sent: Saturday, April 08, 2006 4:14 AM
To: Maven Users List
Subject: Re: [m2] Weblogic J2EE Plugin


Are you sure the plugin is for maven 2?
/Konstantin

On 4/6/06, mjohnsonaz74 <mj...@hotmail.com> wrote:
>
>
> I am trying to convert an existing and convoluted project at work to Maven
> 2
> from an existing Ant build script.  I'm starting to get the hang of
> breaking
> one large project into multiple small projects (i.e. one artifact per
> project), but I'm running into the following issue.  I create three
> projects
> (we'll call them jar, war, ear) and then I call them in order from a
> parent
> POM.  Each module depends on the one before it (war depends on jar, and
> ear
> depends on war).  What I'm trying to do is build one ear file from the
> three
> projects.  I'm a bit confused, however, since the ant script uses
> wlcompile,
> wlappc, etc. to build the script and pre-compile the jsp code.  Finally,
> my
> question...Can someobody please provide me a sample POM that uses the
> weblogic plugin and calls these tasks so that I can see how it's
> used?  The
> documentation on the plugin is less then enlightening and I'm running in
> circles over what, I hope, is a trivial issue.  If I could see a working
> POM
> file that uses this plugin that would help me out a lot.  Thank you in
> advance!
>
> --MJ
> --
> View this message in context:
> http://www.nabble.com/-m2-Weblogic-J2EE-Plugin-t1408033.html#a3791766
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>



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


Re: [m2] Weblogic J2EE Plugin

Posted by Konstantin Polyzois <po...@gmail.com>.
Are you sure the plugin is for maven 2?
/Konstantin

On 4/6/06, mjohnsonaz74 <mj...@hotmail.com> wrote:
>
>
> I am trying to convert an existing and convoluted project at work to Maven
> 2
> from an existing Ant build script.  I'm starting to get the hang of
> breaking
> one large project into multiple small projects (i.e. one artifact per
> project), but I'm running into the following issue.  I create three
> projects
> (we'll call them jar, war, ear) and then I call them in order from a
> parent
> POM.  Each module depends on the one before it (war depends on jar, and
> ear
> depends on war).  What I'm trying to do is build one ear file from the
> three
> projects.  I'm a bit confused, however, since the ant script uses
> wlcompile,
> wlappc, etc. to build the script and pre-compile the jsp code.  Finally,
> my
> question...Can someobody please provide me a sample POM that uses the
> weblogic plugin and calls these tasks so that I can see how it's
> used?  The
> documentation on the plugin is less then enlightening and I'm running in
> circles over what, I hope, is a trivial issue.  If I could see a working
> POM
> file that uses this plugin that would help me out a lot.  Thank you in
> advance!
>
> --MJ
> --
> View this message in context:
> http://www.nabble.com/-m2-Weblogic-J2EE-Plugin-t1408033.html#a3791766
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>