Morning all.

Could someone please explain the packaging thing for me. I'm sorry if
this sounds really basic, but the boss is questioning why I'm
building the project as I am, and I can't actually say why, just that
all the examples I have seen do it this way. 

I am building everything with the followin structure:

<project>
  -- <project>-ear
  -- <project>-ejb
  -- <project>-taglib
  -- <project>-war

Where each of the <project>-xxx has it's own pom.xml with a reference
back to the parent. 

His query is why do I have a seperate project to build the ear file?
Why not make it in the EJB project? Apparently make used to do
everything in one go and you could choose a target, why can't Maven?

I'm sorry if I'm being stupid here, but I just can't figure out a
good answer.

Thanks
IV


--- Stephane Nicoll <[EMAIL PROTECTED]> wrote:

> Your root pom.xml has a packaging of 'pom', you should not create
> an 'ear' with it.
> 
> The EAR should be in a project with 'ear' packaging.
> 
> Hope it helps,
> Stéphane
> 
> On 11/26/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > Dear all,
> >
> > Folder:
> >    sample --pom.xml (ear)
> >           |__src\main\application\meta-inf\application.xml
> >           |
> >           |---primary-source-|--pom.xml(java jar)
> >                              |
> >                              |--src\main\java\
> >
> >
> >    We try to package an ear with java jar.
> >      under sample directory, mvn compile is
> > ok .However,package wrong.
> >
> >     <groupId>com.hactl</groupId>
> >                    <artifactId>javatest</artifactId>
> >                    <version>1.0</version>
> > the artifactId javatest exists
> >
> >
> > sample\primary-source\pom.xml
> >
> >
> > <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"; xmlns:artifact
> > ="urn:maven-artifact-ant">
> >    <modelVersion>4.0.0</modelVersion>
> >    <groupId>com.hactl</groupId>
> >    <artifactId>javatest</artifactId>
> >    <packaging>jar</packaging>
> >     <version>1.0</version>
> >    <name>core project classes</name>
> >    <dependencies>
> >       <dependency>
> >       <groupId>junit</groupId>
> >       <artifactId>junit</artifactId>
> >       <version>3.8.1</version>
> >       <scope>test</scope>
> >     </dependency>
> >    </dependencies>
> >    <build>
> >    </build>
> > </project>
> >
> >
> >
> > -----------------------------------------------------------
> >
> > sample\
> > pom.xml:
> >
> >   <project>
> >    <modelVersion>4.0.0</modelVersion>
> >    <groupId>com.hactl</groupId>
> >    <version>1.0</version>
> >    <artifactId>xxxproject</artifactId>
> >    <packaging>pom</packaging>
> >    <name>xxxproject</name>
> >    <build>
> >       <plugins>
> >          <plugin>
> >             <artifactId>maven-ear-plugin</artifactId>
> >             <executions>
> >           <execution>
> >             <id>ear1</id>
> >             <phase>package</phase>
> >             <configuration>
> >                <archive>
> >                   <manifest>
> >                      <addClasspath>true</addClasspath>
> >                   </manifest>
> >                </archive>
> >                <outputDirectory>eardir</outputDirectory>
> >                <modules>
> >                  <module>
> >                    <groupId>com.hactl</groupId>
> >                    <artifactId>javatest</artifactId>
> >                    <version>1.0</version>
> >                   </module>
> >                </modules>
> >                <!--<includes>commons-logging.jar</includes>-->
> >             </configuration>
> >             <goals>
> >               <goal>ear</goal>
> >             </goals>
> >            </execution>
> >           </executions>
> >          </plugin>
> >       </plugins>
> >    </build>
> >
> > </project>
> >
> > -----mvn -X package-----------------------------
> > + Error stacktraces are turned on.
> > [DEBUG] Building Maven user-level plugin registry from:
> 'C:\Documents and
> > Settings\gz-clark_rao\.m2\plugin-registry.xml'
> > [DEBUG] Building Maven global-level plugin registry from: 'd:
> > \maven-2.0-bin\conf\plugin-registry.xml'
> > [INFO] Scanning for projects...
> > [INFO]
> >
> >
>
----------------------------------------------------------------------------
> > [INFO] Building xxxproject
> > [INFO]    task-segment: [package]
> > [INFO]
> >
> >
>
----------------------------------------------------------------------------
> > [DEBUG] maven-ear-plugin: resolved to version 2.0 from repository
> central
> > [DEBUG] Retrieving parent-POM from the repository for project:
> > null:maven-ear-plugin:maven-plugin:2.0
> > [DEBUG] com.hactl:xxxproject:pom:1.0 (selected for null)
> > [DEBUG]
> org.apache.maven.plugins:maven-ear-plugin:maven-plugin:2.0
> > (selected for runtime)
> > [DEBUG]   org.codehaus.plexus:plexus-utils:jar:1.0.4 (selected
> for
> > runtime)
> > [DEBUG] Retrieving parent-POM from the repository for project:
> > null:maven-archiver:jar:2.0
> > [DEBUG]   org.apache.maven:maven-archiver:jar:2.0 (selected for
> runtime)
> > [DEBUG] Retrieving parent-POM from the repository for project:
> > null:maven-project:jar:2.0
> > [DEBUG]     org.apache.maven:maven-project:jar:2.0 (selected for
> runtime)
> > [DEBUG]       org.codehaus.plexus:plexus-utils:jar:1.0.4
> (selected for
> > runtime)
> > [DEBUG]      
> org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8
> > (selected for runtime)
> > [DEBUG]         org.codehaus.plexus:plexus-utils:jar:1.0.4
> (selected for
> > runtime)
> > [DEBUG]         classworlds:classworlds:jar:1.1-alpha-2 (selected
> for
> > runtime)
> > [DEBUG]         junit:junit:jar:3.8.1 (selected for runtime)
> > [DEBUG] Retrieving parent-POM from the repository for project:
> > org.apache.maven:maven-artifact:jar:2.0
> > [DEBUG]       org.apache.maven:maven-artifact:jar:2.0 (selected
> for
> > runtime)
> > [DEBUG]         org.codehaus.plexus:plexus-utils:jar:1.0.4
> (selected for
> > runtime)
> > [DEBUG] Retrieving parent-POM from the repository for project:
> > org.apache.maven:maven-model:jar:2.0
> > [DEBUG]       org.apache.maven:maven-model:jar:2.0 (selected for
> runtime)
> > [DEBUG]         org.codehaus.plexus:plexus-utils:jar:1.0.4
> (selected for
> > runtime)
> > [DEBUG] Retrieving parent-POM from the repository for project:
> > org.apache.maven:maven-artifact-manager:jar:2.0
> > [DEBUG]       org.apache.maven:maven-artifact-manager:jar:2.0
> (selected
> > for
> > runtime)
> > [DEBUG]         org.codehaus.plexus:plexus-utils:jar:1.0.4
> (selected for
> > runtime)
> > [DEBUG]
> > org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-8
> (selected for
> > runtime)
> > [DEBUG]         org.apache.maven:maven-artifact:jar:2.0 (selected
> for
> > runtime)
> > [DEBUG] Retrieving parent-POM from the repository for project:
> > org.apache.maven:maven-repository-metadata:jar:2.0
> > [DEBUG]        
> org.apache.maven:maven-repository-metadata:jar:2.0
> > (selected for runtime)
> > [DEBUG]           org.codehaus.plexus:plexus-utils:jar:1.0.4
> (selected for
> > runtime)
> > [DEBUG]        
> org.apache.maven.wagon:wagon-provider-api:jar:1.0-alpha-5
> > (selected for runtime)
> > [DEBUG]           org.codehaus.plexus:plexus-utils:jar:1.0.4
> (selected for
> 
=== message truncated ===


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

Reply via email to