Hi,

I forgot to tell you the version I have:
org.ops4j:maven-pax-plugin:1.4
and org.apache.felix:maven-bundle-plugin:2.0.1

The maven-bundle-plugin uses BND Tool 0.0.357




Regards
Mustafa Caylak





Stuart McCulloch wrote:
2009/10/28 Mustafa Caylak <[email protected]>

Hi,

Is really no one there who had this problem or knows why it occurs?
Or is something unclear?
It would be very kind if someone could help me.


I haven't had time this week to investigate - if you're using the latest
bundleplugin (2.0.1) you can use -X to see if the attribute is passed to Bnd

   ie.  mvn clean package -X > LOG

best redirect it to a file (because Maven 2 debug output is verbose) then
search this file for the section starting with "BND Instructions".

If the attribute is being passed to Bnd it should be generating the same
output... if it's not being passed you need to check your configuration.


Best regards,
Mustafa Caylak

Mustafa Caylak wrote:

Hi guys,

We have a problem with the Maven-Bundle-Plugin. When we define a
Declarative Service Component in the '.bnd'-file, we use a directive named
'servicefactory'. But the directive doesn't have an effect on the generated
XML-Document for the DSC.
I know that the plugin is based uppon the BND-Tool by Peter Kriens. So I
used it to check if it generates the document I want. It does ( <service
servicefactory='true'> ).

Do you know why the plugin ignores the directive?


In the following you see the definition of the DSC and the relevant part
of the pom.xml.

#-----------------------------------------------------------------
# BND FILE
#-----------------------------------------------------------------
Export-Package: de.offis.utils.configSC;version=1.0.0.SNAPSHOT
Private-Package: de.offis.utils.configSC.internal;version=1.0.0.SNAPSHOT
Service-Component: de.offis.utils.configSC.internal.ConfigReaderImpl; \
  provide:=de.offis.utils.configSC.ConfigReader; \
  immediate:=false; \
  servicefactory:=true




#-----------------------------------------------------------------
# RELEVANT PART OF OUR POM.XML
#-----------------------------------------------------------------
 <build>
  <plugins>
    <!-- This is use for OSGi extention of the build script. -->
    <plugin>
      <groupId>org.ops4j</groupId>
      <artifactId>maven-pax-plugin</artifactId>
      <configuration>
        <provision>
          <param>--platform=equinox</param>
          <param>--profiles=minimal</param>
        </provision>
      </configuration>
    </plugin>
    <plugin>
      <groupId>org.apache.felix</groupId>
      <artifactId>maven-bundle-plugin</artifactId>
  <extensions>true</extensions>
      <!--
       | the following instructions build a simple set of public/private
classes into an OSGi bundle
      -->
      <configuration>
        <manifestLocation>META-INF</manifestLocation>
        <instructions>

<Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
          <Bundle-Version>${pom.version}</Bundle-Version>
          <!--
           | assume public classes are in the top package, and private
classes are under ".internal"
          -->

<Export-Package>!${bundle.namespace}.internal.*,${bundle.namespace}.*;version="${pom.version}"</Export-Package>

<!--
 <Private-Package>${bundle.namespace}.internal.*</Private-Package>-->
        </instructions>
      </configuration>
    </plugin>
    <plugin>
      <artifactId>maven-clean-plugin</artifactId>
      <configuration>
        <filesets>
          <fileset>
            <directory>META-INF</directory>
          </fileset>
          <fileset>
            <directory>runner</directory>
          </fileset>
          <fileset>
            <directory>.</directory>
            <includes>
              <include>**/build.properties</include>
            </includes>
            <excludes>
              <exclude>**/*</exclude>
            </excludes>
          </fileset>
          <fileset>
            <directory>.settings</directory>
          </fileset>
        </filesets>
      </configuration>
    </plugin>
    <!-- Automation for test. -->
    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>findbugs-maven-plugin</artifactId>
    </plugin>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-javadoc-plugin</artifactId>
      <configuration>
        <destDir>${target.javadoc}</destDir>
      </configuration>
      <executions>
        <execution>
          <phase>package</phase>
          <goals>
            <goal>javadoc</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
    <!--
     | Include the compiler plugin. This will be used to setup the java
source
     | and target version. Default the source and target version is set to
1.3
     | in this project we will use 1.6.
     -->
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <configuration>
        <source>1.6</source>
        <target>1.6</target>
      </configuration>
    </plugin>
  </plugins>
 </build>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]






---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to