Have jetty-ee#-maven-plugin manage the deployer environment as well

This commit is contained in:
Joakim Erdfelt 2022-07-19 11:46:20 -05:00
parent 55805c92ee
commit e84b84e09c
No known key found for this signature in database
GPG Key ID: 2D0E1FB8FE4B68B4
2 changed files with 5 additions and 1 deletions

View File

@ -363,13 +363,15 @@ public class JettyHomeForker extends AbstractForker
IO.copy(jarStream, fileStream);
}
//copy in the maven.xml webapp file
// copy in the maven.xml webapp file
try (InputStream mavenXmlStream = getClass().getClassLoader().getResourceAsStream("maven-ee10.xml");
FileOutputStream fileStream = new FileOutputStream(webappPath.resolve("maven-ee10.xml").toFile()))
{
IO.copy(mavenXmlStream, fileStream);
}
Files.writeString(webappPath.resolve("maven-ee10.properties"), "environment=ee10");
//copy in the maven.mod file
try (InputStream mavenModStream = getClass().getClassLoader().getResourceAsStream("ee10-maven.mod");
FileOutputStream fileStream = new FileOutputStream(modulesPath.resolve("ee10-maven.mod").toFile()))

View File

@ -370,6 +370,8 @@ public class JettyHomeForker extends AbstractForker
IO.copy(mavenXmlStream, fileStream);
}
Files.writeString(webappPath.resolve("maven-ee9.properties"), "environment=ee9");
//copy in the maven.mod file
try (InputStream mavenModStream = getClass().getClassLoader().getResourceAsStream("ee9-maven.mod");
FileOutputStream fileStream = new FileOutputStream(modulesPath.resolve("ee9-maven.mod").toFile()))