Bndtools and Maven: A Brave New World - N Bartlett & T Ward

M
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Neil Bartlett
neil.bartlett@paremus.com
Bndtools and Maven:

A Brave New World
Tim Ward
tim.ward@paremus.com
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Overview
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Bnd & Bndtools History
• bnd is a low-level tool developed originally by Peter Kriens
and used by OSGi Alliance.
• Pre-dates Maven and Gradle!
• Most bnd builds used ANT.
• bnd provided dependency management missing from ANT.
• ~2006 Bndtools project started.
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Bnd, Bndtools & Maven
• Maven overtook ANT in the wider industry.
• Bndtools did not work well with Maven.
• Both trying to manage build dependencies & own the build
lifecycle.
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Bnd, Bndtools & Maven
• New Maven plugins in bnd since 3.2.
• Integration with M2E build lifecycle.
• Now even better in 3.5!
• Bundles and indexes rebuilt on save.
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Development Workflow
Component
Development
Bundle Unit
Testing
Bundle
Repository
Integration
Testing
Code-Test
Application
Assembly
Application
Artifact
consum
e
Deployment
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Project Structure
_distro
_index
Component
Bundles
_assembly
Test
Bundles
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Effective OSGi Archetypes
• Maven archetypes for easy project creation.
• Generates an application that runs out-of-the-box.
• Also archetypes for new bundle modules and integration test
modules.
• https://github.com/effectiveosgi/maven-archetypes
e
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Preview
• We are building a simple “Points of Interest” web application.
• See what it will look like by running ‘java -jar preview.jar’ and
navigating to http://localhost:8080/index.html
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Get It
github.com/paremus/osgi-community-event2017/releases
bit.ly/osgice2017tut
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Exercise Help
• These slides have the key new content but not everything.
• New files introduced in each lab are under tutorial/NN_
• E.g.: 01_command_bundle/HelloCommand.java
• Have to put in the right place!
• If you get really stuck, use the checkpoint zips.
• E.g. 03_tester_bundle.checkpoint.zip contains everything up to
and including the tester bundle exercise.
• Refer to current checkpoint number in top-right of slide.
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Install Archetypes
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Install Effective OSGi Archetypes
• Not yet available on Maven Central, so…
• Open folder archetypes
• Run install.sh or install.bat
• Uses ‘mvn install:install-file’ to copy into local Maven repo.
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Project Initiation
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Initial Project
mvn archetype:generate 
-DarchetypeGroupId=com.effectiveosgi 
-DarchetypeVersion=0.0.1-SNAPSHOT 
-DarchetypeArtifactId=eosgi-project-archetype
Group ID: org.example.bnd-maven
Artifact ID: example-parent
Version, Package: <use defaults>
Checkpoint: 00
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Initial Project
• Includes a skeleton OSGi application that can be run
immediately.
• Open _assembly/application.bndrun and click Run.
• Or:
• mvn package
• java -jar _assembly/target/application.jar
• You should be in the Gogo shell. Ctrl-D to exit.
Checkpoint: 00
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Command Bundle
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Generate Module
mvn archetype:generate 
-DarchetypeGroupId=com.effectiveosgi 
-DarchetypeVersion=0.0.1-SNAPSHOT 
-DarchetypeArtifactId=eosgi-module-archetype
Group ID: org.example.bnd-maven
Artifact ID: org.example.command
Version, Package: <use defaults>
Checkpoint: 01
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Command Bundle Code
• Rename Example.java to HelloCommand.java
package org.example.command;
import java.text.MessageFormat;
import org.osgi.service.component.annotations.*;
@Component(
service = Object.class,
property = {
"osgi.command.scope=greeting",
"osgi.command.function=sayHello"
})
public class HelloCommand {
public String sayHello() {
return sayHello("anonymous user");
}
public String sayHello(String name) {
return MessageFormat.format("Hello, {0}", name);
}
}
Checkpoint: 01
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Command Bundle Code
• Rename ExampleTest.java to HelloCommandTest.java
package org.example.command;
import static org.junit.Assert.*;
import org.junit.Test;
public class HelloCommandTest {
@Test
public void test() {
HelloCommand cmd = new HelloCommand();
assertEquals("Hello, Donald", cmd.sayHello("Donald"));
}
}
Checkpoint: 01
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Command Bundle Testing
• Open launch.bndrun
• Check that the Resolve button works.
• Click Run OSGi.
• Try the command ‘sayHello <name>’
• Unit Testing: right-click src/test/java and Run As > JUnit Test.
Checkpoint: 01
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Command Bundle Indexing
• Include org.example.command in the main index.
• This makes your new bundle available for application
assembly.
• _index/pom.xml:
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.example.command</artifactId>
<version>${project.version}</version>
</dependency>
Checkpoint: 01
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
P.o.I. (Points-of-

Interest) Bundle
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Generate Module
mvn archetype:generate 
-DarchetypeGroupId=com.effectiveosgi 
-DarchetypeVersion=0.0.1-SNAPSHOT 
-DarchetypeArtifactId=eosgi-module-archetype
Group ID: org.example.bnd-maven
Artifact ID: org.example.poi
Version, Package: <use defaults>
Checkpoint: 02
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
POI Bundle API
• Create package org.example.poi with package-info.java:
• Add PointsOfInterest.java:
@org.osgi.annotation.versioning.Version("1.0.0")
package org.example.poi;
package org.example.poi;
import java.util.List;
public interface PointsOfInterest {
static final class POI {
public float latitude;
public float longitude;
public String label;
@Override
public String toString() { return String.format("POI '%s':lat=%f;long=%f", label, latitude, longitude); }
}
List<POI> find(String search) throws Exception;
}
Checkpoint: 02
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
POI Bundle Implementation
• Create package org.example.poi.impl and POIComponent.java
@Component
public class POIComponent implements PointsOfInterest {
private final List<POI> pois = new ArrayList<>();
@Activate
void activate() throws Exception {
InputStream resource = getClass().getResourceAsStream("/data.csv");
if (resource == null) throw new IllegalStateException("Missing data resource");
try (BufferedReader reader = new BufferedReader(new InputStreamReader(resource))) {
reader.lines()
.map(s -> s.split(",", 3))
.map(ss -> {
if (ss.length != 3) throw new IllegalArgumentException("Not enough fields: " + Arrays.toString(ss));
POI poi = new POI();
poi.latitude = Float.parseFloat(ss[0]);
poi.longitude = Float.parseFloat(ss[1]);
poi.label = ss[2];
return poi;
}).forEach(pois::add);
}
}
@Override
public List<POI> find(String search) throws Exception {
Pattern pattern = Pattern.compile(search.toLowerCase().replaceAll("*", ".*"));
return pois.stream()
.filter(poi -> pattern.matcher(poi.label.toLowerCase()).find())
.collect(Collectors.toList());
}
}
Checkpoint: 02
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
POI Bundle Data
• Copy data.csv to src/main/resources
48.8927,9.1950,OSGi Community Event
48.78816,9.23413,Mercedes-Benz Museum
48.89168,9.18617,Ludwigsburg S-Bahn
48.90448,9.19571,Favoriteschloss
Checkpoint: 02
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
POI Bundle Unit Test
• Under src/test/java, package org.example.poi.impl, create
POIComponentTest.java:
• Right-click src/test/java, Run As > JUnit Test
public class POIComponentTest {
@Test
public void test() throws Exception {
// This doesn't really test the component, it only shows the component is testable in plain JUnit
POIComponent component = new POIComponent();
component.activate();
List<POI> pois = component.find("*");
assertNotNull(pois);
}
}
Checkpoint: 02
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
POI Bundle Indexing
• Include org.example.poi in the main index:
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.example.poi</artifactId>
<version>${project.version}</version>
</dependency>
Checkpoint: 02
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Tester Bundle
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Generate Module
mvn archetype:generate 
-DarchetypeGroupId=com.effectiveosgi 
-DarchetypeVersion=0.0.1-SNAPSHOT 
-DarchetypeArtifactId=eosgi-test-module-archetype
Group ID: org.example.bnd-maven
Artifact ID: org.example.poi.test
Version, Package: <use defaults>
Checkpoint: 03
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
POI Test Depends on POI
• Add dependency to pom.xml:
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.example.poi</artifactId>
<version>${project.version}</version>
</dependency>
Checkpoint: 03
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
POI Test Class
• Create POIBundleTest in org.example.poi.test:
public class POIBundleTest {
private final BundleContext context = FrameworkUtil.getBundle(POIBundleTest.class).getBundleContext();
private ServiceTracker<PointsOfInterest, PointsOfInterest> poiTracker;
@Before
public void before() {
poiTracker = new ServiceTracker<>(context, PointsOfInterest.class, null);
poiTracker.open(true);
}
@After
public void after() {
poiTracker.close();
}
@Test
public void testExample() throws Exception {
PointsOfInterest pois = poiTracker.waitForService(1000);
assertNotNull("POI service not found", pois);
assertNotNull("POI search returned null", pois.find("*"));
}
}
Checkpoint: 03
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
POI Integration Test
• Resolve org.example.poi.test.bndrun
• Right-click, Run As > Bnd OSGi Test Launcher (JUnit)
• Try automated build: ‘mvn verify’
Checkpoint: 03
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
POI Test Bundle Indexing?
• DO NOT include org.example.poi in the main index:
• Why…?
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.example.poi.test</artifactId>
<version>${project.version}</version>
</dependency>
Checkpoint: 03
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Web Bundle
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Web Bundle
• Our most complex bundle yet.
• Three stages:
• 1. Build the web app front-end with non-functional back-end.
• 2. Connect to the POI back end.
• 3. Add Jackson to serialize data from the back-end.
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Generate Module
mvn archetype:generate 
-DarchetypeGroupId=com.effectiveosgi 
-DarchetypeVersion=0.0.1-SNAPSHOT 
-DarchetypeArtifactId=eosgi-module-archetype
Group ID: org.example.bnd-maven
Artifact ID: org.example.web
Version, Package: <use defaults>
Checkpoint: 04
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Web Bundle Dependencies
• Need to depend on the Servlet API:
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.http.servlet-api</artifactId>
<version>1.1.2</version>
</dependency>
Checkpoint: 04
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Servlet Component
• Rename Example.java to POIServlet.java:
@Component(
property = {
HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PATTERN + "=/*",
HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PREFIX + "=/static",
HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN + "=/servlet"
})
public class POIServlet extends HttpServlet implements Servlet {
private static final long serialVersionUID = 1L;
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String query = req.getQueryString();
if (query == null || query.trim().isEmpty()) query = "";
try (OutputStream out = resp.getOutputStream()) {
// TODO: delete code below, replace with code to search for POIs and serialize as JSON to the browser
new PrintStream(out).println("[]"); // empty JSON array
} catch (Exception e) {
resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage());
}
}
}
Checkpoint: 04
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Static Web Resources
• Copy whole ‘static’ folder to src/main/resources.
• Standard web structure: HTML, CSS and JS.
Checkpoint: 04
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Declare Web Engine Requirement
• Create bnd.bnd and switch to Source tab. Add:
• Declares that our bundle requires a Web Engine at runtime.
• Enables the Resolver to fully assemble the application.
• Yes the syntax is nasty. Java source annotations coming in
OSGi R7!
Require-Capability: 
osgi.implementation; 
filter:="(&(osgi.implementation=osgi.http)(version>=1)(!(version>=2)))"
Checkpoint: 04
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Run Simple Web App
• Resolve and run launch.bndrun
• Navigate to http://localhost:8080/index.html
• Note the POI search doesn’t work yet!
Checkpoint: 04
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Connect Web Bundle to POI Service
• Make org.example.web depend on org.example.poi:
• Add reference from POIServlet to PointsOfInterest service:
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.example.poi</artifactId>
<version>${project.version}</version>
</dependency>
// ...
@Reference
PointsOfInterest poiSvc;
// ...
Checkpoint: 05
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Serialize with Jackson
• Make org.example.web depend on Jackson Databind:
• Use ObjectMapper to serialize result of poiSvc.find():
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.1</version>
</dependency>
// ...
private ObjectMapper mapper = new ObjectMapper();
// ...
try (OutputStream out = resp.getOutputStream()) {
List<POI> pois = poiSvc.find(query);
mapper.writeValue(out, pois);
} catch (Exception e) {
resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage());
}
// ...
Checkpoint: 06
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Run Simple Web App
• Resolve and run launch.bndrun
• Navigate to http://localhost:8080/index.html
• The POI search should now work (try inputting ‘*’).
Checkpoint: 06
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Assembly
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Application Assembly
• _index generates an OSGi repository XML index.
• Format specified in OSGi Compendium R5+, Section 132.5
• Can be used by many OSGi-oriented tools and platforms.
• _assembly generates standalone applications
• Based on a bndrun file.
• Run exactly the application in production that was tested in dev.
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Indexing
• The bnd-indexer-maven-plugin indexes all transitive
dependencies of the module to which it is attached.
• … in either compile and runtime scope.
• It must depend on all non-test project modules.
• Many Maven users build their application directly this way.
• For us, the index is just the set of potentially useful bundles.
• The OSGi Resolver uses this to assemble only exactly what we
need and nothing more.
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Assembly
• The _assembly module depends on _index and defines one
or more launch definitions.
• An application is defined in terms of top-level requirements.
• Resolves against index to find all the “boring” dependencies.
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Assembly
• The bnd-export-maven-plugin generates a standalone
application JAR file (just add Java).
• Resolve in the IDE or command line to review & tweak
contents.
• Automated build also checks resolution & fails build if
different.
• Very useful to prevent dependency creep!
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Catching Dependency Creep TODO
• Start using external library from our bundle…
• Example: add SLF4j to org.example.command
• pom.xml:
• Example.java:
• “mvn package”… fails due to undeclared dependency (which is good)!
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>
import org.slf4j.*;
@Component
public class HelloCommand {
Logger logger = LoggerFactory.getLogger(Example.class);
// ...
}
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Shepherding Dependencies
• Compile Scope: try to depend only on APIs, e.g. Servlet API,
SLF4j…
• Runtime Scope: depend on supporting implementations, e.g.
Logback, Felix Jetty…
• _distro for widely used 3rd party runtime bundles, e.g.:
• SCR, Config Admin, Gogo, Event Admin…
• Make proper use of Provided Scope for dependencies that should
never be installed as bundles, e.g. OSGi Core/Compendium
• Some 3rd party bundles have not done this correctly. You will
need to use Maven exclusions :-(
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Multiple Versions
• OSGi can support multiple versions at runtime. Great!
• Classic example: my app needs Guava N and Guava N+1.
• Maven will not allow any module to depend on two versions of
the same artifact.
• Therefore: cannot generate a single index with both Guavas.
• Solution is multiple indexes.
• A bndrun file can reference arbitrarily many indexes.
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Continuous

Integration
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Indexing & Resource URLs
• Taking a look at the index you might notice a problem:
• This is good for local dev… don’t need a Nexus/Artifactory.
• But this index is not consumable outside my computer.
• Need to control the policy w.r.t. resource locations.
<capability namespace="osgi.content">
<attribute name="size" value="7063" type="Long"/>
<attribute name="url" value=“file:/Users/nbartlett/…/org.example.poi/target/org.example.poi-1.0-SNAPSHOT.jar”/>
<attribute name="mime" value="application/vnd.osgi.bundle"/>
<attribute name="osgi.content" value="901CD7D625C58F6C138244620776317AC0666139F79246D22AFF4CD1C4FA3456"/>
</capability>
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Local Index Policy
• This config is in the parent POM:
• FORBIDDEN means the resource must have a real URL, or
build fails… perfect for CI build.
• Configure CI job to set the CI_Build profile.
<!-- Declare a profile for CI builds, where indexes are not permitted to
contain local file: URLs. -->
<profiles>
<profile>
<id>CI_Build</id>
<properties>
<local.index.policy>FORBIDDEN</local.index.policy>
</properties>
</profile>
</profiles>
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Review
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Maven Plugins Used
• bnd-maven-plugin: Basically builds bundles!
• bnd-indexer-maven-plugin: Generates OSGi repo index.
• bnd-testing-maven-plugin: Executes tests in OSGi Framework.
• bnd-export-maven-plugin: Generates standalone applications.
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Maven Plugins NOT Used
• bnd-resolver-maven-plugin: Resolves bndruns.
• Intended for manual command-line usage:
• ‘mvn bnd-resolver:resolve’
• Usually easier to resolve in Bndtools
• bnd-baseline-maven-plugin: Validates semantic versions
• Requires comparison against a release version in a repo.
• Left as an exercise
Copyright © 2017 Paremus Ltd.
May not be reproduced by any means without express permission. All rights reserved.
October 2017
Thank You!
Sources: github.com/paremus/osgi-community-event2017
Email: neil.bartlett@paremus.com
Twitter: @nbartlett
1 of 61

Recommended

Understanding and extending p2 for fun and profit by
Understanding and extending p2 for fun and profitUnderstanding and extending p2 for fun and profit
Understanding and extending p2 for fun and profitPascal Rapicault
9.5K views126 slides
Lets explore sitecore helix by
Lets explore sitecore helixLets explore sitecore helix
Lets explore sitecore helixGopikrishna Gujjula
643 views18 slides
Infrastructure automation using awx ansible tower by
Infrastructure automation using awx ansible towerInfrastructure automation using awx ansible tower
Infrastructure automation using awx ansible towerTO THE NEW Pvt. Ltd.
219 views11 slides
Git commit ve push’dan bir adım ötesi... by
Git commit ve push’dan bir adım ötesi...Git commit ve push’dan bir adım ötesi...
Git commit ve push’dan bir adım ötesi...ibrahimgunduz34
2.2K views19 slides
Web API Basics by
Web API BasicsWeb API Basics
Web API BasicsLearnNowOnline
1.3K views136 slides
카카오에서의 Trove 운영사례 by
카카오에서의 Trove 운영사례카카오에서의 Trove 운영사례
카카오에서의 Trove 운영사례Won-Chon Jung
1.4K views23 slides

More Related Content

What's hot

Speed up web API with Laravel and Swoole using Docker by
Speed up web API with Laravel and Swoole using DockerSpeed up web API with Laravel and Swoole using Docker
Speed up web API with Laravel and Swoole using DockerLaravel Poland MeetUp
2.7K views31 slides
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines by
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins PipelinesAn Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins PipelinesSteffen Gebert
5.3K views60 slides
Documenting your REST API with Swagger - JOIN 2014 by
Documenting your REST API with Swagger - JOIN 2014Documenting your REST API with Swagger - JOIN 2014
Documenting your REST API with Swagger - JOIN 2014JWORKS powered by Ordina
830 views22 slides
Docker compose by
Docker composeDocker compose
Docker composeFelipe Ruhland
756 views31 slides
Red Hat OpenShift Operators - Operators ABC by
Red Hat OpenShift Operators - Operators ABCRed Hat OpenShift Operators - Operators ABC
Red Hat OpenShift Operators - Operators ABCRobert Bohne
1.8K views46 slides
Maven Basics - Explained by
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - ExplainedSmita Prasad
1.1K views46 slides

What's hot(20)

Speed up web API with Laravel and Swoole using Docker by Laravel Poland MeetUp
Speed up web API with Laravel and Swoole using DockerSpeed up web API with Laravel and Swoole using Docker
Speed up web API with Laravel and Swoole using Docker
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines by Steffen Gebert
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins PipelinesAn Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
Steffen Gebert5.3K views
Red Hat OpenShift Operators - Operators ABC by Robert Bohne
Red Hat OpenShift Operators - Operators ABCRed Hat OpenShift Operators - Operators ABC
Red Hat OpenShift Operators - Operators ABC
Robert Bohne1.8K views
Maven Basics - Explained by Smita Prasad
Maven Basics - ExplainedMaven Basics - Explained
Maven Basics - Explained
Smita Prasad1.1K views
Deploying PHP Application Using Bitbucket Pipelines by Dolly Aswin Harahap
Deploying PHP Application Using Bitbucket PipelinesDeploying PHP Application Using Bitbucket Pipelines
Deploying PHP Application Using Bitbucket Pipelines
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr... by Edureka!
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
Dockerfile Tutorial with Example | Creating your First Dockerfile | Docker Tr...
Edureka!603 views
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화 by OpenStack Korea Community
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화
[OpenStack 하반기 스터디] Docker를 이용한 OpenStack 가상화
Docker and Kubernetes 101 workshop by Sathish VJ
Docker and Kubernetes 101 workshopDocker and Kubernetes 101 workshop
Docker and Kubernetes 101 workshop
Sathish VJ385 views
기업 IT 인프라 환경 최적화를 위한 하이브리드 클라우드 적용 방안 - AWS Summit Seoul 2017 by Amazon Web Services Korea
기업 IT 인프라 환경 최적화를 위한 하이브리드 클라우드 적용 방안 - AWS Summit Seoul 2017기업 IT 인프라 환경 최적화를 위한 하이브리드 클라우드 적용 방안 - AWS Summit Seoul 2017
기업 IT 인프라 환경 최적화를 위한 하이브리드 클라우드 적용 방안 - AWS Summit Seoul 2017
REST & API Management with the WSO2 ESB by WSO2
REST & API Management with the WSO2 ESBREST & API Management with the WSO2 ESB
REST & API Management with the WSO2 ESB
WSO26.1K views
Sitecore Helix/Habitat Architecture and Ecosystem by Mohamed Krimi
Sitecore Helix/Habitat Architecture and EcosystemSitecore Helix/Habitat Architecture and Ecosystem
Sitecore Helix/Habitat Architecture and Ecosystem
Mohamed Krimi541 views
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To... by Edureka!
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
What is Docker | Docker Tutorial for Beginners | Docker Container | DevOps To...
Edureka!3.6K views
Kubernetes Deployment Tutorial | Kubernetes Tutorial For Beginners | Kubernet... by Edureka!
Kubernetes Deployment Tutorial | Kubernetes Tutorial For Beginners | Kubernet...Kubernetes Deployment Tutorial | Kubernetes Tutorial For Beginners | Kubernet...
Kubernetes Deployment Tutorial | Kubernetes Tutorial For Beginners | Kubernet...
Edureka!2K views
Modern JavaScript Frameworks: Angular, React & Vue.js by Jonas Bandi
Modern JavaScript Frameworks: Angular, React & Vue.jsModern JavaScript Frameworks: Angular, React & Vue.js
Modern JavaScript Frameworks: Angular, React & Vue.js
Jonas Bandi2.1K views
letswift22_권은빈_비전공자 개발자로 살아남기.pdf by ssuserf55636
letswift22_권은빈_비전공자 개발자로 살아남기.pdfletswift22_권은빈_비전공자 개발자로 살아남기.pdf
letswift22_권은빈_비전공자 개발자로 살아남기.pdf
ssuserf5563695 views
Selenoid: browsers in containers by Ivan Krutov
Selenoid: browsers in containersSelenoid: browsers in containers
Selenoid: browsers in containers
Ivan Krutov813 views

Similar to Bndtools and Maven: A Brave New World - N Bartlett & T Ward

Jigsaw what the Heck Happens Now - N Bartlett by
Jigsaw what the Heck Happens Now - N BartlettJigsaw what the Heck Happens Now - N Bartlett
Jigsaw what the Heck Happens Now - N Bartlettmfrancis
373 views47 slides
NEW LAUNCH! AWS DeepLens workshop: Building Computer Vision Applications - MC... by
NEW LAUNCH! AWS DeepLens workshop: Building Computer Vision Applications - MC...NEW LAUNCH! AWS DeepLens workshop: Building Computer Vision Applications - MC...
NEW LAUNCH! AWS DeepLens workshop: Building Computer Vision Applications - MC...Amazon Web Services
1.9K views49 slides
Advanced GitHub Enterprise Administration by
Advanced GitHub Enterprise AdministrationAdvanced GitHub Enterprise Administration
Advanced GitHub Enterprise AdministrationLars Schneider
2.3K views67 slides
Serverless ASP.NET Core 2.0 Applicationsを作ってみた by
Serverless ASP.NET Core 2.0 Applicationsを作ってみたServerless ASP.NET Core 2.0 Applicationsを作ってみた
Serverless ASP.NET Core 2.0 Applicationsを作ってみたAmazon Web Services Japan
779 views14 slides
CON307_Building Effective Container Images by
CON307_Building Effective Container ImagesCON307_Building Effective Container Images
CON307_Building Effective Container ImagesAmazon Web Services
520 views32 slides
Authentication and Identity with Amazon Cognito & Analytics with Amazon Pinpoint by
Authentication and Identity with Amazon Cognito & Analytics with Amazon PinpointAuthentication and Identity with Amazon Cognito & Analytics with Amazon Pinpoint
Authentication and Identity with Amazon Cognito & Analytics with Amazon PinpointAmazon Web Services
944 views21 slides

Similar to Bndtools and Maven: A Brave New World - N Bartlett & T Ward(20)

Jigsaw what the Heck Happens Now - N Bartlett by mfrancis
Jigsaw what the Heck Happens Now - N BartlettJigsaw what the Heck Happens Now - N Bartlett
Jigsaw what the Heck Happens Now - N Bartlett
mfrancis373 views
NEW LAUNCH! AWS DeepLens workshop: Building Computer Vision Applications - MC... by Amazon Web Services
NEW LAUNCH! AWS DeepLens workshop: Building Computer Vision Applications - MC...NEW LAUNCH! AWS DeepLens workshop: Building Computer Vision Applications - MC...
NEW LAUNCH! AWS DeepLens workshop: Building Computer Vision Applications - MC...
Amazon Web Services1.9K views
Advanced GitHub Enterprise Administration by Lars Schneider
Advanced GitHub Enterprise AdministrationAdvanced GitHub Enterprise Administration
Advanced GitHub Enterprise Administration
Lars Schneider2.3K views
Authentication and Identity with Amazon Cognito & Analytics with Amazon Pinpoint by Amazon Web Services
Authentication and Identity with Amazon Cognito & Analytics with Amazon PinpointAuthentication and Identity with Amazon Cognito & Analytics with Amazon Pinpoint
Authentication and Identity with Amazon Cognito & Analytics with Amazon Pinpoint
AEM DataLayer IMMERSE 2017 Presentation by Dan Klco by Daniel Klco
AEM DataLayer IMMERSE 2017 Presentation by Dan KlcoAEM DataLayer IMMERSE 2017 Presentation by Dan Klco
AEM DataLayer IMMERSE 2017 Presentation by Dan Klco
Daniel Klco749 views
Open Development - an Engineering Manager's Perspective by Michael Marth
Open Development - an Engineering Manager's PerspectiveOpen Development - an Engineering Manager's Perspective
Open Development - an Engineering Manager's Perspective
Michael Marth571 views
DEV322_Continuous Integration Best Practices for Software Development Teams by Amazon Web Services
DEV322_Continuous Integration Best Practices for Software Development TeamsDEV322_Continuous Integration Best Practices for Software Development Teams
DEV322_Continuous Integration Best Practices for Software Development Teams
Amazon Web Services3.4K views
Php Dependency Management with Composer ZendCon 2017 by Clark Everetts
Php Dependency Management with Composer ZendCon 2017Php Dependency Management with Composer ZendCon 2017
Php Dependency Management with Composer ZendCon 2017
Clark Everetts670 views
Building OSGi Projects with bnd in Maven -- Ray Augé, Liferay by OSGi Alliance
Building OSGi Projects with bnd in Maven -- Ray Augé, LiferayBuilding OSGi Projects with bnd in Maven -- Ray Augé, Liferay
Building OSGi Projects with bnd in Maven -- Ray Augé, Liferay
OSGi Alliance201 views
Automated perf optimization - jQuery Conference by Matthew Lancaster
Automated perf optimization - jQuery ConferenceAutomated perf optimization - jQuery Conference
Automated perf optimization - jQuery Conference
Matthew Lancaster4.5K views
Building resuable and customizable Vue components by Filip Rakowski
Building resuable and customizable Vue componentsBuilding resuable and customizable Vue components
Building resuable and customizable Vue components
Filip Rakowski710 views
Sys ml helperprofile-rhapsody813-obtainandinstall-v1 by Fraser Chadburn
Sys ml helperprofile-rhapsody813-obtainandinstall-v1Sys ml helperprofile-rhapsody813-obtainandinstall-v1
Sys ml helperprofile-rhapsody813-obtainandinstall-v1
Fraser Chadburn2.2K views
Learn reactjs, how to code with example and general understanding thinkwik by Hetaxi patel
Learn reactjs, how to code with example and general understanding   thinkwikLearn reactjs, how to code with example and general understanding   thinkwik
Learn reactjs, how to code with example and general understanding thinkwik
Hetaxi patel43 views
Fuel your mobile apps with assets and content by arumsey
Fuel your mobile apps with assets and contentFuel your mobile apps with assets and content
Fuel your mobile apps with assets and content
arumsey82 views
Sleep Peacefully as Maven Tycho Builds your Product by Subramanyam C
Sleep Peacefully as Maven Tycho Builds your ProductSleep Peacefully as Maven Tycho Builds your Product
Sleep Peacefully as Maven Tycho Builds your Product
Subramanyam C1K views
How to create a local Android open source project mirror in 6 easy steps by Deveo
How to create a local Android open source project mirror in 6 easy stepsHow to create a local Android open source project mirror in 6 easy steps
How to create a local Android open source project mirror in 6 easy steps
Deveo2.2K views

More from mfrancis

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I... by
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...mfrancis
544 views12 slides
OSGi and Java 9+ - BJ Hargrave (IBM) by
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)mfrancis
1.4K views26 slides
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living) by
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)mfrancis
484 views15 slides
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu by
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruumfrancis
589 views31 slides
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe... by
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...mfrancis
437 views23 slides
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So... by
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...mfrancis
873 views12 slides

