Skip to content

Commit

Permalink
added beans.xml to other inverter projects
Browse files Browse the repository at this point in the history
  • Loading branch information
ai-republic committed Jan 18, 2024
1 parent d43e339 commit bb56b8e
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public void init() {
final PortType portType = getClass().getAnnotation(PortType.class);

if (portType == null) {
LOG.error(PortType.class.getName() + " Annotation is missing on PortProcessor " + getClass().getCanonicalName());
throw new IllegalArgumentException(PortType.class.getName() + " Annotation is missing on PortProcessor " + getClass().getCanonicalName());
LOG.error(PortType.class.getName() + " Annotation is missing on Inverter " + getClass().getCanonicalName());
throw new IllegalArgumentException(PortType.class.getName() + " Annotation is missing on Inverter " + getClass().getCanonicalName());
}

// from the protocol get the service class to use
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import jakarta.inject.Qualifier;

Expand All @@ -13,5 +15,6 @@
@Qualifier
@Retention(RUNTIME)
@Documented
@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE })
public @interface CAN {
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import jakarta.inject.Qualifier;

Expand All @@ -13,6 +15,7 @@
@Qualifier
@Retention(RUNTIME)
@Documented
@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE })
public @interface ModBus {

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import jakarta.inject.Qualifier;

Expand All @@ -13,6 +15,7 @@
@Qualifier
@Retention(RUNTIME)
@Documented
@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE })
public @interface RS485 {

}
7 changes: 7 additions & 0 deletions inverter-growatt-can/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,17 @@
</properties>

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

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

</dependencies>
</project>
4 changes: 4 additions & 0 deletions inverter-growatt-can/src/main/resources/META-INF/beans.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd"
bean-discovery-mode="all" version="4.0">
</beans>
6 changes: 6 additions & 0 deletions inverter-growatt-rs485/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@


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

<dependency>
<groupId>com.ai-republic.bms-to-inverter</groupId>
<artifactId>protocol-modbus</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions inverter-growatt-rs485/src/main/resources/META-INF/beans.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd"
bean-discovery-mode="all" version="4.0">
</beans>
6 changes: 6 additions & 0 deletions inverter-solark-can/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@
</properties>

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

<dependency>
<groupId>com.ai-republic.bms-to-inverter</groupId>
<artifactId>protocol-can</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions inverter-solark-can/src/main/resources/META-INF/beans.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd"
bean-discovery-mode="all" version="4.0">
</beans>

0 comments on commit bb56b8e

Please sign in to comment.