It could be :

<build>
<*plugins*>
<*plugin*>
  <groupId>org.apache.*maven*.*plugins*</groupId>
  <artifactId>*maven*-XXX-*plugin*</artifactId>
  <configuration>
    <archive>
      <*manifest*>
        <addClasspath>false</addClasspath>
      </*manifest*>
    </archive>
  </configuration>
</*plugin*>
</*plugins*>
</build>

The XXX stands for war, jar, or ear.




2009/1/11 David Jencks <david_jen...@yahoo.com>

>
> On Jan 10, 2009, at 12:22 PM, bongosdude wrote:
>
>
>> David,
>>
>> This is quite interesting point that you point it out. Do you know how I
>> can
>> make maven stop generating the MANIFEST.MF file?
>>
>
> I think you want maven to generate the manifest.mf file but not include a
> CLASS-PATH entry.  However, I don't know how to make this happen.
>
> thanks
> david jencks
>
>
>>
>> Thanks
>> -B
>>
>> djencks wrote:
>>
>>>
>>> Hi bongosdude,
>>>
>>> It looks like the war plugin is not javaee-5 aware.  Anything you put
>>> in the ear lib directory gets into the ear classloader which is a
>>> parent to the war classloader.  Thus you don't need the war manifest
>>> classpath entries at all in an ee5 container such as geronimo.  Your
>>> solution should work but is unnecessarily complicated.  Since the
>>> maven plugin isn't ee-5 aware it may be easier not to stop generating
>>> the manifest classpath entries.
>>>
>>> Thanks for pointing this out!  I created a maven jira in case anyone
>>> there wants to work on this...  http://jira.codehaus.org/browse/MWAR-178
>>>
>>> david jencks
>>>
>>> On Jan 10, 2009, at 9:35 AM, bongosdude wrote:
>>>
>>>
>>>> Hi,
>>>>
>>>> I found the an interesting thing about the problem that I reported
>>>> in this
>>>> post thread. Basically, I set up my project as maven and then
>>>> convert the
>>>> build EAR into eclipse projects so that I can debug my ejb and war
>>>> app using
>>>> GEP (please also see my other post from
>>>> http://www.nabble.com/car-maven-plugin-and-GEP-to21095185s134.html
>>>> to see
>>>> how this can be done.) I have followed the practice to bundle my WAR
>>>> project
>>>> so that it refers all lib dependencies to its EAR lib directory. This
>>>> practice is well documented as skinny war (please see
>>>>
>>>> http://maven.apache.org/plugins/maven-war-plugin/examples/skinny-wars.html
>>>> )
>>>> .
>>>> The interesting here is that maven is quite smart to handle transitive
>>>> dependency and as a result, mave generates my war META-INF/
>>>> METAFEST.MF to
>>>> refer to some missing jar files in EAR lib directory. Once I
>>>> manually added
>>>> these jars file to my ear pom.xml file, I fixed the mysterious
>>>> "JAVAEE 5
>>>> Section 8.2" problem.
>>>>
>>>> Thanks for all excellent supports from this forum who has made
>>>> geronimo well
>>>> JEE app and product.
>>>>
>>>> -B
>>>>
>>>>
>>>> bongosdude wrote:
>>>>
>>>>>
>>>>> After I fixed the manifest classpath problem, maven successfully
>>>>> build my
>>>>> project. But I still have questions about geronimo-web.xml.
>>>>>
>>>>> Thanks
>>>>> -B
>>>>>
>>>>> Embedded error: Manifest class path entries must be a valid jar file
>>>>> (JAVAEE 5 Section 8.2): path= lib/callingcard-ejb-0.0.1-SNAPSHOT.jar,
>>>>> resolved to targetURI= lib/callingcard-ejb-0.0.1-SNAPSHOT.jar
>>>>>
>>>>>
>>>>>
>>>>> bongosdude wrote:
>>>>>
>>>>>>
>>>>>> Background
>>>>>>
>>>>>> I encountered this problem that I do not quite understand. I set
>>>>>> up my
>>>>>> demo after I looked at the car-maven-plugin, m2eclipse and the
>>>>>> geronimo
>>>>>> sample calculator. I have manually created my demo project by
>>>>>> using maven
>>>>>> achetype-create with groupId=org.apache.geronimo.samples and
>>>>>> archytypeId=geronimo-samples-archetypes. And then I tweaked POM
>>>>>> files
>>>>>> generated by looking at calculator POM files. I had to go through
>>>>>> this
>>>>>> manual process because my web application is Tapestry5. And I have
>>>>>> to add
>>>>>> dependencies to POM files. Maven build sub projects successfully
>>>>>> except
>>>>>> when it tried to build jetty and tomcat CAR plugin. Here are the
>>>>>> error
>>>>>> messages that I got:
>>>>>>
>>>>>> [WARN]  Web application callingcard-war-0.0.1-SNAPSHOT.war does not
>>>>>> contain a WEB-INF/geronimo-web.xml deployment plan.  This may or
>>>>>> may not
>>>>>> be a problem, depending on whether you have things like resource
>>>>>> references that need to be resolved.  You can also give the
>>>>>> deployer a
>>>>>> separate deployment plan file on the command line.
>>>>>> [INFO]  The Strict Manifest Classpath processing mode is in effect.
>>>>>> This option can be altered by specifying
>>>>>> -DXorg.apache.geronimo.deployment.LenientMFCP=true|false
>>>>>> Specify ="true" for more lenient processing such as ignoring
>>>>>> missing jars
>>>>>> and references that are not spec compliant.
>>>>>> 12:50:39,649 INFO  [config] Configuring
>>>>>> Service(id=DefaultStatelessContainer, type=Container, provider-
>>>>>> id=Default
>>>>>> Stateless Container)
>>>>>> 12:50:39,653 INFO  [config] Configuring
>>>>>> Service(id=DefaultStatefulContainer, type=Container, provider-
>>>>>> id=Default
>>>>>> Stateful Container)
>>>>>> 12:50:39,654 INFO  [config] Configuring
>>>>>> Service(id=DefaultSingletonContainer, type=Container, provider-
>>>>>> id=Default
>>>>>> Singleton Container)
>>>>>> 12:50:39,655 INFO  [config] Configuring
>>>>>> Service(id=DefaultBMPContainer,
>>>>>> type=Container, provider-id=Default BMP Container)
>>>>>> 12:50:39,655 INFO  [config] Configuring
>>>>>> Service(id=DefaultCMPContainer,
>>>>>> type=Container, provider-id=Default CMP Container)
>>>>>> 12:50:39,663 INFO  [config] Configuring enterprise application:
>>>>>> com.myvoip.ipservices/callingcard-jetty/0.0.1-SNAPSHOT/car
>>>>>> 12:50:40,359 INFO  [OpenEJB] Auto-deploying ejb PayPalNVPProcessor:
>>>>>> EjbDeployment(deployment-id=callingcard-ejb-0.0.1-SNAPSHOT.jar/
>>>>>> PayPalNVPProcessor)
>>>>>> 12:50:40,360 INFO  [OpenEJB] Auto-deploying ejb NutalkNewOrderBean:
>>>>>> EjbDeployment(deployment-id=callingcard-ejb-0.0.1-SNAPSHOT.jar/
>>>>>> NutalkNewOrderBean)
>>>>>> 12:50:40,360 INFO  [OpenEJB] Auto-deploying ejb SampleBean:
>>>>>> EjbDeployment(deployment-id=callingcard-ejb-0.0.1-SNAPSHOT.jar/
>>>>>> SampleBean)
>>>>>> 12:50:40,412 INFO  [config] Enterprise application
>>>>>> "com.myvoip.ipservices/callingcard-jetty/0.0.1-SNAPSHOT/car" loaded.
>>>>>> [INFO]
>>>>>>
>>>>>> ------------------------------------------------------------------------
>>>>>> [ERROR] BUILD ERROR
>>>>>> [INFO]
>>>>>>
>>>>>> ------------------------------------------------------------------------
>>>>>> [INFO] could not package plugin
>>>>>>
>>>>>> Embedded error: Manifest class path entries must be a valid jar file
>>>>>> (JAVAEE 5 Section 8.2): path= lib/callingcard-ejb-0.0.1-
>>>>>> SNAPSHOT.jar,
>>>>>> resolved to targetURI= lib/callingcard-ejb-0.0.1-SNAPSHOT.jar
>>>>>>  looking at: callingcard-war-0.0.1-SNAPSHOT.war    current
>>>>>> classpath:
>>>>>> [WEB-INF/classes/, ../lib/callingcard-common-0.0.1-SNAPSHOT.jar,
>>>>>> ../lib/paypal-stubs-4.3.1.jar, ../lib/paypal-base-4.3.1.jar,
>>>>>> ../lib/commons-lang-2.4.jar, ../lib/spring-2.5.6.jar,
>>>>>> ../lib/commons-logging-1.0.4.jar,
>>>>>> ../lib/callingcard-ejb-0.0.1-SNAPSHOT.jar]    ignoring modules:
>>>>>> [callingcard-ejb-0.0.1-SNAPSHOT.jar, callingcard-war-0.0.1-
>>>>>> SNAPSHOT.war]
>>>>>> No such file or directory
>>>>>> [INFO]
>>>>>>
>>>>>> ------------------------------------------------------------------------
>>>>>> [INFO] For more information, run Maven with the -e switch
>>>>>> [INFO]
>>>>>>
>>>>>> ------------------------------------------------------------------------
>>>>>> [INFO] Total time: 47 seconds
>>>>>> [INFO] Finished at: Fri Jan 09 12:50:42 EST 2009
>>>>>> [INFO] Final Memory: 64M/125M
>>>>>> [INFO]
>>>>>>
>>>>>> ------------------------------------------------------------------------
>>>>>> die
>>>>>>
>>>>>>
>>>>>> Questions:
>>>>>>
>>>>>> 1. It seems that I got my first error is that I did not create
>>>>>> WEB-INF/geronimo-web.xml. I can define the option
>>>>>> -DXorg.apache.geronimo.deployment.LenientMFCP=true to make the build
>>>>>> successful. However, I looked at the calculator, it does not have
>>>>>> the
>>>>>> WEB-INF/geronimo-web.xml but maven does not fail when it builds
>>>>>> jetty/tomcat car plugin. So why do I have this error? What do I
>>>>>> miss in
>>>>>> my pom files?
>>>>>>
>>>>>> 2. Can somesome explain what
>>>>>> DXorg.apache.geronimo.deployment.LenientMFCP=true|false does?
>>>>>>
>>>>>> Thank for any helps
>>>>>>
>>>>>> -B
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>> -----
>>>> B Amigo:super:
>>>> --
>>>> View this message in context:
>>>>
>>>> http://www.nabble.com/Maven-build-failed-with-missing-WEB-INF-geronimo-web.xml-tp21377598s134p21390405.html
>>>> Sent from the Apache Geronimo - Users mailing list archive at
>>>> Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>
>> -----
>> B Amigo:super:
>> --
>> View this message in context:
>> http://www.nabble.com/Maven-build-failed-with-missing-WEB-INF-geronimo-web.xml-tp21377598s134p21392243.html
>> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>>
>>
>


-- 
Shawn

Reply via email to