-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Investigating using manifest for offering 'extension methods'.
- Loading branch information
1 parent
623fcf5
commit 296149b
Showing
10 changed files
with
162 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?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"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.microsoft.aspire</groupId> | ||
<artifactId>aspire4j-extensions-manifest-ext</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<relativePath>../../pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>aspire4j-extensions-azure-storage-ext</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.microsoft.aspire</groupId> | ||
<artifactId>aspire4j-extensions-azure-storage</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
14 changes: 14 additions & 0 deletions
14
...sions/com/microsoft/aspire/DistributedApplication/AzureStorageDistributedApplication.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,14 @@ | ||
package azure.storage.manifest.extensions.com.microsoft.aspire.DistributedApplication; | ||
|
||
import com.microsoft.aspire.extensions.azure.storage.resources.AzureStorageResource; | ||
import manifold.ext.rt.api.Extension; | ||
import manifold.ext.rt.api.This; | ||
import com.microsoft.aspire.DistributedApplication; | ||
|
||
@Extension | ||
public class AzureStorageDistributedApplication { | ||
|
||
public static AzureStorageResource addAzureStorage(@This DistributedApplication app, String name) { | ||
return app.addResource(new AzureStorageResource(name)); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
aspire4j/extensions/manifest/azure/storage-ext/src/main/java/module-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,10 @@ | ||
|
||
/** | ||
* An Aspire extension providing support for Azure Storage. | ||
*/ | ||
module com.microsoft.aspire.extensions.manifest.azure.storage { | ||
requires transitive com.microsoft.aspire.extensions.azure.storage; | ||
requires manifold.ext.rt; | ||
|
||
exports azure.storage.manifest.extensions.com.microsoft.aspire.DistributedApplication; | ||
} |
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,54 @@ | ||
<?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"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.microsoft.aspire</groupId> | ||
<artifactId>aspire4j-sdk-parent</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>aspire4j-extensions-manifest-ext</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<packaging>pom</packaging> | ||
|
||
<properties> | ||
<manifold.version>2024.1.23</manifold.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>systems.manifold</groupId> | ||
<artifactId>manifold-ext-rt</artifactId> | ||
<version>${manifold.version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.13.0</version> | ||
<configuration> | ||
<source>21</source> | ||
<target>21</target> | ||
<encoding>UTF-8</encoding> | ||
<compilerArgs> | ||
<arg>-Xplugin:Manifold</arg> | ||
</compilerArgs> | ||
<annotationProcessorPaths> | ||
<path> | ||
<groupId>systems.manifold</groupId> | ||
<artifactId>manifold-ext</artifactId> | ||
<version>${manifold.version}</version> | ||
</path> | ||
</annotationProcessorPaths> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
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,24 @@ | ||
<?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"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.microsoft.aspire</groupId> | ||
<artifactId>aspire4j-extensions-manifest-ext</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>aspire4j-extensions-spring-ext</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.microsoft.aspire</groupId> | ||
<artifactId>aspire4j-extensions-spring</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
19 changes: 19 additions & 0 deletions
19
.../extensions/com/microsoft/aspire/DistributedApplication/SpringDistributedApplication.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,19 @@ | ||
package azure.storage.manifest.extensions.com.microsoft.aspire.DistributedApplication; | ||
|
||
import com.microsoft.aspire.extensions.microservice.common.resources.EurekaServiceDiscovery; | ||
import com.microsoft.aspire.extensions.spring.resources.SpringProject; | ||
import manifold.ext.rt.api.Extension; | ||
import manifold.ext.rt.api.This; | ||
import com.microsoft.aspire.DistributedApplication; | ||
|
||
@Extension | ||
public class SpringDistributedApplication { | ||
|
||
public static SpringProject addSpringProject(@This DistributedApplication app, String name) { | ||
return app.addResource(new SpringProject(name)); | ||
} | ||
|
||
public static EurekaServiceDiscovery addEurekaServiceDiscovery(@This DistributedApplication app, String name) { | ||
return app.addResource(new EurekaServiceDiscovery(name)); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
aspire4j/extensions/manifest/spring-ext/src/main/java/module-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,10 @@ | ||
|
||
/** | ||
* An Aspire extension providing support for <a href="https://spring.io">Spring</a> projects. | ||
*/ | ||
module com.microsoft.aspire.extensions.manifest.spring { | ||
requires transitive com.microsoft.aspire.extensions.spring; | ||
requires manifold.ext.rt; | ||
|
||
exports azure.storage.manifest.extensions.com.microsoft.aspire.DistributedApplication; | ||
} |
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