Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASSETS-35923 create .cloudmanager/java-version for cloud projects, min jdk11 #1175

Merged
merged 4 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,16 @@
</properties>
</profile>

<profile>
<id>it-java8</id>
<activation>
<jdk>[1.8,11)</jdk>
</activation>
<properties>
<archetype.test.projectsDirectory>${project.build.testOutputDirectory}/projects-1_8</archetype.test.projectsDirectory>
</properties>
</profile>

<profile>
<!-- This is the release profile. -->
<id>release</id>
Expand Down
11 changes: 11 additions & 0 deletions src/main/archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,17 @@
<requireMavenVersion>
<version>[3.3.9,)</version>
</requireMavenVersion>
#if ( $aemVersion == "cloud")
<requireJavaVersion>
<message>Maven must be executed with a Java 11 JRE or higher.</message>
<version>11</version>
</requireJavaVersion>
#else
<requireJavaVersion>
<message>Maven must be executed with a Java 8 JRE or higher.</message>
<version>1.8.0</version>
</requireJavaVersion>
#end
</rules>
</configuration>
</execution>
Expand All @@ -162,8 +169,12 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
#if ( $aemVersion == "cloud")
<release>11</release>
#else
<source>1.8</source>
<target>1.8</target>
#end
</configuration>
</plugin>
</plugins>
Expand Down
5 changes: 4 additions & 1 deletion src/main/resources/META-INF/archetype-post-generate.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ if (aemVersion == "cloud") {
}
println "Using AEM as a Cloud Service SDK version: " + sdkVersion
rootPom.text = rootPom.text.replaceAll('SDK_VERSION', sdkVersion.toString())
def cloudManagerDir = new File(rootDir, ".cloudmanager");
assert cloudManagerDir.mkdir();
new File(cloudManagerDir, "java-version").write("11");
}

buildContentSkeleton(uiContentPackage, uiAppsPackage, singleCountry, appId, language, country)
Expand Down Expand Up @@ -259,7 +262,7 @@ if (includeForms == "y" || includeFormsenrollment == "y" || includeFormscommunic
}
println "Using AEM Forms as a Cloud Service SDK version: " + sdkFormsVersion
rootPom.text = rootPom.text.replaceAll('SDK_FORMS_VERSION', sdkFormsVersion.toString())

}

// if config.publish folder ends up empty, remove it, otherwise the filevault-package-maven-plugin will throw
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/projects-1_8/basic
1 change: 1 addition & 0 deletions src/test/resources/projects-1_8/basic-6.5.0
1 change: 1 addition & 0 deletions src/test/resources/projects-1_8/cif
1 change: 1 addition & 0 deletions src/test/resources/projects-1_8/forms-basic-6.5.0
1 change: 1 addition & 0 deletions src/test/resources/projects-1_8/frontend-angular
1 change: 1 addition & 0 deletions src/test/resources/projects-1_8/frontend-angular-ssr
1 change: 1 addition & 0 deletions src/test/resources/projects-1_8/frontend-general
1 change: 1 addition & 0 deletions src/test/resources/projects-1_8/frontend-react
1 change: 1 addition & 0 deletions src/test/resources/projects-1_8/frontend-react-ssr
Loading