More from mfrancis(20)

Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I... by mfrancis
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
mfrancis544 views
OSGi and Java 9+ - BJ Hargrave (IBM) by mfrancis
OSGi and Java 9+ - BJ Hargrave (IBM)OSGi and Java 9+ - BJ Hargrave (IBM)
OSGi and Java 9+ - BJ Hargrave (IBM)
mfrancis1.4K views
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living) by mfrancis
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
mfrancis484 views
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu by mfrancis
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank LyaruuOSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
mfrancis589 views
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe... by mfrancis
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
mfrancis437 views
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So... by mfrancis
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
mfrancis873 views
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting... by mfrancis
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
mfrancis318 views
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe) by mfrancis
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
mfrancis320 views
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele... by mfrancis
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
mfrancis416 views
OSGi CDI Integration Specification - Ray Augé (Liferay) by mfrancis
OSGi CDI Integration Specification - Ray Augé (Liferay)OSGi CDI Integration Specification - Ray Augé (Liferay)
OSGi CDI Integration Specification - Ray Augé (Liferay)
mfrancis393 views
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech... by mfrancis
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
mfrancis326 views
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co... by mfrancis
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
mfrancis339 views
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch... by mfrancis
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
mfrancis270 views
Popular patterns revisited on OSGi - Christian Schneider (Adobe) by mfrancis
Popular patterns revisited on OSGi - Christian Schneider (Adobe)Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
mfrancis201 views
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM) by mfrancis
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
mfrancis287 views
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec) by mfrancis
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
mfrancis178 views
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V... by mfrancis
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
mfrancis975 views
MicroProfile, OSGi was meant for this - Ray Auge (Liferay) by mfrancis
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
mfrancis426 views
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso... by mfrancis
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
mfrancis407 views
How to connect your OSGi application - Dirk Fauth (Bosch) by mfrancis
How to connect your OSGi application - Dirk Fauth (Bosch)How to connect your OSGi application - Dirk Fauth (Bosch)
How to connect your OSGi application - Dirk Fauth (Bosch)
mfrancis832 views

