Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ISPN-10137 Replace component metadata files with generated classes
* Move component annotations to module component-annotations * Generate accessor classes with annotation processor * Deprecate ComponentMetadataRepo, replace with ModuleRepository * Delete component metadata persister * Require lifecycle with @InfinispanModule in each module * ModuleLifecycle is no longer a service * Require @scope for injection and lifecycle * Require @Mbean for managed attributes or operations * @scope and @Mbean are inherited (only from classes) * Require duplicate @SurvivesRestarts on subclasses * Annotated classes, fields, and methods must be package-private * Anonymous classes are not supported * Deprecate lifecycle method priorities * Test module can register components via global configuration
- Loading branch information
1 parent
846237e
commit ddfcc89
Showing
176 changed files
with
3,039 additions
and
1,271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
...terpreter/src/main/java/org/infinispan/cli/interpreter/InterpreterMetadataFileFinder.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
cli/cli-interpreter/src/main/java/org/infinispan/cli/interpreter/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/** | ||
* CLI interpreter engine | ||
*/ | ||
package org.infinispan.cli.interpreter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
client/hotrod-client/src/test/java/org/infinispan/client/hotrod/TestsModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package org.infinispan.client.hotrod; | ||
|
||
import org.infinispan.factories.annotations.InfinispanModule; | ||
|
||
/** | ||
* {@code InfinispanModule} annotation is required for component annotation processing | ||
*/ | ||
@InfinispanModule(name = "client-hotrod-tests") | ||
public class TestsModule implements org.infinispan.lifecycle.ModuleLifecycle { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<parent> | ||
<groupId>org.infinispan</groupId> | ||
<artifactId>infinispan-parent</artifactId> | ||
<version>10.0.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>infinispan-component-annotations</artifactId> | ||
<packaging>bundle</packaging> | ||
<name>Infinispan Component Annotations</name> | ||
<description>Annotations for Infinispan components and MBeans</description> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.kohsuke.metainf-services</groupId> | ||
<artifactId>metainf-services</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>${version.maven-compiler-plugin}</version> | ||
<configuration> | ||
<release>8</release> | ||
<encoding>UTF-8</encoding> | ||
<excludes> | ||
<exclude>**/package-info.java</exclude> | ||
</excludes> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.felix</groupId> | ||
<artifactId>maven-bundle-plugin</artifactId> | ||
<configuration> | ||
<instructions> | ||
<Export-Package> | ||
${project.groupId}.*;version=${project.version};-split-package:=error | ||
</Export-Package> | ||
<Import-Package> | ||
!sun.reflect, | ||
* | ||
</Import-Package> | ||
<Include-Resource> | ||
{maven-resources} | ||
</Include-Resource> | ||
<DynamicImport-Package>*</DynamicImport-Package> | ||
</instructions> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
File renamed without changes.
File renamed without changes.
28 changes: 28 additions & 0 deletions
28
...nent-annotations/src/main/java/org/infinispan/factories/annotations/InfinispanModule.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.infinispan.factories.annotations; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* Mechanism for specifying the name of modules. | ||
* | ||
* There must be exactly one {@code InfinispanModule} annotation in each module. | ||
* | ||
* <p>It would have been nice to put the annotation on a package, | ||
* but package-info.java source files are excluded from compilation | ||
* because of MCOMPILER-205.</p> | ||
* | ||
* @author Dan Berindei | ||
* @since 10.0 | ||
*/ | ||
@Target({ ElementType.TYPE }) | ||
@Retention(RetentionPolicy.CLASS) | ||
public @interface InfinispanModule { | ||
String name(); | ||
|
||
String[] requiredModules() default {}; | ||
|
||
String[] optionalModules() default {}; | ||
} |
Oops, something went wrong.