Giulio Ruggeri created FELIX-4021:
-------------------------------------
Summary: mave-ipojo-plugin fails on WAR packaging
Key: FELIX-4021
URL: https://issues.apache.org/jira/browse/FELIX-4021
Project: Felix
Issue Type: Bug
Components: iPOJO
Affects Versions: ipojo-annotations-1.8.4
Reporter: Giulio Ruggeri
This is the pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>it.codin.test.osgi</groupId>
<artifactId>service-gui</artifactId>
<packaging>war</packaging>
<name>service-gui WAB OSGi Bundle</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
...
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.ipojo.annotations</artifactId>
<version>1.8.4</version>
</dependency>
...
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.7</version>
<extensions>true</extensions>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
<execution>
<id>bundle-install</id>
<phase>install</phase>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
<configuration>
<supportedProjectTypes>
<supportedProjectType>jar</supportedProjectType>
<supportedProjectType>bundle</supportedProjectType>
<supportedProjectType>ejb</supportedProjectType>
<supportedProjectType>war</supportedProjectType>
</supportedProjectTypes>
<manifestLocation>${project.build.directory}/bundle</manifestLocation>
<instructions>
<Bundle-ClassPath>.,WEB-INF/classes,{maven-dependencies}</Bundle-ClassPath>
<!--Embed-Directory>WEB-INF/lib</Embed-Directory-->
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive>
<Export-Package/>
<Web-ContextPath>/wab</Web-ContextPath>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<archive>
<manifestFile>${project.build.directory}/bundle/MANIFEST.MF</manifestFile>
</archive>
<webResources>
<resource>
<directory>src/main/webapp</directory>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-ipojo-plugin</artifactId>
<version>1.8.4</version>
<executions>
<execution>
<goals>
<goal>ipojo-bundle</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
and this is the error produced:
Failed to execute goal org.apache.felix:maven-ipojo-plugin:1.8.4:ipojo-bundle
(default) on project service-gui: Execution default of goal
org.apache.felix:maven-ipojo-plugin:1.8.4:ipojo-bundle failed: Path
'META-INF/MANIFEST.MF' do not start with 'WEB-INF/classes/' -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal
org.apache.felix:maven-ipojo-plugin:1.8.4:ipojo-bundle (default) on project
service-gui: Execution default of goal
org.apache.felix:maven-ipojo-plugin:1.8.4:ipojo-bundle failed: Path
'META-INF/MANIFEST.MF' do not start with 'WEB-INF/classes/'
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default
of goal org.apache.felix:maven-ipojo-plugin:1.8.4:ipojo-bundle failed: Path
'META-INF/MANIFEST.MF' do not start with 'WEB-INF/classes/'
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.IllegalArgumentException: Path 'META-INF/MANIFEST.MF' do
not start with 'WEB-INF/classes/'
at
org.apache.felix.ipojo.manipulator.store.mapper.WABResourceMapper.externalize(WABResourceMapper.java:42)
at
org.apache.felix.ipojo.manipulator.store.JarFileResourceStore.getExternalName(JarFileResourceStore.java:137)
at
org.apache.felix.ipojo.manipulator.store.JarFileResourceStore.accept(JarFileResourceStore.java:131)
at
org.apache.felix.ipojo.manipulator.metadata.AnnotationMetadataProvider.getMetadatas(AnnotationMetadataProvider.java:55)
at
org.apache.felix.ipojo.manipulator.metadata.CompositeMetadataProvider.getMetadatas(CompositeMetadataProvider.java:52)
at
org.apache.felix.ipojo.manipulator.Pojoization.pojoization(Pojoization.java:291)
at
org.apache.felix.ipojo.manipulator.Pojoization.pojoization(Pojoization.java:198)
at
org.apache.felix.ipojo.plugin.ManipulatorMojo.execute(ManipulatorMojo.java:236)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 20 more
the plugin fails too on version 1.8.2 and 1.8.6 but works fine on version 1.8.0
with the same configuration.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira