zDev - M2E - WTP OSS
  1. zDev - M2E - WTP OSS
  2. MECLIPSEWTP-208

Custom scr/main/webapp/META-INF/MANIFEST.MF is overriden when deploying a web application to Virgo server

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Not A Bug
    • Affects Version/s: 0.13.1
    • Fix Version/s: None
    • Component/s: Overlay
    • Labels:
      None
    • Environment:
      Eclipse Indigo, Virgo Server adapter (Milestone), Windows 7.
    • Global Rank:
      19653

      Description

      I was trying out Greenpages sample webapp for Virgo server. I noticed that the custom scr/main/webapp/META-INF/MANIFEST.MF was not being copied to Virgo's staging directory. An almost empty MANIFEST.MF was copied instead, thus breaking the application.

      I created a new topic on Virgo's forum.
      http://www.eclipse.org/forums/index.php/mv/msg/271003/771887/#msg_771887

      The thing is that the custom MANIFEST.MF must prevail, since it contains valuable OSGi information.

        Activity

        Hide
        Fred Bricon added a comment -

        This is the default maven behavior, i.e., if you run mvn package, the MANIFEST.MF in the war will be the one generated by Maven.

        m2e-wtp is driven by the pom.xml configuration, the goal is to have eclipse build == maven build whenever we can. So if you want to use a custom MANIFEST.MF, you must configure your maven-war-plugin accordingly, like :

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>2.1.1</version>
          <configuration>
            <archive>
              <manifestFile>src/main/webapp/META-INF/MANIFEST.MF</manifestFile>
            </archive>
          </configuration>
        </plugin>
        
        Show
        Fred Bricon added a comment - This is the default maven behavior, i.e., if you run mvn package, the MANIFEST.MF in the war will be the one generated by Maven. m2e-wtp is driven by the pom.xml configuration, the goal is to have eclipse build == maven build whenever we can. So if you want to use a custom MANIFEST.MF, you must configure your maven-war-plugin accordingly, like : <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.1.1</version> <configuration> <archive> <manifestFile>src/main/webapp/META-INF/MANIFEST.MF</manifestFile> </archive> </configuration> </plugin>
        Hide
        Fred Bricon added a comment -

        In the greenpages example, the fact that Maven CLI build uses an OSGi compliant MANIFEST.MF without overriding the aforementioned <manifestFile> attribute is due to the use of the com.springsource.bundlor.maven plugin, which does MANIFEST manipulation post packaging.

        AFAIK, there is no existing support for com.springsource.bundlor.maven wrt m2e / WTP integration.

        Show
        Fred Bricon added a comment - In the greenpages example, the fact that Maven CLI build uses an OSGi compliant MANIFEST.MF without overriding the aforementioned <manifestFile> attribute is due to the use of the com.springsource.bundlor.maven plugin, which does MANIFEST manipulation post packaging. AFAIK, there is no existing support for com.springsource.bundlor.maven wrt m2e / WTP integration.
        Hide
        Mariano Eloy Fernández Osca added a comment -

        Thanks for the answer Fred. I'll give it another try tomorrow to see if I can make Maven, Eclipse and Virgo get along. I'm concerned about how Virgo server adapter plug-in is copying things from $PROJECT/target to $VIRGO/stage. I think Maven's "package" goal is not actually being called to deploy things to the server, since it's more of an "exploded" kind of deployment.

        If I make any progress I'll post it at Eclipse's forum.

        Thanks again.

        Show
        Mariano Eloy Fernández Osca added a comment - Thanks for the answer Fred. I'll give it another try tomorrow to see if I can make Maven, Eclipse and Virgo get along. I'm concerned about how Virgo server adapter plug-in is copying things from $PROJECT/target to $VIRGO/stage. I think Maven's "package" goal is not actually being called to deploy things to the server, since it's more of an "exploded" kind of deployment. If I make any progress I'll post it at Eclipse's forum. Thanks again.

          People

          • Assignee:
            Fred Bricon
            Reporter:
            Mariano Eloy Fernández Osca
            Last Updated By:
            Mariano Eloy Fernández Osca
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Date of First Response: