Hi Mike,

Thanks a lot.

Currently, I am trying to make our existing application to use Maven 2, both
in build and development env.  Great that you have already done so.  Please
help me by answering  some more questions below :-

1.  I downloaded the new version  for WAR plug in. Build and used it.  My
question is , In your WAR project, what is the scope of the dependencies for
jar that are present at the EAR level? For example, log4j   If I give
default (ie. compile) manifest is created correctly in WebContent/META-INF/
but at the same time in the .War file we have all the dependent jars bundled
in the lib folder.  This is causing the same sets of JARs to be in 2 places,
once bundled in EAR and second time in the lib folder in the WAR.  Is there
a way to avoid this? If you can share your Parent POM, JAR POM, WAR POM and
EJB POM , it will be easy to understand the structure.

2. Is there a manifest goal for EJB plugin?  Since EJB's projects are
modules, at the package phase we need to create Manifest.mf too. Do have
suggestions for this?

3. Regards to copying of jars defined as dependencies in pom.xml in the EAR
project, you mentioned that some builder is available. Pls. let me know from
where I can download this. I googled for a while but in vain.  Or Is it
possible to share the plugin written by you?

4. In eclipse plugin you defined disableWTP true? What does this do?

5. As you know Eclipse plugin configuration values differ in project types.
JAR , WAR and EJB's.  How do you manage your plugin definitions in POMs'?
Do you have a parent POM and one sub POM for each project type or someother
strategy? Please advice. Again,  If you can share your Parent POM, JAR POM,
WAR POM and EJB POM , it will be easy to understand the structure.
Thanks for all the help and great work you have done in integrating Maven
with RAD6.  I am sure lot of people will benefit from you.

Thanks,
Sanjay








On 1/21/06, Mike Perham <[EMAIL PROTECTED]> wrote:
>
> You don't say if you are using M1 or M2.
>
> For M2, we did the following to get things working with RSA6:
>
> WAR plugin config:
>
>                <plugin>
>                    <groupId>org.apache.maven.plugins</groupId>
>                    <artifactId>maven-war-plugin</artifactId>
>                    <version>2.0-beta-3-SNAPSHOT</version>
>                    <configuration>
>
> <warSourceDirectory>WebContent</warSourceDirectory>
>
> <warSourceExcludes>WEB-INF/lib/*.jar</warSourceExcludes>
>                        <archive>
>                            <manifest>
>                                <addClasspath>true</addClasspath>
>                                <classpathPrefix>lib/</classpathPrefix>
>                            </manifest>
>                        </archive>
>                    </configuration>
>                    <executions>
>                        <execution>
>                            <phase>package</phase>
>                            <goals>
>                                <goal>manifest</goal>
>                            </goals>
>                            <inherited>true</inherited>
>                        </execution>
>                    </executions>
>                </plugin>
>
> - The war:manifest goal updates WebContent/META-INF/MANIFEST.MF on every
> build.  It is in SVN but not in the latest released version.
> - Notice the jars are excluded from WEB-INF/lib when built.  This is
> because they are all packaged in the ear so 4 wars don't cause 4x the
> JAR bloat.
>
> EAR plugin config:
>
>                <plugin>
>                    <groupId>org.apache.maven.plugins</groupId>
>                    <artifactId>maven-ear-plugin</artifactId>
>                    <!--
>                        Webify customized EAR plugin to handle
> RSA-specific stuff
>                        like copying jars to lib/.
>                    -->
>                    <version> 2.1-20051209.230525-1</version>
>                    <configuration>
>
> <defaultJavaBundleDir>lib/</defaultJavaBundleDir>
>
> <earSourceDirectory>${basedir}</earSourceDirectory>
>
> <earSourceIncludes>META-INF/**</earSourceIncludes>
>                    </configuration>
>                </plugin>
>
> In your EAR POM dependencies, you need to duplicate the list of all WAR
> dependencies so that they can be packaged in the ear itself.  It so
> happens that transitive dependencies make this list a lot shorter since
> you just list the top-level dependencies.
>
> I think there are plugins (build-helper?) which can copy dependencies to
> an arbitrary location now so the lib/ copy customization I did may not
> be required.  It would be nice to get this working with stock plugins.
>
> Finally the Eclipse plugin configuration:
>
>                <plugin>
>                    <groupId>org.apache.maven.plugins</groupId>
>                    <artifactId>maven-eclipse-plugin</artifactId>
>                    <!--
>                        Custom version to fix this:
>                        http://jira.codehaus.org/browse/MNG-1724
>                    -->
>                    <version>2.1-20051216.210030-1</version>
>                    <configuration>
>                        <outputDirectory>bin</outputDirectory>
>                        <disableWtp>true</disableWtp>
>                        <classpathContainers>
>
> <container>org.eclipse.jdt.launching.JRE_CONTAINER</container>
>                        </classpathContainers>
>                    </configuration>
>                </plugin>
>
> It's still not perfect - we'd like to get the generated EAR copied to
> our Rapid Deployment directory for quicker development turnaround.  As
> is today, we still have to start and stop the container on every change.
> Hope this helps.
>
> -----Original Message-----
> From: Sanjay Choudhary [mailto:[EMAIL PROTECTED]
> Sent: Friday, January 20, 2006 8:53 PM
> To: Maven Users List
> Subject: Best Practice - Maven with WSAD or RAD6
>
> I am able to build my projects and EAR in both WSAD and RAD6.  Now
> problem I face is in third party jars.
>
> in RAD6/WSAD project structure is like this
>
> EAR Project
>     contains application.xml for EAR
>     contains all third party JAR required by application
>
> JAR project
>
> EJB Project
>
> WAR Project
>      contains JSPs
>      contains third party JARs like struts etc in the LIB folder
>
> Now when I used Maven in my development environment, I moved all the
> third party JARS to maven repository and changed the dependencies
> accordingly.  My java project, ejb projects and war project compiled
> fine. I am able to create EAR too.
>
> Now when I want to run/debug my application on built in Websphere
> application server, server complains about the third party JARs.
> Initially, I thought of adding all the third party jars in server
> classpath - but this is not a good idea.  Shall I explode my EAR into
> EAR project, so that I will have all the third party jars there. Is
> there someother best practice that I
> can follow?   I am sure someone may have resolved this issue, (maven is
> around for long).
>
> Please advice.
>
> Thanks,
> Sanjay
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to