-
Notifications
You must be signed in to change notification settings - Fork 51
Mavenizing OSGi bundles
What "mavenizing" means? When Wuff mavenizes OSGi-bundles, it does the following:
-
Wuff uses configuration property wuff/selectedEclipseVersion to decide which version of Eclipse must be downloaded and mavenized.
-
Wuff automatically downloads and unpacks Eclipse distribution packages specified in configuration part wuff/eclipseVersion/sources. All downloaded and unpacked files are placed to wuff directory (default is "$HOME/.wuff"). We can change wuff directory by configuration property wuff/wuffDir.
-
Wuff scans all JARs and subdirectories in unpacked distribution packages. Found OSGi bundles are processed furthermore.
-
Wuff generates pom.xml for every OSGi-bundle. The generated pom.xml contains maven coordinates "group:artifact:version", where "group" is constant (specified as eclipseVersion/eclipseMavenGroup property), "artifact" corresponds to OSGi-bundle name, "version" corresponds to OSGi-bundle version.
-
Wuff compares every required-bundle of the given OSGi-bundle against other mavenized OSGi-bundles and, when match found, converts it to maven dependency.
-
When Wuff configuration contains one or more wuff/languagePack or wuff/eclipseVersion/languagePack instructions, Wuff automatically finds language-fragments of the given OSGi-bundle and adds them as optional maven dependencies.
-
When Wuff configuration specifies source-code OSGi-bundles (of eclipse-SDK, for example), Wuff automatically adds them as source-jars to their master mavenized OSGi-bundles.
-
Wuff automatically installs mavenized OSGi-bundles to local maven repository, by default: $HOME/.wuff/m2_repository. Installation is performed as soon as we try to compile Wuff-enabled project. We can customize the location of local maven repository by setting wuff/localMavenRepository property.
-
Wuff implements the following gradle tasks for full control over mavenizing:
- downloadEclipse: downloads the selected eclipse distribution to wuff directory.
- installEclipse: installs the selected eclipse distribution to the local maven repository.
- uninstallEclipse: uninstalls the selected eclipse distribution from the local maven repository.
- uninstallAllEclipseVersions: uninstalls all eclipse distributions from the local maven repository.
- uploadEclipse: uploads mavenized artifacts to the remote maven repository specified in uploadEclipse configuration.
- purgeEclipse: uninstalls all eclipse distributions from the local maven repository, then deletes wuff directory.
As the result, we get complete and consistent representation of OSGi-bundles as a set of maven artifacts with dependencies.