diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
new file mode 100644
index 0000000..f1ea9c3
--- /dev/null
+++ b/.github/workflows/build.yaml
@@ -0,0 +1,38 @@
+name: Build
+
+on:
+ push:
+ branches: [ main ]
+ pull_request:
+ branches: [ main ]
+ workflow_dispatch:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ - name: Set up JDK 21
+ uses: actions/setup-java@v2
+ with:
+ java-version: '21'
+ distribution: 'adopt'
+
+ - name: Cache Maven packages
+ uses: actions/cache@v2
+ with:
+ path: ~/.m2
+ key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ restore-keys: ${{ runner.os }}-m2
+
+ - name: Build with Maven
+ run: mvn -B package --file pom.xml
+
+ - name: Run Checkstyle
+ run: mvn checkstyle:check
+
+ - name: Run PMD
+ run: mvn pmd:pmd
\ No newline at end of file
diff --git a/aspire4j-extensions-azure-storage/pom.xml b/aspire4j/aspire4j-extensions-azure-storage/pom.xml
similarity index 70%
rename from aspire4j-extensions-azure-storage/pom.xml
rename to aspire4j/aspire4j-extensions-azure-storage/pom.xml
index 54c446a..767622f 100644
--- a/aspire4j-extensions-azure-storage/pom.xml
+++ b/aspire4j/aspire4j-extensions-azure-storage/pom.xml
@@ -4,16 +4,15 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- com.microsoft.aspire
+
+ com.microsoft.aspire
+ aspire4j-sdk-parent
+ 1.0-SNAPSHOT
+
+
aspire4j-extensions-azure-storage
1.0-SNAPSHOT
-
- 21
- 21
- UTF-8
-
-
com.microsoft.aspire
diff --git a/aspire4j-extensions-azure-storage/src/main/java/com/microsoft/aspire/extensions/azure/storage/AzureStorageBlobsResource.java b/aspire4j/aspire4j-extensions-azure-storage/src/main/java/com/microsoft/aspire/extensions/azure/storage/AzureStorageBlobsResource.java
similarity index 100%
rename from aspire4j-extensions-azure-storage/src/main/java/com/microsoft/aspire/extensions/azure/storage/AzureStorageBlobsResource.java
rename to aspire4j/aspire4j-extensions-azure-storage/src/main/java/com/microsoft/aspire/extensions/azure/storage/AzureStorageBlobsResource.java
diff --git a/aspire4j-extensions-azure-storage/src/main/java/com/microsoft/aspire/extensions/azure/storage/AzureStorageExtension.java b/aspire4j/aspire4j-extensions-azure-storage/src/main/java/com/microsoft/aspire/extensions/azure/storage/AzureStorageExtension.java
similarity index 100%
rename from aspire4j-extensions-azure-storage/src/main/java/com/microsoft/aspire/extensions/azure/storage/AzureStorageExtension.java
rename to aspire4j/aspire4j-extensions-azure-storage/src/main/java/com/microsoft/aspire/extensions/azure/storage/AzureStorageExtension.java
diff --git a/aspire4j-extensions-azure-storage/src/main/java/com/microsoft/aspire/extensions/azure/storage/AzureStorageResource.java b/aspire4j/aspire4j-extensions-azure-storage/src/main/java/com/microsoft/aspire/extensions/azure/storage/AzureStorageResource.java
similarity index 100%
rename from aspire4j-extensions-azure-storage/src/main/java/com/microsoft/aspire/extensions/azure/storage/AzureStorageResource.java
rename to aspire4j/aspire4j-extensions-azure-storage/src/main/java/com/microsoft/aspire/extensions/azure/storage/AzureStorageResource.java
diff --git a/aspire4j-extensions-azure-storage/src/main/java/module-info.java b/aspire4j/aspire4j-extensions-azure-storage/src/main/java/module-info.java
similarity index 100%
rename from aspire4j-extensions-azure-storage/src/main/java/module-info.java
rename to aspire4j/aspire4j-extensions-azure-storage/src/main/java/module-info.java
diff --git a/aspire4j-extensions-azure-storage/src/main/resources/com/microsoft/aspire/extensions/azure/storage/storage.module.bicep b/aspire4j/aspire4j-extensions-azure-storage/src/main/resources/com/microsoft/aspire/extensions/azure/storage/storage.module.bicep
similarity index 100%
rename from aspire4j-extensions-azure-storage/src/main/resources/com/microsoft/aspire/extensions/azure/storage/storage.module.bicep
rename to aspire4j/aspire4j-extensions-azure-storage/src/main/resources/com/microsoft/aspire/extensions/azure/storage/storage.module.bicep
diff --git a/aspire4j-extensions-azure/pom.xml b/aspire4j/aspire4j-extensions-azure/pom.xml
similarity index 76%
rename from aspire4j-extensions-azure/pom.xml
rename to aspire4j/aspire4j-extensions-azure/pom.xml
index 2036efa..b97c0e4 100644
--- a/aspire4j-extensions-azure/pom.xml
+++ b/aspire4j/aspire4j-extensions-azure/pom.xml
@@ -4,17 +4,16 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- com.microsoft.aspire
+
+ com.microsoft.aspire
+ aspire4j-sdk-parent
+ 1.0-SNAPSHOT
+
+
aspire4j-extensions-azure
1.0-SNAPSHOT
pom
-
- 21
- 21
- UTF-8
-
-
com.microsoft.aspire
diff --git a/aspire4j-extensions-spring/pom.xml b/aspire4j/aspire4j-extensions-spring/pom.xml
similarity index 76%
rename from aspire4j-extensions-spring/pom.xml
rename to aspire4j/aspire4j-extensions-spring/pom.xml
index 3969c97..619466d 100644
--- a/aspire4j-extensions-spring/pom.xml
+++ b/aspire4j/aspire4j-extensions-spring/pom.xml
@@ -4,16 +4,15 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- com.microsoft.aspire
+
+ com.microsoft.aspire
+ aspire4j-sdk-parent
+ 1.0-SNAPSHOT
+
+
aspire4j-extensions-spring
1.0-SNAPSHOT
-
- 21
- 21
- UTF-8
-
-
com.microsoft.aspire
diff --git a/aspire4j-extensions-spring/src/main/java/com/microsoft/aspire/extensions/spring/SpringExtension.java b/aspire4j/aspire4j-extensions-spring/src/main/java/com/microsoft/aspire/extensions/spring/SpringExtension.java
similarity index 100%
rename from aspire4j-extensions-spring/src/main/java/com/microsoft/aspire/extensions/spring/SpringExtension.java
rename to aspire4j/aspire4j-extensions-spring/src/main/java/com/microsoft/aspire/extensions/spring/SpringExtension.java
diff --git a/aspire4j-extensions-spring/src/main/java/com/microsoft/aspire/extensions/spring/SpringProject.java b/aspire4j/aspire4j-extensions-spring/src/main/java/com/microsoft/aspire/extensions/spring/SpringProject.java
similarity index 100%
rename from aspire4j-extensions-spring/src/main/java/com/microsoft/aspire/extensions/spring/SpringProject.java
rename to aspire4j/aspire4j-extensions-spring/src/main/java/com/microsoft/aspire/extensions/spring/SpringProject.java
diff --git a/aspire4j-extensions-spring/src/main/java/com/microsoft/aspire/extensions/spring/implementation/SpringDeploymentStrategy.java b/aspire4j/aspire4j-extensions-spring/src/main/java/com/microsoft/aspire/extensions/spring/implementation/SpringDeploymentStrategy.java
similarity index 100%
rename from aspire4j-extensions-spring/src/main/java/com/microsoft/aspire/extensions/spring/implementation/SpringDeploymentStrategy.java
rename to aspire4j/aspire4j-extensions-spring/src/main/java/com/microsoft/aspire/extensions/spring/implementation/SpringDeploymentStrategy.java
diff --git a/aspire4j-extensions-spring/src/main/java/com/microsoft/aspire/extensions/spring/implementation/SpringIntrospector.java b/aspire4j/aspire4j-extensions-spring/src/main/java/com/microsoft/aspire/extensions/spring/implementation/SpringIntrospector.java
similarity index 100%
rename from aspire4j-extensions-spring/src/main/java/com/microsoft/aspire/extensions/spring/implementation/SpringIntrospector.java
rename to aspire4j/aspire4j-extensions-spring/src/main/java/com/microsoft/aspire/extensions/spring/implementation/SpringIntrospector.java
diff --git a/aspire4j-extensions-spring/src/main/java/module-info.java b/aspire4j/aspire4j-extensions-spring/src/main/java/module-info.java
similarity index 100%
rename from aspire4j-extensions-spring/src/main/java/module-info.java
rename to aspire4j/aspire4j-extensions-spring/src/main/java/module-info.java
diff --git a/aspire4j-maven-archetype/pom.xml b/aspire4j/aspire4j-maven-tools/pom.xml
similarity index 73%
rename from aspire4j-maven-archetype/pom.xml
rename to aspire4j/aspire4j-maven-tools/pom.xml
index 47424b4..e084351 100644
--- a/aspire4j-maven-archetype/pom.xml
+++ b/aspire4j/aspire4j-maven-tools/pom.xml
@@ -4,16 +4,16 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- com.microsoft.aspire
+
+ com.microsoft.aspire
+ aspire4j-sdk-parent
+ 1.0-SNAPSHOT
+
+
aspire4j-maven-tools
1.0-SNAPSHOT
- Tools for creating Aspire projects
-
- 21
- 21
- UTF-8
3.13.1
diff --git a/aspire4j-maven-archetype/src/main/resources/META-INF/archetype-post-generate.groovy b/aspire4j/aspire4j-maven-tools/src/main/resources/META-INF/archetype-post-generate.groovy
similarity index 100%
rename from aspire4j-maven-archetype/src/main/resources/META-INF/archetype-post-generate.groovy
rename to aspire4j/aspire4j-maven-tools/src/main/resources/META-INF/archetype-post-generate.groovy
diff --git a/aspire4j-maven-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/aspire4j/aspire4j-maven-tools/src/main/resources/META-INF/maven/archetype-metadata.xml
similarity index 100%
rename from aspire4j-maven-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
rename to aspire4j/aspire4j-maven-tools/src/main/resources/META-INF/maven/archetype-metadata.xml
diff --git a/aspire4j-maven-archetype/src/main/resources/archetype-resources/pom.xml b/aspire4j/aspire4j-maven-tools/src/main/resources/archetype-resources/pom.xml
similarity index 100%
rename from aspire4j-maven-archetype/src/main/resources/archetype-resources/pom.xml
rename to aspire4j/aspire4j-maven-tools/src/main/resources/archetype-resources/pom.xml
diff --git a/aspire4j-maven-archetype/src/main/resources/archetype-resources/src/main/java/AspireAppHost.java b/aspire4j/aspire4j-maven-tools/src/main/resources/archetype-resources/src/main/java/AspireAppHost.java
similarity index 100%
rename from aspire4j-maven-archetype/src/main/resources/archetype-resources/src/main/java/AspireAppHost.java
rename to aspire4j/aspire4j-maven-tools/src/main/resources/archetype-resources/src/main/java/AspireAppHost.java
diff --git a/aspire4j-maven-archetype/src/main/resources/archetype-resources/src/main/java/module-info.java b/aspire4j/aspire4j-maven-tools/src/main/resources/archetype-resources/src/main/java/module-info.java
similarity index 100%
rename from aspire4j-maven-archetype/src/main/resources/archetype-resources/src/main/java/module-info.java
rename to aspire4j/aspire4j-maven-tools/src/main/resources/archetype-resources/src/main/java/module-info.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/AppHost.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/AppHost.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/AppHost.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/AppHost.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/AppHostBootstrap.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/AppHostBootstrap.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/AppHostBootstrap.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/AppHostBootstrap.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/AspireManifest.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/AspireManifest.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/AspireManifest.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/AspireManifest.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/DistributedApplication.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/DistributedApplication.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/DistributedApplication.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/DistributedApplication.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/DistributedApplicationHelper.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/DistributedApplicationHelper.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/DistributedApplicationHelper.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/DistributedApplicationHelper.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/Extension.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/Extension.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/Extension.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/Extension.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/ManifestGenerator.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/ManifestGenerator.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/ManifestGenerator.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/ManifestGenerator.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/implementation/json/RelativePath.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/implementation/json/RelativePath.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/implementation/json/RelativePath.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/implementation/json/RelativePath.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/implementation/json/RelativePathSerializer.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/implementation/json/RelativePathSerializer.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/implementation/json/RelativePathSerializer.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/implementation/json/RelativePathSerializer.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/resources/AzureBicepResource.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/AzureBicepResource.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/resources/AzureBicepResource.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/AzureBicepResource.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/resources/Container.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/Container.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/resources/Container.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/Container.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/resources/DockerFile.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/DockerFile.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/resources/DockerFile.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/DockerFile.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/resources/Executable.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/Executable.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/resources/Executable.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/Executable.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/resources/Project.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/Project.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/resources/Project.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/Project.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/resources/Resource.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/Resource.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/resources/Resource.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/Resource.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/resources/ResourceType.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/ResourceType.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/resources/ResourceType.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/ResourceType.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/resources/Value.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/Value.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/resources/Value.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/Value.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/resources/properties/BindMount.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/properties/BindMount.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/resources/properties/BindMount.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/properties/BindMount.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/resources/properties/Binding.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/properties/Binding.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/resources/properties/Binding.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/properties/Binding.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/resources/properties/EndpointReference.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/properties/EndpointReference.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/resources/properties/EndpointReference.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/properties/EndpointReference.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/resources/properties/Volume.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/properties/Volume.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/resources/properties/Volume.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/properties/Volume.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/IntrospectiveResource.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/IntrospectiveResource.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/resources/traits/IntrospectiveResource.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/IntrospectiveResource.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithArguments.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithArguments.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithArguments.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithArguments.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithBindings.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithBindings.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithBindings.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithBindings.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithConnectionString.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithConnectionString.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithConnectionString.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithConnectionString.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithEndpoints.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithEndpoints.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithEndpoints.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithEndpoints.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithEnvironment.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithEnvironment.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithEnvironment.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithEnvironment.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithParameters.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithParameters.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithParameters.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithParameters.java
diff --git a/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithReference.java b/aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithReference.java
similarity index 100%
rename from aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithReference.java
rename to aspire4j/aspire4j/src/main/java/com/microsoft/aspire/resources/traits/ResourceWithReference.java
diff --git a/aspire4j/src/main/java/module-info.java b/aspire4j/aspire4j/src/main/java/module-info.java
similarity index 100%
rename from aspire4j/src/main/java/module-info.java
rename to aspire4j/aspire4j/src/main/java/module-info.java
diff --git a/aspire4j/src/main/resources/logging.properties b/aspire4j/aspire4j/src/main/resources/logging.properties
similarity index 100%
rename from aspire4j/src/main/resources/logging.properties
rename to aspire4j/aspire4j/src/main/resources/logging.properties
diff --git a/aspire4j/pom.xml b/aspire4j/pom.xml
index 13bfb43..b263bd2 100644
--- a/aspire4j/pom.xml
+++ b/aspire4j/pom.xml
@@ -4,9 +4,15 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- com.microsoft.aspire
- aspire4j
+
+ com.microsoft.aspire
+ aspire4j-parent
+ 1.0-SNAPSHOT
+
+
+ aspire4j-sdk-parent
1.0-SNAPSHOT
+ pom
21
@@ -14,51 +20,13 @@
UTF-8
-
-
-
- com.fasterxml.jackson.core
- jackson-databind
- 2.17.1
-
+
+ aspire4j
+ aspire4j-maven-tools
-
-
- org.hibernate.validator
- hibernate-validator
- 8.0.1.Final
-
-
- org.glassfish.expressly
- expressly
- 5.0.0
-
-
+ aspire4j-extensions-azure
+ aspire4j-extensions-azure-storage
-
-
-
- org.apache.maven.plugins
- maven-jar-plugin
- 3.4.1
-
-
-
- true
- lib/
- com.microsoft.aspire.ManifestGenerator
-
-
-
-
-
- org.codehaus.mojo
- exec-maven-plugin
- 3.1.1
-
- com.microsoft.aspire.ManifestGenerator
-
-
-
-
+ aspire4j-extensions-spring
+
\ No newline at end of file
diff --git a/contributing.md b/contributing.md
new file mode 100644
index 0000000..df327fa
--- /dev/null
+++ b/contributing.md
@@ -0,0 +1,13 @@
+# Contributing
+
+Firstly - thanks for thinking about contributing!
+
+## Code Quality
+
+The build has three tools that are used to ensure code quality:
+
+1. [Checkstyle](https://checkstyle.org/) - this is used to ensure that the code adheres to a consistent style.
+2. [PMD](https://pmd.github.io/) - this is used to find common programming flaws.
+3. [SpotBugs](https://spotbugs.github.io/) - this is used to find common bugs in Java code.
+
+Before submitting a pull request, please ensure that the code passes all of these checks. You can run them locally by executing `mvn clean verify`.
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index a4d3e94..ee32bb8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,11 +17,57 @@
aspire4j
- aspire4j-extensions-azure-storage
- aspire4j-extensions-azure
- aspire4j-extensions-spring
- storage-explorer-apphost
- storage-explorer
- date-service
+ samples
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-checkstyle-plugin
+ 3.4.0
+
+ sun_checks.xml
+ false
+ false
+ false
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-pmd-plugin
+ 3.23.0
+
+
+ /rulesets/java/maven-pmd-plugin-default.xml
+ /category/java/bestpractices.xml
+
+
+
+
+
+
+ com.github.spotbugs
+ spotbugs-maven-plugin
+ 4.8.6.1
+
+ Max
+ Low
+
+
+
+
+
+
+
+
+ com.github.spotbugs
+ spotbugs-maven-plugin
+ 4.8.6.1
+
+
+
\ No newline at end of file
diff --git a/readme.md b/readme.md
index ef7c156..da19772 100644
--- a/readme.md
+++ b/readme.md
@@ -2,16 +2,16 @@
This is a proof of concept project, which introduces a minimal example of a Java implementation of the Aspire framework. It aims to provide a Java-idiomatic developer experience that mimics the concepts introduced by the Aspire framework for .net. In particular, it introduces the concept of the AppHost, allowing for Java developers to define infrastructure as code, whilst continuing to rely on the existing Java ecosystem frameworks such as Spring, Micronaut, and Quarkus.
-This GitHub repository is split into six sub-projects:
+This GitHub repository is split into many sub-projects, but they can be broadly categorised as follows:
-* `aspire4j`: The core library that provides the AppHost and the ability to define infrastructure as code.
-* `aspire4j-extensions-azure-storage`: An extension to the core library that provides the ability to configure Azure Storage resources.
-* `aspire4j-extensions-azure`: A wrapper project that developers could use to bring in all Azure extensions at once.
-* `storage-explorer`: A sample Spring application that is designed to work with Azure Services. It does not have any specific knowledge of the Aspire4J framework or how to deploy to Azure.
-* `date-service`: A simple Spring application that provides a date microservice. It is used by the `storage-explorer`.
-* `storage-explorer-apphost`: The infrastructure as code project that defines how the `storage-explorer` application, using the Aspire4J framework, should be deployed to Azure.
+* **Aspire4J**:
+ * `aspire4j`: The core library that provides the AppHost and the ability to define infrastructure as code.
+ * `aspire4j-extensions-*`: Extensions for the Aspire4J library, providing support for Azure, Spring, etc.
+ * `aspire4j-maven-archetype`: A Maven archetype that can be used to create new Aspire4J App Hosts.
+* **Sample Applications**:
+ * **Storage Explorer**: Refer to the [readme](tree/main/samples/storage-explorer/readme.md) for more information.
-In this way, the file of most interest is the [StorageExplorerAppHost file](https://github.com/JonathanGiles/aspire4j/blob/main/storage-explorer-apphost/src/main/java/com/microsoft/aspire/springsample/StorageExplorerAppHost.java), which defines the infrastructure as code.
+In this way, the file of most interest is the `StorageExplorerAppHost` file, which defines the infrastructure as code.
## Getting Started
diff --git a/samples/pom.xml b/samples/pom.xml
new file mode 100644
index 0000000..11c771c
--- /dev/null
+++ b/samples/pom.xml
@@ -0,0 +1,20 @@
+
+
+ 4.0.0
+
+
+ com.microsoft.aspire
+ aspire4j-parent
+ 1.0-SNAPSHOT
+
+
+ aspire4j-samples-parent
+ 1.0-SNAPSHOT
+ pom
+
+
+ storage-explorer
+
+
\ No newline at end of file
diff --git a/date-service/Dockerfile b/samples/storage-explorer/date-service/Dockerfile
similarity index 100%
rename from date-service/Dockerfile
rename to samples/storage-explorer/date-service/Dockerfile
diff --git a/date-service/compose.yaml b/samples/storage-explorer/date-service/compose.yaml
similarity index 100%
rename from date-service/compose.yaml
rename to samples/storage-explorer/date-service/compose.yaml
diff --git a/date-service/pom.xml b/samples/storage-explorer/date-service/pom.xml
similarity index 100%
rename from date-service/pom.xml
rename to samples/storage-explorer/date-service/pom.xml
diff --git a/date-service/src/main/java/com/microsoft/aspire/storage/explorer/DateServiceApplication.java b/samples/storage-explorer/date-service/src/main/java/com/microsoft/aspire/storageexplorer/DateServiceApplication.java
similarity index 86%
rename from date-service/src/main/java/com/microsoft/aspire/storage/explorer/DateServiceApplication.java
rename to samples/storage-explorer/date-service/src/main/java/com/microsoft/aspire/storageexplorer/DateServiceApplication.java
index ffe885c..98a7d69 100644
--- a/date-service/src/main/java/com/microsoft/aspire/storage/explorer/DateServiceApplication.java
+++ b/samples/storage-explorer/date-service/src/main/java/com/microsoft/aspire/storageexplorer/DateServiceApplication.java
@@ -1,4 +1,4 @@
-package com.microsoft.aspire.storage.explorer;
+package com.microsoft.aspire.storageexplorer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git a/date-service/src/main/java/com/microsoft/aspire/storage/explorer/DateServiceController.java b/samples/storage-explorer/date-service/src/main/java/com/microsoft/aspire/storageexplorer/DateServiceController.java
similarity index 95%
rename from date-service/src/main/java/com/microsoft/aspire/storage/explorer/DateServiceController.java
rename to samples/storage-explorer/date-service/src/main/java/com/microsoft/aspire/storageexplorer/DateServiceController.java
index 53d6ab6..070709b 100644
--- a/date-service/src/main/java/com/microsoft/aspire/storage/explorer/DateServiceController.java
+++ b/samples/storage-explorer/date-service/src/main/java/com/microsoft/aspire/storageexplorer/DateServiceController.java
@@ -1,4 +1,4 @@
-package com.microsoft.aspire.storage.explorer;
+package com.microsoft.aspire.storageexplorer;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
diff --git a/samples/storage-explorer/pom.xml b/samples/storage-explorer/pom.xml
new file mode 100644
index 0000000..7198d65
--- /dev/null
+++ b/samples/storage-explorer/pom.xml
@@ -0,0 +1,22 @@
+
+
+ 4.0.0
+
+
+ com.microsoft.aspire
+ aspire4j-samples-parent
+ 1.0-SNAPSHOT
+
+
+ aspire4j-sample-storage-explorer
+ 1.0-SNAPSHOT
+ pom
+
+
+ date-service
+ storage-explorer
+ storage-explorer-apphost
+
+
\ No newline at end of file
diff --git a/samples/storage-explorer/readme.md b/samples/storage-explorer/readme.md
new file mode 100644
index 0000000..0b247f8
--- /dev/null
+++ b/samples/storage-explorer/readme.md
@@ -0,0 +1,7 @@
+# Aspire4J Storage Explorer Sample
+
+This sample is split into the following three modules:
+
+* `storage-explorer`: A sample Spring application that is designed to work with Azure Services. It does not have any specific knowledge of the Aspire4J framework or how to deploy to Azure.
+* `date-service`: A simple Spring application that provides a date microservice. It is used by the `storage-explorer`.
+* `storage-explorer-apphost`: The infrastructure as code project that defines how the `storage-explorer` application, using the Aspire4J framework, should be deployed to Azure.
diff --git a/storage-explorer-apphost/pom.xml b/samples/storage-explorer/storage-explorer-apphost/pom.xml
similarity index 96%
rename from storage-explorer-apphost/pom.xml
rename to samples/storage-explorer/storage-explorer-apphost/pom.xml
index b91f08b..12660fb 100644
--- a/storage-explorer-apphost/pom.xml
+++ b/samples/storage-explorer/storage-explorer-apphost/pom.xml
@@ -12,7 +12,7 @@
21
21
UTF-8
- com.microsoft.aspire.springsample.StorageExplorerAppHost
+ com.microsoft.aspire.storageexplorer.StorageExplorerAppHost
true
diff --git a/storage-explorer-apphost/src/main/java/com/microsoft/aspire/springsample/StorageExplorerAppHost.java b/samples/storage-explorer/storage-explorer-apphost/src/main/java/com/microsoft/aspire/storageexplorer/StorageExplorerAppHost.java
similarity index 97%
rename from storage-explorer-apphost/src/main/java/com/microsoft/aspire/springsample/StorageExplorerAppHost.java
rename to samples/storage-explorer/storage-explorer-apphost/src/main/java/com/microsoft/aspire/storageexplorer/StorageExplorerAppHost.java
index 3fc3f42..eebe4c4 100644
--- a/storage-explorer-apphost/src/main/java/com/microsoft/aspire/springsample/StorageExplorerAppHost.java
+++ b/samples/storage-explorer/storage-explorer-apphost/src/main/java/com/microsoft/aspire/storageexplorer/StorageExplorerAppHost.java
@@ -1,4 +1,4 @@
-package com.microsoft.aspire.springsample;
+package com.microsoft.aspire.storageexplorer;
import com.microsoft.aspire.AppHost;
import com.microsoft.aspire.DistributedApplication;
diff --git a/storage-explorer-apphost/src/main/java/module-info.java b/samples/storage-explorer/storage-explorer-apphost/src/main/java/module-info.java
similarity index 100%
rename from storage-explorer-apphost/src/main/java/module-info.java
rename to samples/storage-explorer/storage-explorer-apphost/src/main/java/module-info.java
diff --git a/storage-explorer/.gitignore b/samples/storage-explorer/storage-explorer/.gitignore
similarity index 100%
rename from storage-explorer/.gitignore
rename to samples/storage-explorer/storage-explorer/.gitignore
diff --git a/storage-explorer/Dockerfile b/samples/storage-explorer/storage-explorer/Dockerfile
similarity index 100%
rename from storage-explorer/Dockerfile
rename to samples/storage-explorer/storage-explorer/Dockerfile
diff --git a/storage-explorer/compose.yaml b/samples/storage-explorer/storage-explorer/compose.yaml
similarity index 100%
rename from storage-explorer/compose.yaml
rename to samples/storage-explorer/storage-explorer/compose.yaml
diff --git a/storage-explorer/mvnw b/samples/storage-explorer/storage-explorer/mvnw
similarity index 100%
rename from storage-explorer/mvnw
rename to samples/storage-explorer/storage-explorer/mvnw
diff --git a/storage-explorer/mvnw.cmd b/samples/storage-explorer/storage-explorer/mvnw.cmd
similarity index 100%
rename from storage-explorer/mvnw.cmd
rename to samples/storage-explorer/storage-explorer/mvnw.cmd
diff --git a/storage-explorer/pom.xml b/samples/storage-explorer/storage-explorer/pom.xml
similarity index 100%
rename from storage-explorer/pom.xml
rename to samples/storage-explorer/storage-explorer/pom.xml
diff --git a/storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/StorageExplorerApplication.java b/samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/StorageExplorerApplication.java
similarity index 82%
rename from storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/StorageExplorerApplication.java
rename to samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/StorageExplorerApplication.java
index 76766c0..74f448b 100644
--- a/storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/StorageExplorerApplication.java
+++ b/samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/StorageExplorerApplication.java
@@ -1,6 +1,6 @@
-package com.microsoft.aspire.storage.explorer;
+package com.microsoft.aspire.storageexplorer;
-import com.microsoft.aspire.storage.explorer.service.StorageService;
+import com.microsoft.aspire.storageexplorer.service.StorageService;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
diff --git a/storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/StorageServiceController.java b/samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/StorageServiceController.java
similarity index 96%
rename from storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/StorageServiceController.java
rename to samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/StorageServiceController.java
index dba9ac0..bc1e106 100644
--- a/storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/StorageServiceController.java
+++ b/samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/StorageServiceController.java
@@ -1,7 +1,7 @@
-package com.microsoft.aspire.storage.explorer;
+package com.microsoft.aspire.storageexplorer;
-import com.microsoft.aspire.storage.explorer.service.StorageItem;
-import com.microsoft.aspire.storage.explorer.service.StorageService;
+import com.microsoft.aspire.storageexplorer.service.StorageItem;
+import com.microsoft.aspire.storageexplorer.service.StorageService;
import jakarta.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
diff --git a/storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/service/AzureBlobStorageService.java b/samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/service/AzureBlobStorageService.java
similarity index 98%
rename from storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/service/AzureBlobStorageService.java
rename to samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/service/AzureBlobStorageService.java
index b066289..bc1e516 100644
--- a/storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/service/AzureBlobStorageService.java
+++ b/samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/service/AzureBlobStorageService.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-package com.microsoft.aspire.storage.explorer.service;
+package com.microsoft.aspire.storageexplorer.service;
import com.azure.identity.DefaultAzureCredentialBuilder;
import com.azure.storage.blob.BlobClient;
diff --git a/storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/service/AzureStorageItem.java b/samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/service/AzureStorageItem.java
similarity index 96%
rename from storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/service/AzureStorageItem.java
rename to samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/service/AzureStorageItem.java
index 8129f1f..895b87b 100644
--- a/storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/service/AzureStorageItem.java
+++ b/samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/service/AzureStorageItem.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-package com.microsoft.aspire.storage.explorer.service;
+package com.microsoft.aspire.storageexplorer.service;
import com.azure.storage.blob.BlobClient;
import com.azure.storage.blob.models.BlobItem;
diff --git a/storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/service/DisplayMode.java b/samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/service/DisplayMode.java
similarity index 92%
rename from storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/service/DisplayMode.java
rename to samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/service/DisplayMode.java
index e55e6f7..bdf09fd 100644
--- a/storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/service/DisplayMode.java
+++ b/samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/service/DisplayMode.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-package com.microsoft.aspire.storage.explorer.service;
+package com.microsoft.aspire.storageexplorer.service;
public enum DisplayMode {
diff --git a/storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/service/StorageItem.java b/samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/service/StorageItem.java
similarity index 96%
rename from storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/service/StorageItem.java
rename to samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/service/StorageItem.java
index c6e6692..0d74ecf 100644
--- a/storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/service/StorageItem.java
+++ b/samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/service/StorageItem.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-package com.microsoft.aspire.storage.explorer.service;
+package com.microsoft.aspire.storageexplorer.service;
import java.io.InputStream;
diff --git a/storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/service/StorageService.java b/samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/service/StorageService.java
similarity index 96%
rename from storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/service/StorageService.java
rename to samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/service/StorageService.java
index ccb15d1..d2cc8fd 100644
--- a/storage-explorer/src/main/java/com/microsoft/aspire/storage/explorer/service/StorageService.java
+++ b/samples/storage-explorer/storage-explorer/src/main/java/com/microsoft/aspire/storageexplorer/service/StorageService.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-package com.microsoft.aspire.storage.explorer.service;
+package com.microsoft.aspire.storageexplorer.service;
import java.io.InputStream;
import java.util.stream.Stream;
diff --git a/storage-explorer/src/main/resources/static/azure.png b/samples/storage-explorer/storage-explorer/src/main/resources/static/azure.png
similarity index 100%
rename from storage-explorer/src/main/resources/static/azure.png
rename to samples/storage-explorer/storage-explorer/src/main/resources/static/azure.png
diff --git a/storage-explorer/src/main/resources/static/styles.css b/samples/storage-explorer/storage-explorer/src/main/resources/static/styles.css
similarity index 100%
rename from storage-explorer/src/main/resources/static/styles.css
rename to samples/storage-explorer/storage-explorer/src/main/resources/static/styles.css
diff --git a/storage-explorer/src/main/resources/templates/uploadForm.html b/samples/storage-explorer/storage-explorer/src/main/resources/templates/uploadForm.html
similarity index 100%
rename from storage-explorer/src/main/resources/templates/uploadForm.html
rename to samples/storage-explorer/storage-explorer/src/main/resources/templates/uploadForm.html