Recently uploaded

20231123_Camunda Meetup Vienna.pdf by
20231123_Camunda Meetup Vienna.pdf20231123_Camunda Meetup Vienna.pdf
20231123_Camunda Meetup Vienna.pdfPhactum Softwareentwicklung GmbH
41 views73 slides
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveNetwork Automation Forum
31 views35 slides
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...Bernd Ruecker
37 views69 slides
Case Study Copenhagen Energy and Business Central.pdf by
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdfAitana
16 views3 slides
Voice Logger - Telephony Integration Solution at Aegis by
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at AegisNirmal Sharma
39 views1 slide
The Research Portal of Catalonia: Growing more (information) & more (services) by
The Research Portal of Catalonia: Growing more (information) & more (services)The Research Portal of Catalonia: Growing more (information) & more (services)
The Research Portal of Catalonia: Growing more (information) & more (services)CSUC - Consorci de Serveis Universitaris de Catalunya
80 views25 slides

Recently uploaded(20)

Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive by Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... by Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker37 views
Case Study Copenhagen Energy and Business Central.pdf by Aitana
Case Study Copenhagen Energy and Business Central.pdfCase Study Copenhagen Energy and Business Central.pdf
Case Study Copenhagen Energy and Business Central.pdf
Aitana16 views
Voice Logger - Telephony Integration Solution at Aegis by Nirmal Sharma
Voice Logger - Telephony Integration Solution at AegisVoice Logger - Telephony Integration Solution at Aegis
Voice Logger - Telephony Integration Solution at Aegis
Nirmal Sharma39 views
Powerful Google developer tools for immediate impact! (2023-24) by wesley chun
Powerful Google developer tools for immediate impact! (2023-24)Powerful Google developer tools for immediate impact! (2023-24)
Powerful Google developer tools for immediate impact! (2023-24)
wesley chun10 views
Business Analyst Series 2023 - Week 3 Session 5 by DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10248 views
SAP Automation Using Bar Code and FIORI.pdf by Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
HTTP headers that make your website go faster - devs.gent November 2023 by Thijs Feryn
HTTP headers that make your website go faster - devs.gent November 2023HTTP headers that make your website go faster - devs.gent November 2023
HTTP headers that make your website go faster - devs.gent November 2023
Thijs Feryn22 views
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... by TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc10 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... by James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson85 views

