Skip to content

Commit

Permalink
added pom templates
Browse files Browse the repository at this point in the history
  • Loading branch information
ai-republic committed Aug 11, 2024
1 parent 42c7d68 commit 0d8d2d6
Show file tree
Hide file tree
Showing 2 changed files with 205 additions and 0 deletions.
115 changes: 115 additions & 0 deletions configurator/src/main/resources/pom-templates/main-pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>bms-to-inverter-main</artifactId>

<parent>
<groupId>com.ai-republic.bms-to-inverter</groupId>
<artifactId>bms-to-inverter-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>

<name>${project.artifactId}-${project.version}</name>
<description>Application to communicate between a BMS and inverter</description>

<properties>
<encoding>UTF-8</encoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<build>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>
com.airepublic.bmstoinverter.BmsToInverter</mainClass>
</manifest>
</archive>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>


<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<finalName>bms-to-inverter</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<id>create-distribution</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>assembly/zip.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>


<dependencies>
<dependency>
<groupId>org.jboss.weld.se</groupId>
<artifactId>weld-se-shaded</artifactId>
<version>5.1.1.Final</version>
</dependency>

<dependency>
<groupId>com.ai-republic.email</groupId>
<artifactId>email-api</artifactId>
<version>1.0.5</version>
</dependency>

<dependency>
<groupId>com.ai-republic.bms-to-inverter</groupId>
<artifactId>configurator</artifactId>
<version>${project.version}</version>
</dependency>


<!-- #################### !!!!!!!! BMSes !!!!!!!! ###################### -->
{0}

<!-- #################### !!!!!!!! Inverter !!!!!!!! #################### -->
{1}

<!-- #################### !!!!!!!! Optional services !!!!!!!! ###################### -->
{2}
</dependencies>
</project>
90 changes: 90 additions & 0 deletions configurator/src/main/resources/pom-templates/parent-pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.ai-republic.bms-to-inverter</groupId>
<artifactId>bms-to-inverter-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>

<properties>
<encoding>UTF-8</encoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
</properties>

<modules>
<module>core-api</module>
<module>protocol-rs485</module>
<module>protocol-can</module>
<module>protocol-modbus</module>
<!-- Protocols -->
{0}
<!-- BMSes -->
{1}
<!-- Inverter -->
{2}
<module>bms-to-inverter-main</module>
<!-- Optional services -->
{3}
<module>configurator</module>
</modules>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<release>17</release>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.7</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
<version>2.20.0</version>
</dependency>

<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<version>4.0.1</version>
</dependency>


<!-- TEST FRAMEWORKS -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.9.3</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.10.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.10.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

0 comments on commit 0d8d2d6

Please sign in to comment.