What you will learn to do
Learn setting up Maven including access to the Bosch Software Innovations maven repository to access artifacts needed for dependency resolution when building Java-based IoT Web Applications using Bosch IoT Suite client libraries or SDKs.
For Java development, there is a lot of open source to reuse. By using the build tools like Maven or Gradle, half the job of taking care of downloading dependencies and managing versions of libraries is taken care of by the tooling. The Bosch IoT Suite team is providing client libraries and examples as Maven dependencies which will help you to quick-start the development of IoT applications.
If you want to learn about Maven in general, we recommend to first have a look at the Maven in 5 Minutes guide.
What you need to do
You will have to
- Install Maven
- Adapt the configuration
- Verify everything works
Adapt the configuration
Maven has a settings file which lists the URLs of the external Maven repositories from which dependencies are downloaded. The default settings.xml is located in the Maven conf/ folder beneath the installation folder. You may want to copy that settings.xml file to your user home into ‘~/.m2/’ to customize it. The settings.xml in your user home will take precedence.
For the resolution of the Bosch IoT Suite libraries, you need to add a new repository. It is recommended to do this by adding a new profile, so that you can easy switch between using and not using repository.
The URL for the Bosch IoT Suite repository is
To add this, open the settings.xml and scroll down to the part.
<profile> <id>Bosch-IoT-Suite</id> <properties> <downloadSources>true</downloadSources> <downloadJavadocs>true</downloadJavadocs> </properties> <repositories> <repository> <id>bosch-releases</id> <url>https://maven.bosch-si.com/content/groups/bosch-releases/</url> </repository> </repositories> </profile>
You also need to activate the profile before Maven is using it. To automatically activate the profile for all builds, add it to the ‘activeProfiles’ list:
<activeProfiles> <activeProfile>Bosch-IoT-Suite</activeProfile> </activeProfiles>
You should see a success message at the end of the build.