Bndtools and Maven: A Brave New World - N Bartlett & T Ward

  • 1. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Neil Bartlett neil.bartlett@paremus.com Bndtools and Maven:
 A Brave New World Tim Ward tim.ward@paremus.com
  • 2. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Overview
  • 3. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Bnd & Bndtools History • bnd is a low-level tool developed originally by Peter Kriens and used by OSGi Alliance. • Pre-dates Maven and Gradle! • Most bnd builds used ANT. • bnd provided dependency management missing from ANT. • ~2006 Bndtools project started.
  • 4. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Bnd, Bndtools & Maven • Maven overtook ANT in the wider industry. • Bndtools did not work well with Maven. • Both trying to manage build dependencies & own the build lifecycle.
  • 5. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Bnd, Bndtools & Maven • New Maven plugins in bnd since 3.2. • Integration with M2E build lifecycle. • Now even better in 3.5! • Bundles and indexes rebuilt on save.
  • 6. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Development Workflow Component Development Bundle Unit Testing Bundle Repository Integration Testing Code-Test Application Assembly Application Artifact consum e Deployment
  • 7. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Project Structure _distro _index Component Bundles _assembly Test Bundles
  • 8. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Effective OSGi Archetypes • Maven archetypes for easy project creation. • Generates an application that runs out-of-the-box. • Also archetypes for new bundle modules and integration test modules. • https://github.com/effectiveosgi/maven-archetypes e
  • 9. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Preview • We are building a simple “Points of Interest” web application. • See what it will look like by running ‘java -jar preview.jar’ and navigating to http://localhost:8080/index.html
  • 10. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Get It github.com/paremus/osgi-community-event2017/releases bit.ly/osgice2017tut
  • 11. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Exercise Help • These slides have the key new content but not everything. • New files introduced in each lab are under tutorial/NN_ • E.g.: 01_command_bundle/HelloCommand.java • Have to put in the right place! • If you get really stuck, use the checkpoint zips. • E.g. 03_tester_bundle.checkpoint.zip contains everything up to and including the tester bundle exercise. • Refer to current checkpoint number in top-right of slide.
  • 12. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Install Archetypes
  • 13. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Install Effective OSGi Archetypes • Not yet available on Maven Central, so… • Open folder archetypes • Run install.sh or install.bat • Uses ‘mvn install:install-file’ to copy into local Maven repo.
  • 14. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Project Initiation
  • 15. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Initial Project mvn archetype:generate -DarchetypeGroupId=com.effectiveosgi -DarchetypeVersion=0.0.1-SNAPSHOT -DarchetypeArtifactId=eosgi-project-archetype Group ID: org.example.bnd-maven Artifact ID: example-parent Version, Package: <use defaults> Checkpoint: 00
  • 16. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Initial Project • Includes a skeleton OSGi application that can be run immediately. • Open _assembly/application.bndrun and click Run. • Or: • mvn package • java -jar _assembly/target/application.jar • You should be in the Gogo shell. Ctrl-D to exit. Checkpoint: 00
  • 17. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Command Bundle
  • 18. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Generate Module mvn archetype:generate -DarchetypeGroupId=com.effectiveosgi -DarchetypeVersion=0.0.1-SNAPSHOT -DarchetypeArtifactId=eosgi-module-archetype Group ID: org.example.bnd-maven Artifact ID: org.example.command Version, Package: <use defaults> Checkpoint: 01
  • 19. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Command Bundle Code • Rename Example.java to HelloCommand.java package org.example.command; import java.text.MessageFormat; import org.osgi.service.component.annotations.*; @Component( service = Object.class, property = { "osgi.command.scope=greeting", "osgi.command.function=sayHello" }) public class HelloCommand { public String sayHello() { return sayHello("anonymous user"); } public String sayHello(String name) { return MessageFormat.format("Hello, {0}", name); } } Checkpoint: 01
  • 20. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Command Bundle Code • Rename ExampleTest.java to HelloCommandTest.java package org.example.command; import static org.junit.Assert.*; import org.junit.Test; public class HelloCommandTest { @Test public void test() { HelloCommand cmd = new HelloCommand(); assertEquals("Hello, Donald", cmd.sayHello("Donald")); } } Checkpoint: 01
  • 21. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Command Bundle Testing • Open launch.bndrun • Check that the Resolve button works. • Click Run OSGi. • Try the command ‘sayHello <name>’ • Unit Testing: right-click src/test/java and Run As > JUnit Test. Checkpoint: 01
  • 22. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Command Bundle Indexing • Include org.example.command in the main index. • This makes your new bundle available for application assembly. • _index/pom.xml: <dependency> <groupId>${project.groupId}</groupId> <artifactId>org.example.command</artifactId> <version>${project.version}</version> </dependency> Checkpoint: 01
  • 23. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 P.o.I. (Points-of-
 Interest) Bundle
  • 24. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Generate Module mvn archetype:generate -DarchetypeGroupId=com.effectiveosgi -DarchetypeVersion=0.0.1-SNAPSHOT -DarchetypeArtifactId=eosgi-module-archetype Group ID: org.example.bnd-maven Artifact ID: org.example.poi Version, Package: <use defaults> Checkpoint: 02
  • 25. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 POI Bundle API • Create package org.example.poi with package-info.java: • Add PointsOfInterest.java: @org.osgi.annotation.versioning.Version("1.0.0") package org.example.poi; package org.example.poi; import java.util.List; public interface PointsOfInterest { static final class POI { public float latitude; public float longitude; public String label; @Override public String toString() { return String.format("POI '%s':lat=%f;long=%f", label, latitude, longitude); } } List<POI> find(String search) throws Exception; } Checkpoint: 02
  • 26. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 POI Bundle Implementation • Create package org.example.poi.impl and POIComponent.java @Component public class POIComponent implements PointsOfInterest { private final List<POI> pois = new ArrayList<>(); @Activate void activate() throws Exception { InputStream resource = getClass().getResourceAsStream("/data.csv"); if (resource == null) throw new IllegalStateException("Missing data resource"); try (BufferedReader reader = new BufferedReader(new InputStreamReader(resource))) { reader.lines() .map(s -> s.split(",", 3)) .map(ss -> { if (ss.length != 3) throw new IllegalArgumentException("Not enough fields: " + Arrays.toString(ss)); POI poi = new POI(); poi.latitude = Float.parseFloat(ss[0]); poi.longitude = Float.parseFloat(ss[1]); poi.label = ss[2]; return poi; }).forEach(pois::add); } } @Override public List<POI> find(String search) throws Exception { Pattern pattern = Pattern.compile(search.toLowerCase().replaceAll("*", ".*")); return pois.stream() .filter(poi -> pattern.matcher(poi.label.toLowerCase()).find()) .collect(Collectors.toList()); } } Checkpoint: 02
  • 27. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 POI Bundle Data • Copy data.csv to src/main/resources 48.8927,9.1950,OSGi Community Event 48.78816,9.23413,Mercedes-Benz Museum 48.89168,9.18617,Ludwigsburg S-Bahn 48.90448,9.19571,Favoriteschloss Checkpoint: 02
  • 28. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 POI Bundle Unit Test • Under src/test/java, package org.example.poi.impl, create POIComponentTest.java: • Right-click src/test/java, Run As > JUnit Test public class POIComponentTest { @Test public void test() throws Exception { // This doesn't really test the component, it only shows the component is testable in plain JUnit POIComponent component = new POIComponent(); component.activate(); List<POI> pois = component.find("*"); assertNotNull(pois); } } Checkpoint: 02
  • 29. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 POI Bundle Indexing • Include org.example.poi in the main index: <dependency> <groupId>${project.groupId}</groupId> <artifactId>org.example.poi</artifactId> <version>${project.version}</version> </dependency> Checkpoint: 02
  • 30. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Tester Bundle
  • 31. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Generate Module mvn archetype:generate -DarchetypeGroupId=com.effectiveosgi -DarchetypeVersion=0.0.1-SNAPSHOT -DarchetypeArtifactId=eosgi-test-module-archetype Group ID: org.example.bnd-maven Artifact ID: org.example.poi.test Version, Package: <use defaults> Checkpoint: 03
  • 32. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 POI Test Depends on POI • Add dependency to pom.xml: <dependency> <groupId>${project.groupId}</groupId> <artifactId>org.example.poi</artifactId> <version>${project.version}</version> </dependency> Checkpoint: 03
  • 33. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 POI Test Class • Create POIBundleTest in org.example.poi.test: public class POIBundleTest { private final BundleContext context = FrameworkUtil.getBundle(POIBundleTest.class).getBundleContext(); private ServiceTracker<PointsOfInterest, PointsOfInterest> poiTracker; @Before public void before() { poiTracker = new ServiceTracker<>(context, PointsOfInterest.class, null); poiTracker.open(true); } @After public void after() { poiTracker.close(); } @Test public void testExample() throws Exception { PointsOfInterest pois = poiTracker.waitForService(1000); assertNotNull("POI service not found", pois); assertNotNull("POI search returned null", pois.find("*")); } } Checkpoint: 03
  • 34. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 POI Integration Test • Resolve org.example.poi.test.bndrun • Right-click, Run As > Bnd OSGi Test Launcher (JUnit) • Try automated build: ‘mvn verify’ Checkpoint: 03
  • 35. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 POI Test Bundle Indexing? • DO NOT include org.example.poi in the main index: • Why…? <dependency> <groupId>${project.groupId}</groupId> <artifactId>org.example.poi.test</artifactId> <version>${project.version}</version> </dependency> Checkpoint: 03
  • 36. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Web Bundle
  • 37. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Web Bundle • Our most complex bundle yet. • Three stages: • 1. Build the web app front-end with non-functional back-end. • 2. Connect to the POI back end. • 3. Add Jackson to serialize data from the back-end.
  • 38. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Generate Module mvn archetype:generate -DarchetypeGroupId=com.effectiveosgi -DarchetypeVersion=0.0.1-SNAPSHOT -DarchetypeArtifactId=eosgi-module-archetype Group ID: org.example.bnd-maven Artifact ID: org.example.web Version, Package: <use defaults> Checkpoint: 04
  • 39. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Web Bundle Dependencies • Need to depend on the Servlet API: <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.http.servlet-api</artifactId> <version>1.1.2</version> </dependency> Checkpoint: 04
  • 40. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Servlet Component • Rename Example.java to POIServlet.java: @Component( property = { HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PATTERN + "=/*", HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PREFIX + "=/static", HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN + "=/servlet" }) public class POIServlet extends HttpServlet implements Servlet { private static final long serialVersionUID = 1L; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String query = req.getQueryString(); if (query == null || query.trim().isEmpty()) query = ""; try (OutputStream out = resp.getOutputStream()) { // TODO: delete code below, replace with code to search for POIs and serialize as JSON to the browser new PrintStream(out).println("[]"); // empty JSON array } catch (Exception e) { resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage()); } } } Checkpoint: 04
  • 41. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Static Web Resources • Copy whole ‘static’ folder to src/main/resources. • Standard web structure: HTML, CSS and JS. Checkpoint: 04
  • 42. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Declare Web Engine Requirement • Create bnd.bnd and switch to Source tab. Add: • Declares that our bundle requires a Web Engine at runtime. • Enables the Resolver to fully assemble the application. • Yes the syntax is nasty. Java source annotations coming in OSGi R7! Require-Capability: osgi.implementation; filter:="(&(osgi.implementation=osgi.http)(version>=1)(!(version>=2)))" Checkpoint: 04
  • 43. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Run Simple Web App • Resolve and run launch.bndrun • Navigate to http://localhost:8080/index.html • Note the POI search doesn’t work yet! Checkpoint: 04
  • 44. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Connect Web Bundle to POI Service • Make org.example.web depend on org.example.poi: • Add reference from POIServlet to PointsOfInterest service: <dependency> <groupId>${project.groupId}</groupId> <artifactId>org.example.poi</artifactId> <version>${project.version}</version> </dependency> // ... @Reference PointsOfInterest poiSvc; // ... Checkpoint: 05
  • 45. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Serialize with Jackson • Make org.example.web depend on Jackson Databind: • Use ObjectMapper to serialize result of poiSvc.find(): <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.9.1</version> </dependency> // ... private ObjectMapper mapper = new ObjectMapper(); // ... try (OutputStream out = resp.getOutputStream()) { List<POI> pois = poiSvc.find(query); mapper.writeValue(out, pois); } catch (Exception e) { resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, e.getMessage()); } // ... Checkpoint: 06
  • 46. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Run Simple Web App • Resolve and run launch.bndrun • Navigate to http://localhost:8080/index.html • The POI search should now work (try inputting ‘*’). Checkpoint: 06
  • 47. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Assembly
  • 48. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Application Assembly • _index generates an OSGi repository XML index. • Format specified in OSGi Compendium R5+, Section 132.5 • Can be used by many OSGi-oriented tools and platforms. • _assembly generates standalone applications • Based on a bndrun file. • Run exactly the application in production that was tested in dev.
  • 49. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Indexing • The bnd-indexer-maven-plugin indexes all transitive dependencies of the module to which it is attached. • … in either compile and runtime scope. • It must depend on all non-test project modules. • Many Maven users build their application directly this way. • For us, the index is just the set of potentially useful bundles. • The OSGi Resolver uses this to assemble only exactly what we need and nothing more.
  • 50. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Assembly • The _assembly module depends on _index and defines one or more launch definitions. • An application is defined in terms of top-level requirements. • Resolves against index to find all the “boring” dependencies.
  • 51. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Assembly • The bnd-export-maven-plugin generates a standalone application JAR file (just add Java). • Resolve in the IDE or command line to review & tweak contents. • Automated build also checks resolution & fails build if different. • Very useful to prevent dependency creep!
  • 52. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Catching Dependency Creep TODO • Start using external library from our bundle… • Example: add SLF4j to org.example.command • pom.xml: • Example.java: • “mvn package”… fails due to undeclared dependency (which is good)! <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.7.25</version> </dependency> import org.slf4j.*; @Component public class HelloCommand { Logger logger = LoggerFactory.getLogger(Example.class); // ... }
  • 53. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Shepherding Dependencies • Compile Scope: try to depend only on APIs, e.g. Servlet API, SLF4j… • Runtime Scope: depend on supporting implementations, e.g. Logback, Felix Jetty… • _distro for widely used 3rd party runtime bundles, e.g.: • SCR, Config Admin, Gogo, Event Admin… • Make proper use of Provided Scope for dependencies that should never be installed as bundles, e.g. OSGi Core/Compendium • Some 3rd party bundles have not done this correctly. You will need to use Maven exclusions :-(
  • 54. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Multiple Versions • OSGi can support multiple versions at runtime. Great! • Classic example: my app needs Guava N and Guava N+1. • Maven will not allow any module to depend on two versions of the same artifact. • Therefore: cannot generate a single index with both Guavas. • Solution is multiple indexes. • A bndrun file can reference arbitrarily many indexes.
  • 55. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Continuous
 Integration
  • 56. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Indexing & Resource URLs • Taking a look at the index you might notice a problem: • This is good for local dev… don’t need a Nexus/Artifactory. • But this index is not consumable outside my computer. • Need to control the policy w.r.t. resource locations. <capability namespace="osgi.content"> <attribute name="size" value="7063" type="Long"/> <attribute name="url" value=“file:/Users/nbartlett/…/org.example.poi/target/org.example.poi-1.0-SNAPSHOT.jar”/> <attribute name="mime" value="application/vnd.osgi.bundle"/> <attribute name="osgi.content" value="901CD7D625C58F6C138244620776317AC0666139F79246D22AFF4CD1C4FA3456"/> </capability>
  • 57. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Local Index Policy • This config is in the parent POM: • FORBIDDEN means the resource must have a real URL, or build fails… perfect for CI build. • Configure CI job to set the CI_Build profile. <!-- Declare a profile for CI builds, where indexes are not permitted to contain local file: URLs. --> <profiles> <profile> <id>CI_Build</id> <properties> <local.index.policy>FORBIDDEN</local.index.policy> </properties> </profile> </profiles>
  • 58. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Review
  • 59. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Maven Plugins Used • bnd-maven-plugin: Basically builds bundles! • bnd-indexer-maven-plugin: Generates OSGi repo index. • bnd-testing-maven-plugin: Executes tests in OSGi Framework. • bnd-export-maven-plugin: Generates standalone applications.
  • 60. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Maven Plugins NOT Used • bnd-resolver-maven-plugin: Resolves bndruns. • Intended for manual command-line usage: • ‘mvn bnd-resolver:resolve’ • Usually easier to resolve in Bndtools • bnd-baseline-maven-plugin: Validates semantic versions • Requires comparison against a release version in a repo. • Left as an exercise
  • 61. Copyright © 2017 Paremus Ltd. May not be reproduced by any means without express permission. All rights reserved. October 2017 Thank You! Sources: github.com/paremus/osgi-community-event2017 Email: neil.bartlett@paremus.com Twitter: @nbartlett