Quantcast
Channel: Adobe Community : Popular Discussions - CQ5 (read only)
Viewing all articles
Browse latest Browse all 12476

Not generating OSGI-INF folder

$
0
0

Hi,

 

I am new to OSGI.I have been having trouble to get OSGI-INF folder in generated jar file. I need to have folder structure like as below

 

  • META-INF
  • OSGI-INF
  • Com.mine.cq

 

  I am using Eclipse and m2e plugin. When I run my project I am getting BUILD SUCCESS. And I am getting the below folder structure in the generated jar file. Jar does not have OSGI-INF folder.

 

  • META-INF
  • Com.mine.cq

 

Here is my POM.xml

 

<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.0http://maven.apache.org/xsd/maven-4.0.0.xsd">

          <modelVersion>4.0.0</modelVersion>

 

 

          <groupId>com.mine.cq</groupId>

          <artifactId>mineCore</artifactId>

          <version>0.0.1-SNAPSHOT</version>

          <packaging>jar</packaging>

 

 

          <name>mineCore</name>

          <url>http://maven.apache.org</url>

 

 

          <properties>

                    <file.encoding>utf-8</file.encoding>

          </properties>

          <build>

        <defaultGoal>install</defaultGoal>

        <plugins>

            <plugin>

                <groupId>org.apache.maven.plugins</groupId>

                <artifactId>maven-enforcer-plugin</artifactId>

                <version>1.0-alpha-3</version>

                <executions>

                    <execution>

                        <id>enforce-java</id>

                        <goals>

                            <goal>enforce</goal>

                        </goals>

                        <configuration>

                            <rules>

                                <requireMavenVersion>

                                    <message>Maven 2.0.7 or higher</message>

                                    <version>2.0.7</version>

                                </requireMavenVersion>

                                <requireJavaVersion>

                                    <message>Java 5 or higher</message>

                                    <version>1.5.0</version>

                                </requireJavaVersion>

                            </rules>

                        </configuration>

                    </execution>

                </executions>

            </plugin>

            <plugin>

                <groupId>org.apache.felix</groupId>

                <artifactId>maven-bundle-plugin</artifactId>

                <version>1.4.3</version>

                <extensions>true</extensions>

                <configuration>

                    <instructions>

                        <Export-Package>

                                                                      com.mine.cq.mineCore.*

                        </Export-Package>

                        <Import-Package>

                            *;resolution:=optional,

                            javax.servlet;version=2.4,

                            javax.servlet.http;version=2.4

                        </Import-Package>

                                                            <Private-Package>

                                                            </Private-Package>

                        <Embed-Dependency>  

                        </Embed-Dependency>

                    </instructions>

                </configuration>

            </plugin>

 

 

            <plugin>

                <groupId>org.apache.felix</groupId>

                <artifactId>maven-scr-plugin</artifactId>

                <version>1.9.0</version>

                <executions>

                    <execution>

                        <id>generate-scr-scrdescriptor</id>

                        <goals>

                            <goal>scr</goal>

                        </goals>

                    </execution>

                </executions>

            </plugin>

            <plugin>

                <groupId>org.apache.maven.plugins</groupId>

                <artifactId>maven-scm-plugin</artifactId>

                <version>1.0</version>

                <configuration>

                    <goals>install</goals>

                </configuration>

            </plugin>

        </plugins>

        <extensions>

            <extension>

                <groupId>org.apache.maven.wagon</groupId>

                <artifactId>wagon-webdav</artifactId>

                <version>1.0-beta-2</version>

            </extension>

            <extension>

                <groupId>org.apache.maven.wagon</groupId>

                <artifactId>wagon-ssh</artifactId>

                <version>1.0-beta-2</version>

            </extension>

        </extensions>

    </build>

<dependencies>

                    <dependency>

                              <groupId>junit</groupId>

                              <artifactId>junit</artifactId>

                              <version>3.8.1</version>

                              <scope>test</scope>

                    </dependency>

          </dependencies>

</project>

 

 

Why OSGI-INF folder is not in the .jar file? I need to set some property information in OSGO-INF folder since I have to register my component as a OSGI service. Please guide me to get it done.

 

Thanks,

Anderson


Viewing all articles
Browse latest Browse all 12476

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>