This project contains some common java code that can be used by the components. It is formed by the next modules:
- common-bom Bill of materials of the project. This contains all the modules of the project.
- common-test Project with the utilities and dependencies to do tests.
- common-model Basic classes used to define data models.
- common-vertx Utility classes to define microservices to provide the component web services.
- common-components The HTTP clients to request the platform components.
- common-protocols Define some protocols that describe the user interactions on the pilot tasks.
- common-dummy Dummy implementations to test the modules.
You will need to add the below to your pom.xml file.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
...
<properties>
...
<eu.internetofus.common-version>1.0.0</eu.internetofus.common-version>
...
</properties>
<repositories>
...
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/InternetOfUs/common-models-java</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
...
</repositories>
...
<dependencyManagement>
<dependencies>
...
<dependency>
<groupId>eu.internetofus</groupId>
<artifactId>common-bom</artifactId>
<version>${eu.internetofus.common-version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
...
</dependencies>
</dependencyManagement>
...
</project>
First of all, you must install docker. After that, you can start a development environment with the script startDevelopmentEnvironment.sh. It creates a docker image with the software to compile and test the project.
This project uses the Apache maven to solve the dependencies, compile and run the test.
- Use
mvn compileto compile and generate the Open API documentation (target/classes/wenet-profile_manager-openapi.yml). - Use
mvn testto run the test. Exist some Integration test that requires around 10 minutes, so if you want to ignore them execute them withmvn -Ddisable.large.unit.tests=true test. - Use
mvnd testto run the test on debug mode. - Use
mvn siteto generate a HTML page (target/site/index.html) with all the reports (test, javadoc, PMD,CPD and coverage).
When you finish you can exit the bash or stop the started docker container with the script stopDevelopmentEnvironment.sh.
This project is automatically deployed every time you create a tag on the repository.
If you want you can manually deploy with the command mvn deploy,
but before you must set the deploy token into the maven settings. The next steps
explain how to do it.
- Go to Github tokens
- Generate new token, with the privilege write:packages.
- In your host create the file if not exist $HOME/.m2/settings.xml.
- And add the next lines to it, replacing SECRET_TOKEN by the generated token and GITHUB_USER_ID with your github identifier.
<settings>
<servers>
<server>
<id>github</id>
<username>GITHUB_USER_ID</username>
<password>SECRET_TOKEN</password>
</server>
</servers>
</settings>This software is under the Apache V2 license
- Nardine Osman ( IIIA-CSIC ) nardine (at) iiia.csic.es
- Carles Sierra ( IIIA-CSIC ) sierra (at) iiia.csic.es
- Joan Jené ( UDT-IA, IIIA-CSIC ) jjene (at) iiia.csic.es
- Bruno Rosell i Gui ( UDT-IA, IIIA-CSIC ) rosell (at) iiia.csic.es