I am creating osgi bundle by using maven bundle plugin in eclipse.In my application I have non maven jar file on which most of the java classes are depend in my application. my pom.xml file is as follow.
<build>
...
<plugins>
....
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.2.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Activator>org.myapp.Activator</Bundle-Activator>
<Include-Resource>a1.jar=${basedir}/src/main/java/lib/a1.jar,a2.jar=${basedir}/src/main/java/lib/a2.jar,a3.jar=${basedir}/src/main/java/lib/a3.jar</Include-Resource>
<Bundle-ClassPath>.,${basedir}/src/main/java/lib/a1.jar,${basedir}/src/main/java/lib/a2.jar,${basedir}/src/main/java/lib/a3.jar</Bundle-ClassPath>
</instructions>
</configuration>
</plugin>
<!-- Maven Compiler plugin -->
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<includes>
<include>${project.basedir}/src/main/java/**</include>
</includes>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
....
</plugins>
</build>
By using this I can build my application successfully and my final jar bundle also contains all needed jar files but the problem is, there is no .class file in the final bundle and my target directory also doesnt contain any .class file.
If I remove includes tag from maven-compiler-plugin then I got class does not exist error.
So please tell me what is the problem with above code which does not create .class files in target directory and also in final bundle.