Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8758323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:31:07+00:00 2026-06-13T14:31:07+00:00

I’m new to OSGi, coded only a few bundles and deployed them manually. Some

  • 0

I’m new to OSGi, coded only a few bundles and deployed them manually.
Some friends of mine told me about Virgo and Virgo tools, which allows you to auto-deploy bundles you manage with eclipse.

I’m currently trying to set all this up. I have virgo-tomcat-server-3.5.0.RELEASE, along with virgo tools 1.0.0, all of this installed on a Spring Tool Suite 3.1.0.RELEASE (in case you don’t know, this last one includes the m2eclipse plugin).

My bundle is a maven project. It uses the bnd plugin and here’s its configuration

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
    <instructions>
        <Export-Package>fr.tpepio.mtg.model</Export-Package>
    </instructions>
</configuration>
<executions>
    <execution>
        <id>build-manifest</id>
        <phase>compile</phase>
        <goals>
            <goal>manifest</goal>                           
        </goals>                        
    </execution>
</executions>

You can see that I export only one package. I also try to make m2eclipse to dynamically generate my manifest.mf file when eclipse compiles my classes.

I finally get to the issues I’m facing.

  1. Since I import my bundle as a maven project into STS, I have to add the Virgo facet to it. And as soon as I update my maven configuration, it kind of screws my projects and I get the following error :

    Java compiler level does not match the version of the installed Java project facet.
    
  2. Appart from my (shitty) maven configuration, I have found myself unable to add my project into the virgo server, which endlessly tells me

    null reason : null
    

Does someone has any clue ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T14:31:09+00:00Added an answer on June 13, 2026 at 2:31 pm

    Hurray ! Problems solved.

    First : about the java compiler and facet’s java version. Telling maven that your sources are coded in 1.6, and must be compiled in 1.6 will resolve the problem. Code is the following :

    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>2.3.2</version>
    <inherited>true</inherited>
    <configuration>
        <verbose>false</verbose>
        <encoding>${java.compiler.encoding}</encoding>
        <fork>true</fork>
        <source>${java.compile.version}</source>
        <target>${java.compile.version}</target>
    </configuration>
    

    I still don’t understand why it resolves this problem, since both my project configuration and STS configuration could only use java 6… I believe this is because my sources where compiled as 1.5 java sources.

    Second : adding the maven bundle project to virgo.

    1. Configure correctly bnd, by running its “manifest” goal in the right maven phase (e.g. : after your classes have been compiled), and tell him where he can find the manifest. This solves the “null reason : null” issue (maybe virgo should have said : “could not find manifest.mf… ?).

      <plugin>
      <groupId>org.apache.felix</groupId>
      <artifactId>maven-bundle-plugin</artifactId>
      <version>2.3.7</version>
      <extensions>true</extensions>
      <configuration>
              <instructions>
                      <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
                      <Bundle-Name>${project.name}</Bundle-Name>
                      <Bundle-Version>${project.version}</Bundle-Version>
                      <Bundle-ClassPath>.</Bundle-ClassPath>
                      <Export-Package>
                              [packages you want to export]
                      </Export-Package>
              </instructions>
      </configuration>
      <executions>
              <execution>
                      <id>bundle-manifest</id>
                      <phase>process-classes</phase>
                      <goals>
                              <goal>manifest</goal>
                      </goals>
                      <configuration>
                              <manifestLocation>src/main/resources/META-INF/</manifestLocation>
                      </configuration>
              </execution>
      </executions>
      

    2. Add this goal to the m2eclipse lifecycle mapping. This refreshes your manifest after each occurence of the phase you indicated in your bnd configuration (here : the process-classes phases). Otherwise, m2eclipse has no way to understand when it should call your goal.

      <pluginManagement>
      <plugins>
              <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
              <plugin>
                      <groupId>org.eclipse.m2e</groupId>
                      <artifactId>lifecycle-mapping</artifactId>
                      <version>1.0.0</version>
                      <configuration>
                              <lifecycleMappingMetadata>
                                      <pluginExecutions>
                                              <!-- Maven Bundle Plugin -->
                                              <pluginExecution>
                                                      <pluginExecutionFilter>
                                                              <groupId>org.apache.felix</groupId>
                                                              <artifactId>maven-bundle-plugin</artifactId>
                                                              <versionRange>[2.3.7,)</versionRange>
                                                              <goals>
                                                                      <goal>manifest</goal>
                                                              </goals>
                                                      </pluginExecutionFilter>
                                                      <action>
                                                              <execute>
                                                                      <runOnIncremental>false</runOnIncremental>
                                                              </execute>
                                                      </action>
                                              </pluginExecution>
                                      </pluginExecutions>
                              </lifecycleMappingMetadata>
                      </configuration>
              </plugin>
      </plugins>
      

    Hope this wil help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I don't have much knowledge about the IPv6 protocol, so sorry if the question
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.