Skip to content

Commit 83ed4bd

Browse files
committed
Moved deprecated Serice annotations to the spiap-legacy-api module
1 parent 494f11a commit 83ed4bd

File tree

9 files changed

+53
-7
lines changed

9 files changed

+53
-7
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ To create multiple service locators in the same package use @SpiServiceLocators:
9090
## How to register a service implementation
9191
Just add a Service annotation to your service implementation:
9292

93-
@Service(value = ExampleSpiInterface.class, id = "YOUR_OPTIONAL_SERVICE_ID", description = "OPTIONAL DESCRIPTION", priority = 0)
93+
@SpiService(value = ExampleSpiInterface.class, id = "YOUR_OPTIONAL_SERVICE_ID", description = "OPTIONAL DESCRIPTION", priority = 0)
9494
public class ExampleSpiService implements ExampleSpiInterface {
9595
@Override
9696
public String doSomething() {
@@ -107,9 +107,9 @@ All other annotation attributes are optional.
107107

108108
It's also possible to implement more than one SPI in a class by using the Services annotation:
109109

110-
@Services({
111-
@Service(value = ExampleSpiInterface1.class, id = "YOUR_OPTIONAL_SERVICE_ID", description = "OPTIONAL DESCRIPTION", priority = 0),
112-
@Service(value = ExampleSpiInterface2.class)
110+
@SpiServices({
111+
@SpiService(value = ExampleSpiInterface1.class, id = "YOUR_OPTIONAL_SERVICE_ID", description = "OPTIONAL DESCRIPTION", priority = 0),
112+
@SpiService(value = ExampleSpiInterface2.class)
113113
})
114114
public class ExampleSpiService implements ExampleSpiInterface1, ExampeSpiInterface2 {
115115
@Override

example/api/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<dependency>
2020
<groupId>io.toolisticon.spiap</groupId>
21-
<artifactId>spiap-api</artifactId>
21+
<artifactId>spiap-legacy-api</artifactId>
2222
<scope>provided</scope>
2323
</dependency>
2424

example/service/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<dependency>
1919
<groupId>io.toolisticon.spiap</groupId>
20-
<artifactId>spiap-api</artifactId>
20+
<artifactId>spiap-legacy-api</artifactId>
2121
</dependency>
2222

2323
<dependency>

legacyApi/pom.xml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<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">
2+
<modelVersion>4.0.0</modelVersion>
3+
4+
<artifactId>spiap-legacy-api</artifactId>
5+
<packaging>jar</packaging>
6+
7+
<parent>
8+
<groupId>io.toolisticon.spiap</groupId>
9+
<artifactId>spiap-parent</artifactId>
10+
<version>0.9.1-alias_for_annotations-SNAPSHOT</version>
11+
</parent>
12+
13+
<name>spiap-legacy-api</name>
14+
15+
<build>
16+
17+
<plugins>
18+
<plugin>
19+
<artifactId>maven-compiler-plugin</artifactId>
20+
</plugin>
21+
</plugins>
22+
23+
</build>
24+
25+
<dependencies>
26+
<dependency>
27+
<groupId>io.toolisticon.spiap</groupId>
28+
<artifactId>spiap-api</artifactId>
29+
</dependency>
30+
31+
</dependencies>
32+
33+
34+
</project>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**
2+
* This package contains all annotations defined by the spiap project. (including the legacy annotations)
3+
*/
4+
package io.toolisticon.spiap.api;

pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
<!-- modules -->
1717
<module>api</module>
18+
<module>legacyApi</module>
1819
<module>processor</module>
1920
<module>example</module>
2021

@@ -372,6 +373,12 @@
372373
<version>${project.version}</version>
373374
</dependency>
374375

376+
<dependency>
377+
<groupId>io.toolisticon.spiap</groupId>
378+
<artifactId>spiap-legacy-api</artifactId>
379+
<version>${project.version}</version>
380+
</dependency>
381+
375382
<dependency>
376383
<groupId>io.toolisticon.spiap</groupId>
377384
<artifactId>spiap-processor</artifactId>

processor/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
<dependency>
2525
<groupId>io.toolisticon.spiap</groupId>
26-
<artifactId>spiap-api</artifactId>
26+
<artifactId>spiap-legacy-api</artifactId>
2727
</dependency>
2828

2929
<dependency>
@@ -65,6 +65,7 @@
6565
<artifactSet>
6666
<excludes>
6767
<exclude>io.toolisticon.spiap:spiap-api</exclude>
68+
<exclude>io.toolisticon.spiap:spiap-legacy-api</exclude>
6869
</excludes>
6970
</artifactSet>
7071

0 commit comments

Comments
 (0)