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 > runtime) > [DEBUG] Retrieving parent-POM from the repository for project: > null:maven-profile:jar:2.0 > [DEBUG] org.apache.maven:maven-profile: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-model:jar:2.0 (selected for > runtime) > [DEBUG] org.codehaus.plexus:plexus-archiver:jar:1.0-alpha-3 (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] 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] org.codehaus.plexus:plexus-utils:jar:1.0.4 (selected for > runtime) > [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] org.apache.maven:maven-artifact:jar:2.0 (selected for runtime) > [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] 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] 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 > runtime) > [DEBUG] org.apache.maven:maven-profile: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-model:jar:2.0 (selected for runtime) > [DEBUG] Retrieving parent-POM from the repository for project: > org.apache.maven:maven-plugin-api:jar:2.0 > [DEBUG] org.apache.maven:maven-plugin-api:jar:2.0 (selected for runtime) > [DEBUG] Configuring mojo > 'org.apache.maven.plugins:maven-ear-plugin:2.0:ear' --> > [DEBUG] (f) applicationXmlFile = F: > \test\sample\src\main\application\META-INF\application.xml > [DEBUG] (f) addClasspath = true > [DEBUG] (s) manifest = > [EMAIL PROTECTED] > [DEBUG] (f) archive = > [EMAIL PROTECTED] > [DEBUG] (f) earSourceDirectory = F:\test\sample\src\main\application > [DEBUG] (f) finalName = xxxproject-1.0 > [DEBUG] (f) manifestFile = F: > \test\sample\src\main\application\META-INF\MANIFEST.MF > [INFO] > > ---------------------------------------------------------------------------- > [ERROR] BUILD ERROR > [INFO] > > ---------------------------------------------------------------------------- > --------------------------------------------------- > constituent[0]: file:/d:/maven-2.0-bin/lib/junit-3.8.1.jar > constituent[1]: file:/d:/maven-2.0-bin/lib/jsch-0.1.23.jar > constituent[2]: > file:/d:/maven-2.0-bin/lib/maven- > plugin-parameter-documenter-2.0.1-SNAPSHOT.jar > constituent[3]: file:/d:/maven-2.0-bin/lib/maven- > profile-2.0.1-SNAPSHOT.jar > constituent[4]: > file:/d:/maven-2.0-bin/lib/maven-repository-metadata-2.0.1-SNAPSHOT.jar > constituent[5]: > file:/d:/maven-2.0-bin/lib/maven-error-diagnostics-2.0.1-SNAPSHOT.jar > constituent[6]: > file:/d:/maven-2.0-bin/lib/doxia- > sink-api-1.0-alpha-6-20051021.114601-1.jar > constituent[7]: > file:/d:/maven-2.0-bin/lib/maven-plugin-api-2.0.1-SNAPSHOT.jar > constituent[8]: > file:/d:/maven-2.0-bin/lib/maven-artifact-manager-2.0.1-SNAPSHOT.jar > constituent[9]: file:/d:/maven-2.0-bin/lib/wagon-ssh-1.0-alpha-5.jar > constituent[10]: > file:/d:/maven-2.0-bin/lib/maven-settings-2.0.1-SNAPSHOT.jar > constituent[11]: file:/d:/maven-2.0-bin/lib/wagon-file-1.0-alpha-5.jar > constituent[12]: > file:/d:/maven-2.0-bin/lib/wagon-http-lightweight-1.0-alpha-5.jar > constituent[13]: > file:/d:/maven-2.0-bin/lib/maven-reporting-api-2.0.1-SNAPSHOT.jar > constituent[14]: file:/d:/maven-2.0-bin/lib/maven-model-2.0.1-SNAPSHOT.jar > constituent[15]: > file:/d:/maven-2.0-bin/lib/maven-artifact-2.0.1-SNAPSHOT.jar > constituent[16]: > file:/d:/maven-2.0-bin/lib/wagon-provider-api-1.0-alpha-5.jar > constituent[17]: > file:/d:/maven-2.0-bin/lib/maven-project-2.0.1-SNAPSHOT.jar > constituent[18]: > file:/d:/maven-2.0-bin/lib/maven-plugin-registry-2.0.1-SNAPSHOT.jar > constituent[19]: file:/d:/maven-2.0-bin/lib/commons-cli-1.0.jar > constituent[20]: > file:/d:/maven-2.0-bin/lib/maven-plugin-descriptor-2.0.1-SNAPSHOT.jar > constituent[21]: > file:/d:/maven-2.0-bin/lib/plexus-interactivity-api-1.0-alpha-4.jar > constituent[22]: > file:/d:/maven-2.0-bin/lib/maven-monitor-2.0.1-SNAPSHOT.jar > constituent[23]: file:/d:/maven-2.0-bin/lib/maven-core-2.0.1-SNAPSHOT.jar > constituent[24]: file:/d:/maven-2.0-bin/lib/maven-core-2.0.jar > constituent[25]: > file:/d:/maven-2.0-bin/lib/maven-plugin-parameter-documenter-2.0.jar > constituent[26]: file:/d:/maven-2.0-bin/lib/maven-model-2.0.jar > constituent[27]: file:/d:/maven-2.0-bin/lib/maven-profile-2.0.jar > constituent[28]: file:/d:/maven-2.0-bin/lib/maven-project-2.0-1.jar > constituent[29]: file:/d:/maven-2.0-bin/lib/maven- > error-diagnostics-2.0.jar > constituent[30]: file:/d:/maven-2.0-bin/lib/maven- > plugin-descriptor-2.0.jar > constituent[31]: > file:/d:/maven-2.0-bin/lib/maven-artifact-manager-2.0-1.jar > constituent[32]: file:/d:/maven-2.0-bin/lib/maven-artifact-2.0-1.jar > constituent[33]: file:/d:/maven-2.0-bin/lib/maven-monitor-2.0.jar > constituent[34]: > file:/d:/maven-2.0-bin/lib/maven-repository-metadata-2.0.jar > constituent[35]: file:/d:/maven-2.0-bin/lib/maven-settings-2.0.jar > constituent[36]: file:/d:/maven-2.0-bin/lib/maven-reporting-api-2.0.jar > constituent[37]: file:/d:/maven-2.0-bin/lib/maven-plugin-api-2.0.jar > constituent[38]: file:/d:/maven-2.0-bin/lib/maven-plugin-registry-2.0.jar > constituent[39]: file:/d:/maven-2.0-bin/lib/doxia-sink-api-1.0-alpha-4.jar > --------------------------------------------------- > java.lang.NullPointerException > at java.util.regex.Matcher.getTextLength(Matcher.java:758) > at java.util.regex.Matcher.find(Matcher.java:414) > at > org.apache.maven.plugin.PluginConfigurationException.addParameterUsag > eInfo(PluginConfigurationException.java:92) > at > org.apache.maven.plugin.PluginConfigurationException.buildConfigurati > onDiagnosticMessage(PluginConfigurationException.java:272) > at > org.apache.maven.usability.PluginConfigurationDiagnoser.diagnose(Plug > inConfigurationDiagnoser.java:49) > at > org.apache.maven.usability.diagnostics.ErrorDiagnostics.diagnose(Erro > rDiagnostics.java:81) > at > org.apache.maven.DefaultMaven.logDiagnostics(DefaultMaven.java:699) > at org.apache.maven.DefaultMaven.logError(DefaultMaven.java:646) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:121) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:249) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. > java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces > sorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > at > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > > > _______________________________________________________________________ > Hactl..........Moving forward with you. > > Best Air Cargo Terminal - Asia 2005 > Air Cargo Terminal of the Year 2002, 2003 & 2004 > > Web: http://www.hactl.com > > DISCLAIMER :- > The information contained in this message, including any attachment, is > confidential and may also be privileged. The information is intended only > for the person or entity to which it is addressed. Any review, > re-transmission, copying, storage, distribution or other use or disclosure > of this information by persons or entities other than the intended > recipient is prohibited. If you are not the intended recipient, please > contact the sender immediately by return email and delete this message > from > your system. Thank you. > > > > ______________________________________________________________________ > This email has been scanned by the MessageLabs Email Security System. > For more information please visit http://www.messagelabs.com/email > ______________________________________________________________________ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- .::You're welcome ::.