Hi all,

I'm having difficulties setting up 'ear' project.
The following are the conditions:

The pom file:
--------------------------------------------------------------------------------
<project>
  <modelVersion>4.0.0</modelVersion>
  ...
  <packaging>ear</packaging>
  ...
</project>
--------------------------------------------------------------------------------

Directory structure:
--------------------------------------------------------------------------------
.
|-- pom.xml
`-- src
    `-- application
        `-- META-INF
            `-- application.xml
--------------------------------------------------------------------------------
Note: Why application.xml needs to be put under src/application, instead of 
src/main/application?

The problem comes when "m2 install" is called.
--------------------------------------------------------------------------------
[INFO] 
----------------------------------------------------------------------------
[INFO] Building Sample Project - EAR
[INFO] 
----------------------------------------------------------------------------
[ERROR] Nonexistent component: 
org.apache.maven.lifecycle.mapping.LifecycleMappingear
[ERROR] No lifecycle mapping for type 'ear': using defaults
[INFO] maven-resources-plugin: resolved to version 2.0-alpha-3 from local 
repository
[INFO] maven-compiler-plugin: resolved to version 2.0-alpha-3 from local 
repository
[INFO] maven-surefire-plugin: resolved to version 2.0-alpha-3 from local 
repository
[INFO] maven-jar-plugin: resolved to version 2.0-alpha-3 from local repository
[INFO] maven-source-plugin: resolved to version 2.0-alpha-2 from local 
repository
[INFO] maven-install-plugin: resolved to version 2.0-alpha-3 from local 
repository
[INFO] [resources:resources]
[INFO] sample-ejb: using locally installed snapshot
[INFO] sample-core: using locally installed snapshot
[INFO] sample-remoting: using locally installed snapshot
[INFO] [compiler:compile]
[INFO] No sources to compile
[INFO] [resources:testResources]
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] Setting reports dir: /home/efy/work/sample/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
There are no test to run.

Results :
[surefire] Tests run: 0, Failures: 0, Errors: 0

[INFO] [jar:jar]
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: /home/efy/work/sample/target/sample-ear-1.0-SNAPSHOT.jar
[INFO] [source:jar]
[INFO] Not producing source bundle for a SNAPSHOT build
[INFO] [install:install]
[INFO] Installing /home/efy/work/sample/target/sample-ear-1.0-SNAPSHOT.ear to 
/home/efy/.m2/repository/com/test/sample/1.0-SNAPSHOT/sample-ear-1.0-SNAPSHOT.ear
[INFO] 
----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] 
----------------------------------------------------------------------------
[INFO] Diagnosis: Error installing artifact
[INFO] 
----------------------------------------------------------------------------
--------------------------------------------------------------------------------

Notice at the start of m2 output:
--------------------------------------------------------------------------------
[ERROR] Nonexistent component: 
org.apache.maven.lifecycle.mapping.LifecycleMappingear
[ERROR] No lifecycle mapping for type 'ear': using defaults
--------------------------------------------------------------------------------

And at the bottom of m2 output:
--------------------------------------------------------------------------------
[INFO] [jar:jar]
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: /home/efy/work/sample/target/sample-ear-1.0-SNAPSHOT.jar
[INFO] [source:jar]
[INFO] Not producing source bundle for a SNAPSHOT build
[INFO] [install:install]
[INFO] Installing /home/efy/work/sample/target/sample-ear-1.0-SNAPSHOT.ear to 
/home/efy/.m2/repository/com/test/sample/1.0-SNAPSHOT/sample-ear-1.0-SNAPSHOT.ear
--------------------------------------------------------------------------------

Is the reason m2 produced jar is because "ear" is not part lifecycle mapping? 
And if that's the case, how do I patch the source code to make ear as one of 
the 
lifecycle mapping?

Regards,
Edward


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

Reply via email to