[deepamehta-devel] Upcoming Release 4.2 - new plugin naming convention

Jörg Richter jri at deepamehta.de
Mo Feb 24 16:35:06 CET 2014


Let me add one thing here that is important when you upgrade your plugins to DM 4.2.

> you officially release your plugin by just committing one POM change:
> 	- <artifactID> -- name your plugin according to new naming schema, that is add "dm42-" as a prefix
> 	- [...]

The changed artifactID results in a changed Bundle Symbolic Name. That in turn results in a changed URL namespace where DM publishes your plugin's static resources. Now, it would be very cumbersome for the plugin developer if, along with with each DM minor release (dm42-, dm43-, ...), she would be required to adapt the plugin's static resource URLs (in both, the plugin code and DB, e.g. the icon paths).

In order to solve this issue the new convention is that the plugin developer defines the plugin's Bundle Symbolic Name explicitly via one additional configuration setting in the plugin POM:

<project>

    <name>DeepaMehta 4 Cool Plugin</name>
    <groupId>my.domain</groupId>
    <artifactId>dm42-cool-plugin</artifactId>
    <version>0.5</version>
    <packaging>bundle</packaging>

    <parent>
        <groupId>de.deepamehta</groupId>
        <artifactId>deepamehta-plugin-parent</artifactId>
        <version>4.2</version>
    </parent>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>my.domain.dm4-cool-plugin</Bundle-SymbolicName>
                        <Bundle-Activator>
                            ...
                        </Bundle-Activator>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

Without the <Bundle-SymbolicName> configuration in this example the Maven Bundle Plugin would generate my.domain.dm42-cool-plugin as the default value (that is concatenating the plugin's groupId and artifactId), causing the problem mentioned above. So, the convention is to define the Bundle Symbolic Name explicitly and remove the minor number from "dm42-", yielding to "dm4-". BTW: in the Gogo Shell type "lb -s" to list the symbolic names of the installed bundles.

Once you've adapted your plugin accordingly please upload it to the http://download.deepamehta.de/ directory. This directory is supposed to hold the latest DM platform binaries as well as the set of compatible plugins. If you need an account for uploading please contact JuergeN.

Cheers,
Jörg

-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: <http://lists.deepamehta.de/mailman/private/devel-lists.deepamehta.de/attachments/20140224/4e1e78a0/attachment.html>


Mehr Informationen über die Mailingliste devel