This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-archetype.git
commit 9a3dc667f1a16463f1b32d1ec6622ca9f85a38d0 Author: Sylwester Lachiewicz <[email protected]> AuthorDate: Sat Oct 31 17:56:09 2026 +0000 Skip building the created archetype when no post phase is given --- .../maven/archetype/ArchetypeCreationRequest.java | 3 + .../archetype/creator/FilesetArchetypeCreator.java | 65 ++++---- .../fileset}/create-1/archetype.properties | 0 .../resources/projects/fileset}/create-1/pom.xml | 0 .../src/main/java/archetype/subfolder1/App.java | 0 .../src/main/java/archetype/subfolder2/App.java | 0 .../create-1/src/main/resources/log4j.properties | 0 .../create-1/src/main/webapp/WEB-INF/web.xml | 0 .../projects/fileset}/create-1/src/site/site.xml | 0 .../src/test/java/archetype/test/AppTest.java | 0 .../create-1/src/test/resources/log4j.properties | 0 .../fileset}/create-2/archetype.properties | 0 .../resources/projects/fileset}/create-2/pom.xml | 0 .../org/apache/maven/archetype/subfolder1/App.java | 0 .../org/apache/maven/archetype/subfolder2/App.java | 0 .../src/it-test/resources/log4j.properties | 0 .../org/apache/maven/archetype/subfolder1/App.java | 0 .../org/apache/maven/archetype/subfolder2/App.java | 0 .../create-2/src/main/resources/log4j.properties | 0 .../create-2/src/main/webapp/WEB-INF/web.xml | 0 .../projects/fileset}/create-2/src/site/site.xml | 0 .../org/apache/maven/archetype/test/AppTest.java | 0 .../create-2/src/test/resources/log4j.properties | 0 .../projects/fileset}/create-2/subModule/pom.xml | 0 .../projects/fileset}/create-3/application/pom.xml | 0 .../application/src/it-test/java/ItTestAll.java | 0 .../org/apache/maven/archetype/test/ItTest1.java | 0 .../src/it-test/resources/ItTest1Result.txt | 0 .../create-3/application/src/main/java/Main.java | 0 .../archetype/test/application/Application.java | 0 .../test/application/audios/Application.ogg | 0 .../test/application/images/Application.png | 0 .../src/main/resources/META-INF/MANIFEST.MF | 0 .../src/main/resources/log4j.properties | 0 .../archetype/test/application/some/Gro.groovy | 0 .../application/src/main/resources/splash.png | 0 .../application/src/test/java/TestAll.java | 0 .../test/application/ApplicationTest.java | 0 .../fileset}/create-3/archetype.properties | 0 .../projects/fileset}/create-3/libs/pom.xml | 0 .../projects/fileset}/create-3/libs/prj-a/pom.xml | 0 .../libs/prj-a/src/main/mdo/descriptor.xml | 0 .../projects/fileset}/create-3/libs/prj-b/pom.xml | 0 .../apache/maven/archetype/test/com/Component.java | 0 .../apache/maven/archetype/test/com/package.html | 0 .../maven/archetype/test/common/ComponentTest.java | 0 .../resources/projects/fileset}/create-3/pom.xml | 0 .../fileset}/create-3/src/site/apt/index.apt | 0 .../fileset}/create-3/src/site/resources/site.png | 0 .../projects/fileset}/create-3/src/site/site.xml | 0 .../fileset}/create-4/archetype.properties | 0 .../resources/projects/fileset}/create-4/pom.xml | 0 .../fileset}/create-4/subModuleEAR/pom.xml | 0 .../fileset}/create-4/subModuleWar/pom.xml | 0 .../fileset}/create-5/archetype.properties | 0 .../projects/fileset}/create-5/dummy.file | 0 .../resources/projects/fileset}/create-5/pom.xml | 0 .../fileset}/create-6/archetype.properties | 0 .../resources/projects/fileset}/create-6/pom.xml | 0 .../src/main/webapp/resources/create-6/a.gif | 0 .../src/main/webapp/resources/create-6/a.jsp | 0 .../fileset}/exclude-patterns-2/.sonar/file.txt | 0 .../exclude-patterns-2/archetype.properties | 0 .../exclude-patterns-2/folder/.sonar/file.txt | 0 .../fileset}/exclude-patterns-2/folder/file.txt | 0 .../projects/fileset}/exclude-patterns-2/pom.xml | 0 .../exclude-patterns/.toexclude/dummy.file | 0 .../fileset}/exclude-patterns/archetype.properties | 0 .../exclude-patterns/nottoexclude/dummy.file | 0 .../projects/fileset}/exclude-patterns/pom.xml | 0 .../archetype.properties | 0 .../include-file-with-no-extension/pom.xml | 0 .../src/main/csharp/filewithnoextension | 0 .../archetype.properties | 0 .../pom.xml | 0 .../res/txt/filewithnoextension | 0 .../src/it/projects/create-1/invoker.properties | 18 --- .../src/it/projects/create-1/verify.groovy | 27 ---- .../src/it/projects/create-2/invoker.properties | 18 --- .../src/it/projects/create-2/verify.groovy | 41 ----- .../src/it/projects/create-3/invoker.properties | 18 --- .../src/it/projects/create-3/verify.groovy | 168 --------------------- .../src/it/projects/create-4/invoker.properties | 18 --- .../src/it/projects/create-4/verify.groovy | 43 ------ .../src/it/projects/create-5/invoker.properties | 18 --- .../src/it/projects/create-5/verify.groovy | 23 --- .../src/it/projects/create-6/invoker.properties | 18 --- .../src/it/projects/create-6/verify.groovy | 23 --- .../projects/exclude-patterns-2/invoker.properties | 18 --- .../it/projects/exclude-patterns-2/verify.groovy | 24 --- .../projects/exclude-patterns/invoker.properties | 18 --- .../src/it/projects/exclude-patterns/verify.groovy | 26 ---- .../invoker.properties | 18 --- .../include-file-with-no-extension/verify.groovy | 22 --- .../invoker.properties | 18 --- .../verify.groovy | 22 --- 96 files changed, 41 insertions(+), 626 deletions(-) diff --git a/archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeCreationRequest.java b/archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeCreationRequest.java index a0961032..04b46f48 100644 --- a/archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeCreationRequest.java +++ b/archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeCreationRequest.java @@ -56,6 +56,9 @@ public class ArchetypeCreationRequest { private File settingsFile; + /** + * The phase to build the created archetype up to, or {@code null} or empty to leave it unbuilt. + */ public String getPostPhase() { return postPhase; } diff --git a/archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java b/archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java index 1b59573d..15f5d5d5 100644 --- a/archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java +++ b/archetype-common/src/main/java/org/apache/maven/archetype/creator/FilesetArchetypeCreator.java @@ -277,33 +277,9 @@ public class FilesetArchetypeCreator implements ArchetypeCreator { FileUtils.copyDirectoryStructure( archetypeIntegrationTestInputFolder, archetypeIntegrationTestOutputFolder); } - List<String> arguments = new ArrayList<>(); - arguments.add("-B"); - arguments.add("-f"); - arguments.add(archetypePomFile.getAbsolutePath()); - if (request.getSettingsFile() != null) { - arguments.add("-s"); - arguments.add(request.getSettingsFile().getAbsolutePath()); - } - if (request.getLocalRepositoryBasedir() != null) { - arguments.add("-Dmaven.repo.local=" - + request.getLocalRepositoryBasedir().getAbsolutePath()); - } - String httpsProtocols = System.getProperty("https.protocols"); - if (httpsProtocols != null) { - arguments.add("-Dhttps.protocols=" + httpsProtocols); - } - arguments.add(request.getPostPhase()); - - ExecutorResult buildResult = MavenBuilds.run(ExecutorRequest.mavenBuilder() - .cwd(archetypePomFile.getAbsoluteFile().getParentFile().toPath()) - .arguments(arguments) - .stdOut(MavenBuilds.keepOpen(System.out)) - .stdErr(MavenBuilds.keepOpen(System.err)) - .build()); - if (!buildResult.success()) { - throw new Exception("Maven process ended with exit code " - + buildResult.exitCode().orElse(-1) + "!"); + String postPhase = request.getPostPhase(); + if (postPhase != null && !postPhase.isEmpty()) { + runPostPhase(request, archetypePomFile, postPhase); } } catch (Exception e) { @@ -311,6 +287,41 @@ public class FilesetArchetypeCreator implements ArchetypeCreator { } } + /** + * Builds the created archetype up to the given phase, in a forked Maven. + */ + private void runPostPhase(ArchetypeCreationRequest request, File archetypePomFile, String postPhase) + throws Exception { + List<String> arguments = new ArrayList<>(); + arguments.add("-B"); + arguments.add("-f"); + arguments.add(archetypePomFile.getAbsolutePath()); + if (request.getSettingsFile() != null) { + arguments.add("-s"); + arguments.add(request.getSettingsFile().getAbsolutePath()); + } + if (request.getLocalRepositoryBasedir() != null) { + arguments.add( + "-Dmaven.repo.local=" + request.getLocalRepositoryBasedir().getAbsolutePath()); + } + String httpsProtocols = System.getProperty("https.protocols"); + if (httpsProtocols != null) { + arguments.add("-Dhttps.protocols=" + httpsProtocols); + } + arguments.add(postPhase); + + ExecutorResult buildResult = MavenBuilds.run(ExecutorRequest.mavenBuilder() + .cwd(archetypePomFile.getAbsoluteFile().getParentFile().toPath()) + .arguments(arguments) + .stdOut(MavenBuilds.keepOpen(System.out)) + .stdErr(MavenBuilds.keepOpen(System.err)) + .build()); + if (!buildResult.success()) { + throw new Exception("Maven process ended with exit code " + + buildResult.exitCode().orElse(-1) + "!"); + } + } + /** * Create an archetype IT, ie goals.txt and archetype.properties in src/test/resources/projects/basic. * diff --git a/maven-archetype-plugin/src/it/projects/create-1/archetype.properties b/archetype-common/src/test/resources/projects/fileset/create-1/archetype.properties similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-1/archetype.properties rename to archetype-common/src/test/resources/projects/fileset/create-1/archetype.properties diff --git a/maven-archetype-plugin/src/it/projects/create-1/pom.xml b/archetype-common/src/test/resources/projects/fileset/create-1/pom.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-1/pom.xml rename to archetype-common/src/test/resources/projects/fileset/create-1/pom.xml diff --git a/maven-archetype-plugin/src/it/projects/create-1/src/main/java/archetype/subfolder1/App.java b/archetype-common/src/test/resources/projects/fileset/create-1/src/main/java/archetype/subfolder1/App.java similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-1/src/main/java/archetype/subfolder1/App.java rename to archetype-common/src/test/resources/projects/fileset/create-1/src/main/java/archetype/subfolder1/App.java diff --git a/maven-archetype-plugin/src/it/projects/create-1/src/main/java/archetype/subfolder2/App.java b/archetype-common/src/test/resources/projects/fileset/create-1/src/main/java/archetype/subfolder2/App.java similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-1/src/main/java/archetype/subfolder2/App.java rename to archetype-common/src/test/resources/projects/fileset/create-1/src/main/java/archetype/subfolder2/App.java diff --git a/maven-archetype-plugin/src/it/projects/create-1/src/main/resources/log4j.properties b/archetype-common/src/test/resources/projects/fileset/create-1/src/main/resources/log4j.properties similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-1/src/main/resources/log4j.properties rename to archetype-common/src/test/resources/projects/fileset/create-1/src/main/resources/log4j.properties diff --git a/maven-archetype-plugin/src/it/projects/create-1/src/main/webapp/WEB-INF/web.xml b/archetype-common/src/test/resources/projects/fileset/create-1/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-1/src/main/webapp/WEB-INF/web.xml rename to archetype-common/src/test/resources/projects/fileset/create-1/src/main/webapp/WEB-INF/web.xml diff --git a/maven-archetype-plugin/src/it/projects/create-1/src/site/site.xml b/archetype-common/src/test/resources/projects/fileset/create-1/src/site/site.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-1/src/site/site.xml rename to archetype-common/src/test/resources/projects/fileset/create-1/src/site/site.xml diff --git a/maven-archetype-plugin/src/it/projects/create-1/src/test/java/archetype/test/AppTest.java b/archetype-common/src/test/resources/projects/fileset/create-1/src/test/java/archetype/test/AppTest.java similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-1/src/test/java/archetype/test/AppTest.java rename to archetype-common/src/test/resources/projects/fileset/create-1/src/test/java/archetype/test/AppTest.java diff --git a/maven-archetype-plugin/src/it/projects/create-1/src/test/resources/log4j.properties b/archetype-common/src/test/resources/projects/fileset/create-1/src/test/resources/log4j.properties similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-1/src/test/resources/log4j.properties rename to archetype-common/src/test/resources/projects/fileset/create-1/src/test/resources/log4j.properties diff --git a/maven-archetype-plugin/src/it/projects/create-2/archetype.properties b/archetype-common/src/test/resources/projects/fileset/create-2/archetype.properties similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-2/archetype.properties rename to archetype-common/src/test/resources/projects/fileset/create-2/archetype.properties diff --git a/maven-archetype-plugin/src/it/projects/create-2/pom.xml b/archetype-common/src/test/resources/projects/fileset/create-2/pom.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-2/pom.xml rename to archetype-common/src/test/resources/projects/fileset/create-2/pom.xml diff --git a/maven-archetype-plugin/src/it/projects/create-2/src/it-test/java/org/apache/maven/archetype/subfolder1/App.java b/archetype-common/src/test/resources/projects/fileset/create-2/src/it-test/java/org/apache/maven/archetype/subfolder1/App.java similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-2/src/it-test/java/org/apache/maven/archetype/subfolder1/App.java rename to archetype-common/src/test/resources/projects/fileset/create-2/src/it-test/java/org/apache/maven/archetype/subfolder1/App.java diff --git a/maven-archetype-plugin/src/it/projects/create-2/src/it-test/java/org/apache/maven/archetype/subfolder2/App.java b/archetype-common/src/test/resources/projects/fileset/create-2/src/it-test/java/org/apache/maven/archetype/subfolder2/App.java similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-2/src/it-test/java/org/apache/maven/archetype/subfolder2/App.java rename to archetype-common/src/test/resources/projects/fileset/create-2/src/it-test/java/org/apache/maven/archetype/subfolder2/App.java diff --git a/maven-archetype-plugin/src/it/projects/create-2/src/it-test/resources/log4j.properties b/archetype-common/src/test/resources/projects/fileset/create-2/src/it-test/resources/log4j.properties similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-2/src/it-test/resources/log4j.properties rename to archetype-common/src/test/resources/projects/fileset/create-2/src/it-test/resources/log4j.properties diff --git a/maven-archetype-plugin/src/it/projects/create-2/src/main/java/org/apache/maven/archetype/subfolder1/App.java b/archetype-common/src/test/resources/projects/fileset/create-2/src/main/java/org/apache/maven/archetype/subfolder1/App.java similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-2/src/main/java/org/apache/maven/archetype/subfolder1/App.java rename to archetype-common/src/test/resources/projects/fileset/create-2/src/main/java/org/apache/maven/archetype/subfolder1/App.java diff --git a/maven-archetype-plugin/src/it/projects/create-2/src/main/java/org/apache/maven/archetype/subfolder2/App.java b/archetype-common/src/test/resources/projects/fileset/create-2/src/main/java/org/apache/maven/archetype/subfolder2/App.java similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-2/src/main/java/org/apache/maven/archetype/subfolder2/App.java rename to archetype-common/src/test/resources/projects/fileset/create-2/src/main/java/org/apache/maven/archetype/subfolder2/App.java diff --git a/maven-archetype-plugin/src/it/projects/create-2/src/main/resources/log4j.properties b/archetype-common/src/test/resources/projects/fileset/create-2/src/main/resources/log4j.properties similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-2/src/main/resources/log4j.properties rename to archetype-common/src/test/resources/projects/fileset/create-2/src/main/resources/log4j.properties diff --git a/maven-archetype-plugin/src/it/projects/create-2/src/main/webapp/WEB-INF/web.xml b/archetype-common/src/test/resources/projects/fileset/create-2/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-2/src/main/webapp/WEB-INF/web.xml rename to archetype-common/src/test/resources/projects/fileset/create-2/src/main/webapp/WEB-INF/web.xml diff --git a/maven-archetype-plugin/src/it/projects/create-2/src/site/site.xml b/archetype-common/src/test/resources/projects/fileset/create-2/src/site/site.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-2/src/site/site.xml rename to archetype-common/src/test/resources/projects/fileset/create-2/src/site/site.xml diff --git a/maven-archetype-plugin/src/it/projects/create-2/src/test/java/org/apache/maven/archetype/test/AppTest.java b/archetype-common/src/test/resources/projects/fileset/create-2/src/test/java/org/apache/maven/archetype/test/AppTest.java similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-2/src/test/java/org/apache/maven/archetype/test/AppTest.java rename to archetype-common/src/test/resources/projects/fileset/create-2/src/test/java/org/apache/maven/archetype/test/AppTest.java diff --git a/maven-archetype-plugin/src/it/projects/create-2/src/test/resources/log4j.properties b/archetype-common/src/test/resources/projects/fileset/create-2/src/test/resources/log4j.properties similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-2/src/test/resources/log4j.properties rename to archetype-common/src/test/resources/projects/fileset/create-2/src/test/resources/log4j.properties diff --git a/maven-archetype-plugin/src/it/projects/create-2/subModule/pom.xml b/archetype-common/src/test/resources/projects/fileset/create-2/subModule/pom.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-2/subModule/pom.xml rename to archetype-common/src/test/resources/projects/fileset/create-2/subModule/pom.xml diff --git a/maven-archetype-plugin/src/it/projects/create-3/application/pom.xml b/archetype-common/src/test/resources/projects/fileset/create-3/application/pom.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/application/pom.xml rename to archetype-common/src/test/resources/projects/fileset/create-3/application/pom.xml diff --git a/maven-archetype-plugin/src/it/projects/create-3/application/src/it-test/java/ItTestAll.java b/archetype-common/src/test/resources/projects/fileset/create-3/application/src/it-test/java/ItTestAll.java similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/application/src/it-test/java/ItTestAll.java rename to archetype-common/src/test/resources/projects/fileset/create-3/application/src/it-test/java/ItTestAll.java diff --git a/maven-archetype-plugin/src/it/projects/create-3/application/src/it-test/java/org/apache/maven/archetype/test/ItTest1.java b/archetype-common/src/test/resources/projects/fileset/create-3/application/src/it-test/java/org/apache/maven/archetype/test/ItTest1.java similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/application/src/it-test/java/org/apache/maven/archetype/test/ItTest1.java rename to archetype-common/src/test/resources/projects/fileset/create-3/application/src/it-test/java/org/apache/maven/archetype/test/ItTest1.java diff --git a/maven-archetype-plugin/src/it/projects/create-3/application/src/it-test/resources/ItTest1Result.txt b/archetype-common/src/test/resources/projects/fileset/create-3/application/src/it-test/resources/ItTest1Result.txt similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/application/src/it-test/resources/ItTest1Result.txt rename to archetype-common/src/test/resources/projects/fileset/create-3/application/src/it-test/resources/ItTest1Result.txt diff --git a/maven-archetype-plugin/src/it/projects/create-3/application/src/main/java/Main.java b/archetype-common/src/test/resources/projects/fileset/create-3/application/src/main/java/Main.java similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/application/src/main/java/Main.java rename to archetype-common/src/test/resources/projects/fileset/create-3/application/src/main/java/Main.java diff --git a/maven-archetype-plugin/src/it/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/Application.java b/archetype-common/src/test/resources/projects/fileset/create-3/application/src/main/java/org/apache/maven/archetype/test/application/Application.java similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/Application.java rename to archetype-common/src/test/resources/projects/fileset/create-3/application/src/main/java/org/apache/maven/archetype/test/application/Application.java diff --git a/maven-archetype-plugin/src/it/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/audios/Application.ogg b/archetype-common/src/test/resources/projects/fileset/create-3/application/src/main/java/org/apache/maven/archetype/test/application/audios/Application.ogg similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/audios/Application.ogg rename to archetype-common/src/test/resources/projects/fileset/create-3/application/src/main/java/org/apache/maven/archetype/test/application/audios/Application.ogg diff --git a/maven-archetype-plugin/src/it/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/images/Application.png b/archetype-common/src/test/resources/projects/fileset/create-3/application/src/main/java/org/apache/maven/archetype/test/application/images/Application.png similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/images/Application.png rename to archetype-common/src/test/resources/projects/fileset/create-3/application/src/main/java/org/apache/maven/archetype/test/application/images/Application.png diff --git a/maven-archetype-plugin/src/it/projects/create-3/application/src/main/resources/META-INF/MANIFEST.MF b/archetype-common/src/test/resources/projects/fileset/create-3/application/src/main/resources/META-INF/MANIFEST.MF similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/application/src/main/resources/META-INF/MANIFEST.MF rename to archetype-common/src/test/resources/projects/fileset/create-3/application/src/main/resources/META-INF/MANIFEST.MF diff --git a/maven-archetype-plugin/src/it/projects/create-3/application/src/main/resources/log4j.properties b/archetype-common/src/test/resources/projects/fileset/create-3/application/src/main/resources/log4j.properties similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/application/src/main/resources/log4j.properties rename to archetype-common/src/test/resources/projects/fileset/create-3/application/src/main/resources/log4j.properties diff --git a/maven-archetype-plugin/src/it/projects/create-3/application/src/main/resources/org/apache/maven/archetype/test/application/some/Gro.groovy b/archetype-common/src/test/resources/projects/fileset/create-3/application/src/main/resources/org/apache/maven/archetype/test/application/some/Gro.groovy similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/application/src/main/resources/org/apache/maven/archetype/test/application/some/Gro.groovy rename to archetype-common/src/test/resources/projects/fileset/create-3/application/src/main/resources/org/apache/maven/archetype/test/application/some/Gro.groovy diff --git a/maven-archetype-plugin/src/it/projects/create-3/application/src/main/resources/splash.png b/archetype-common/src/test/resources/projects/fileset/create-3/application/src/main/resources/splash.png similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/application/src/main/resources/splash.png rename to archetype-common/src/test/resources/projects/fileset/create-3/application/src/main/resources/splash.png diff --git a/maven-archetype-plugin/src/it/projects/create-3/application/src/test/java/TestAll.java b/archetype-common/src/test/resources/projects/fileset/create-3/application/src/test/java/TestAll.java similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/application/src/test/java/TestAll.java rename to archetype-common/src/test/resources/projects/fileset/create-3/application/src/test/java/TestAll.java diff --git a/maven-archetype-plugin/src/it/projects/create-3/application/src/test/java/org/apache/maven/archetype/test/application/ApplicationTest.java b/archetype-common/src/test/resources/projects/fileset/create-3/application/src/test/java/org/apache/maven/archetype/test/application/ApplicationTest.java similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/application/src/test/java/org/apache/maven/archetype/test/application/ApplicationTest.java rename to archetype-common/src/test/resources/projects/fileset/create-3/application/src/test/java/org/apache/maven/archetype/test/application/ApplicationTest.java diff --git a/maven-archetype-plugin/src/it/projects/create-3/archetype.properties b/archetype-common/src/test/resources/projects/fileset/create-3/archetype.properties similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/archetype.properties rename to archetype-common/src/test/resources/projects/fileset/create-3/archetype.properties diff --git a/maven-archetype-plugin/src/it/projects/create-3/libs/pom.xml b/archetype-common/src/test/resources/projects/fileset/create-3/libs/pom.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/libs/pom.xml rename to archetype-common/src/test/resources/projects/fileset/create-3/libs/pom.xml diff --git a/maven-archetype-plugin/src/it/projects/create-3/libs/prj-a/pom.xml b/archetype-common/src/test/resources/projects/fileset/create-3/libs/prj-a/pom.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/libs/prj-a/pom.xml rename to archetype-common/src/test/resources/projects/fileset/create-3/libs/prj-a/pom.xml diff --git a/maven-archetype-plugin/src/it/projects/create-3/libs/prj-a/src/main/mdo/descriptor.xml b/archetype-common/src/test/resources/projects/fileset/create-3/libs/prj-a/src/main/mdo/descriptor.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/libs/prj-a/src/main/mdo/descriptor.xml rename to archetype-common/src/test/resources/projects/fileset/create-3/libs/prj-a/src/main/mdo/descriptor.xml diff --git a/maven-archetype-plugin/src/it/projects/create-3/libs/prj-b/pom.xml b/archetype-common/src/test/resources/projects/fileset/create-3/libs/prj-b/pom.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/libs/prj-b/pom.xml rename to archetype-common/src/test/resources/projects/fileset/create-3/libs/prj-b/pom.xml diff --git a/maven-archetype-plugin/src/it/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/Component.java b/archetype-common/src/test/resources/projects/fileset/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/Component.java similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/Component.java rename to archetype-common/src/test/resources/projects/fileset/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/Component.java diff --git a/maven-archetype-plugin/src/it/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/package.html b/archetype-common/src/test/resources/projects/fileset/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/package.html similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/package.html rename to archetype-common/src/test/resources/projects/fileset/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/package.html diff --git a/maven-archetype-plugin/src/it/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java b/archetype-common/src/test/resources/projects/fileset/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java rename to archetype-common/src/test/resources/projects/fileset/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java diff --git a/maven-archetype-plugin/src/it/projects/create-3/pom.xml b/archetype-common/src/test/resources/projects/fileset/create-3/pom.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/pom.xml rename to archetype-common/src/test/resources/projects/fileset/create-3/pom.xml diff --git a/maven-archetype-plugin/src/it/projects/create-3/src/site/apt/index.apt b/archetype-common/src/test/resources/projects/fileset/create-3/src/site/apt/index.apt similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/src/site/apt/index.apt rename to archetype-common/src/test/resources/projects/fileset/create-3/src/site/apt/index.apt diff --git a/maven-archetype-plugin/src/it/projects/create-3/src/site/resources/site.png b/archetype-common/src/test/resources/projects/fileset/create-3/src/site/resources/site.png similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/src/site/resources/site.png rename to archetype-common/src/test/resources/projects/fileset/create-3/src/site/resources/site.png diff --git a/maven-archetype-plugin/src/it/projects/create-3/src/site/site.xml b/archetype-common/src/test/resources/projects/fileset/create-3/src/site/site.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-3/src/site/site.xml rename to archetype-common/src/test/resources/projects/fileset/create-3/src/site/site.xml diff --git a/maven-archetype-plugin/src/it/projects/create-4/archetype.properties b/archetype-common/src/test/resources/projects/fileset/create-4/archetype.properties similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-4/archetype.properties rename to archetype-common/src/test/resources/projects/fileset/create-4/archetype.properties diff --git a/maven-archetype-plugin/src/it/projects/create-4/pom.xml b/archetype-common/src/test/resources/projects/fileset/create-4/pom.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-4/pom.xml rename to archetype-common/src/test/resources/projects/fileset/create-4/pom.xml diff --git a/maven-archetype-plugin/src/it/projects/create-4/subModuleEAR/pom.xml b/archetype-common/src/test/resources/projects/fileset/create-4/subModuleEAR/pom.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-4/subModuleEAR/pom.xml rename to archetype-common/src/test/resources/projects/fileset/create-4/subModuleEAR/pom.xml diff --git a/maven-archetype-plugin/src/it/projects/create-4/subModuleWar/pom.xml b/archetype-common/src/test/resources/projects/fileset/create-4/subModuleWar/pom.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-4/subModuleWar/pom.xml rename to archetype-common/src/test/resources/projects/fileset/create-4/subModuleWar/pom.xml diff --git a/maven-archetype-plugin/src/it/projects/create-5/archetype.properties b/archetype-common/src/test/resources/projects/fileset/create-5/archetype.properties similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-5/archetype.properties rename to archetype-common/src/test/resources/projects/fileset/create-5/archetype.properties diff --git a/maven-archetype-plugin/src/it/projects/create-5/dummy.file b/archetype-common/src/test/resources/projects/fileset/create-5/dummy.file similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-5/dummy.file rename to archetype-common/src/test/resources/projects/fileset/create-5/dummy.file diff --git a/maven-archetype-plugin/src/it/projects/create-5/pom.xml b/archetype-common/src/test/resources/projects/fileset/create-5/pom.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-5/pom.xml rename to archetype-common/src/test/resources/projects/fileset/create-5/pom.xml diff --git a/maven-archetype-plugin/src/it/projects/create-6/archetype.properties b/archetype-common/src/test/resources/projects/fileset/create-6/archetype.properties similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-6/archetype.properties rename to archetype-common/src/test/resources/projects/fileset/create-6/archetype.properties diff --git a/maven-archetype-plugin/src/it/projects/create-6/pom.xml b/archetype-common/src/test/resources/projects/fileset/create-6/pom.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-6/pom.xml rename to archetype-common/src/test/resources/projects/fileset/create-6/pom.xml diff --git a/maven-archetype-plugin/src/it/projects/create-6/src/main/webapp/resources/create-6/a.gif b/archetype-common/src/test/resources/projects/fileset/create-6/src/main/webapp/resources/create-6/a.gif similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-6/src/main/webapp/resources/create-6/a.gif rename to archetype-common/src/test/resources/projects/fileset/create-6/src/main/webapp/resources/create-6/a.gif diff --git a/maven-archetype-plugin/src/it/projects/create-6/src/main/webapp/resources/create-6/a.jsp b/archetype-common/src/test/resources/projects/fileset/create-6/src/main/webapp/resources/create-6/a.jsp similarity index 100% rename from maven-archetype-plugin/src/it/projects/create-6/src/main/webapp/resources/create-6/a.jsp rename to archetype-common/src/test/resources/projects/fileset/create-6/src/main/webapp/resources/create-6/a.jsp diff --git a/maven-archetype-plugin/src/it/projects/exclude-patterns-2/.sonar/file.txt b/archetype-common/src/test/resources/projects/fileset/exclude-patterns-2/.sonar/file.txt similarity index 100% rename from maven-archetype-plugin/src/it/projects/exclude-patterns-2/.sonar/file.txt rename to archetype-common/src/test/resources/projects/fileset/exclude-patterns-2/.sonar/file.txt diff --git a/maven-archetype-plugin/src/it/projects/exclude-patterns-2/archetype.properties b/archetype-common/src/test/resources/projects/fileset/exclude-patterns-2/archetype.properties similarity index 100% rename from maven-archetype-plugin/src/it/projects/exclude-patterns-2/archetype.properties rename to archetype-common/src/test/resources/projects/fileset/exclude-patterns-2/archetype.properties diff --git a/maven-archetype-plugin/src/it/projects/exclude-patterns-2/folder/.sonar/file.txt b/archetype-common/src/test/resources/projects/fileset/exclude-patterns-2/folder/.sonar/file.txt similarity index 100% rename from maven-archetype-plugin/src/it/projects/exclude-patterns-2/folder/.sonar/file.txt rename to archetype-common/src/test/resources/projects/fileset/exclude-patterns-2/folder/.sonar/file.txt diff --git a/maven-archetype-plugin/src/it/projects/exclude-patterns-2/folder/file.txt b/archetype-common/src/test/resources/projects/fileset/exclude-patterns-2/folder/file.txt similarity index 100% rename from maven-archetype-plugin/src/it/projects/exclude-patterns-2/folder/file.txt rename to archetype-common/src/test/resources/projects/fileset/exclude-patterns-2/folder/file.txt diff --git a/maven-archetype-plugin/src/it/projects/exclude-patterns-2/pom.xml b/archetype-common/src/test/resources/projects/fileset/exclude-patterns-2/pom.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/exclude-patterns-2/pom.xml rename to archetype-common/src/test/resources/projects/fileset/exclude-patterns-2/pom.xml diff --git a/maven-archetype-plugin/src/it/projects/exclude-patterns/.toexclude/dummy.file b/archetype-common/src/test/resources/projects/fileset/exclude-patterns/.toexclude/dummy.file similarity index 100% rename from maven-archetype-plugin/src/it/projects/exclude-patterns/.toexclude/dummy.file rename to archetype-common/src/test/resources/projects/fileset/exclude-patterns/.toexclude/dummy.file diff --git a/maven-archetype-plugin/src/it/projects/exclude-patterns/archetype.properties b/archetype-common/src/test/resources/projects/fileset/exclude-patterns/archetype.properties similarity index 100% rename from maven-archetype-plugin/src/it/projects/exclude-patterns/archetype.properties rename to archetype-common/src/test/resources/projects/fileset/exclude-patterns/archetype.properties diff --git a/maven-archetype-plugin/src/it/projects/exclude-patterns/nottoexclude/dummy.file b/archetype-common/src/test/resources/projects/fileset/exclude-patterns/nottoexclude/dummy.file similarity index 100% rename from maven-archetype-plugin/src/it/projects/exclude-patterns/nottoexclude/dummy.file rename to archetype-common/src/test/resources/projects/fileset/exclude-patterns/nottoexclude/dummy.file diff --git a/maven-archetype-plugin/src/it/projects/exclude-patterns/pom.xml b/archetype-common/src/test/resources/projects/fileset/exclude-patterns/pom.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/exclude-patterns/pom.xml rename to archetype-common/src/test/resources/projects/fileset/exclude-patterns/pom.xml diff --git a/maven-archetype-plugin/src/it/projects/include-file-with-no-extension/archetype.properties b/archetype-common/src/test/resources/projects/fileset/include-file-with-no-extension/archetype.properties similarity index 100% rename from maven-archetype-plugin/src/it/projects/include-file-with-no-extension/archetype.properties rename to archetype-common/src/test/resources/projects/fileset/include-file-with-no-extension/archetype.properties diff --git a/maven-archetype-plugin/src/it/projects/include-file-with-no-extension/pom.xml b/archetype-common/src/test/resources/projects/fileset/include-file-with-no-extension/pom.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/include-file-with-no-extension/pom.xml rename to archetype-common/src/test/resources/projects/fileset/include-file-with-no-extension/pom.xml diff --git a/maven-archetype-plugin/src/it/projects/include-file-with-no-extension/src/main/csharp/filewithnoextension b/archetype-common/src/test/resources/projects/fileset/include-file-with-no-extension/src/main/csharp/filewithnoextension similarity index 100% rename from maven-archetype-plugin/src/it/projects/include-file-with-no-extension/src/main/csharp/filewithnoextension rename to archetype-common/src/test/resources/projects/fileset/include-file-with-no-extension/src/main/csharp/filewithnoextension diff --git a/maven-archetype-plugin/src/it/projects/include-resource-file-with-no-extension/archetype.properties b/archetype-common/src/test/resources/projects/fileset/include-resource-file-with-no-extension/archetype.properties similarity index 100% rename from maven-archetype-plugin/src/it/projects/include-resource-file-with-no-extension/archetype.properties rename to archetype-common/src/test/resources/projects/fileset/include-resource-file-with-no-extension/archetype.properties diff --git a/maven-archetype-plugin/src/it/projects/include-resource-file-with-no-extension/pom.xml b/archetype-common/src/test/resources/projects/fileset/include-resource-file-with-no-extension/pom.xml similarity index 100% rename from maven-archetype-plugin/src/it/projects/include-resource-file-with-no-extension/pom.xml rename to archetype-common/src/test/resources/projects/fileset/include-resource-file-with-no-extension/pom.xml diff --git a/maven-archetype-plugin/src/it/projects/include-resource-file-with-no-extension/res/txt/filewithnoextension b/archetype-common/src/test/resources/projects/fileset/include-resource-file-with-no-extension/res/txt/filewithnoextension similarity index 100% rename from maven-archetype-plugin/src/it/projects/include-resource-file-with-no-extension/res/txt/filewithnoextension rename to archetype-common/src/test/resources/projects/fileset/include-resource-file-with-no-extension/res/txt/filewithnoextension diff --git a/maven-archetype-plugin/src/it/projects/create-1/invoker.properties b/maven-archetype-plugin/src/it/projects/create-1/invoker.properties deleted file mode 100644 index 97ce30ea..00000000 --- a/maven-archetype-plugin/src/it/projects/create-1/invoker.properties +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project diff --git a/maven-archetype-plugin/src/it/projects/create-1/verify.groovy b/maven-archetype-plugin/src/it/projects/create-1/verify.groovy deleted file mode 100644 index 90c0743a..00000000 --- a/maven-archetype-plugin/src/it/projects/create-1/verify.groovy +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -def templateDir = new File(basedir, 'target/generated-sources/archetype/src/main/resources/archetype-resources') - -template = new File(templateDir, 'src/main/java/subfolder1/App.java') -assert template.exists() -assert template.text.contains('// ${someProperty}') -assert template.text.contains('package ${package}.subfolder1;') -assert !template.text.contains('${packageInPathFormat}') - \ No newline at end of file diff --git a/maven-archetype-plugin/src/it/projects/create-2/invoker.properties b/maven-archetype-plugin/src/it/projects/create-2/invoker.properties deleted file mode 100644 index 97ce30ea..00000000 --- a/maven-archetype-plugin/src/it/projects/create-2/invoker.properties +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project diff --git a/maven-archetype-plugin/src/it/projects/create-2/verify.groovy b/maven-archetype-plugin/src/it/projects/create-2/verify.groovy deleted file mode 100644 index 0b644790..00000000 --- a/maven-archetype-plugin/src/it/projects/create-2/verify.groovy +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -def templateDir = new File(basedir, 'target/generated-sources/archetype/src/main/resources/archetype-resources') - -def root = new File(templateDir, 'pom.xml') -assert root.exists() -assert root.text.contains('<artifactId>${artifactId}</artifactId>') -assert root.text.contains('Maven archetype Test create-2') -assert root.text.contains('<packaging>pom</packaging>') - -def subModule = new File(templateDir, 'subModule/pom.xml') -assert subModule.exists() -assert subModule.text.contains('<artifactId>${rootArtifactId}</artifactId>') -assert subModule.text.contains('<parent>') -assert subModule.text.contains('Maven archetype Test create-2-subModule') - -// the non-standard source directory src/it-test is part of the archetype -def itApp = new File(templateDir, 'src/it-test/java/subfolder1/App.java') -assert itApp.exists() -assert itApp.text.contains('// ${someProperty}') - -def descriptor = new File(basedir, 'target/generated-sources/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml') -assert descriptor.text.contains('<module id="${rootArtifactId}-subModule" dir="subModule"') -assert descriptor.text.contains('<directory>src/it-test/java</directory>') diff --git a/maven-archetype-plugin/src/it/projects/create-3/invoker.properties b/maven-archetype-plugin/src/it/projects/create-3/invoker.properties deleted file mode 100644 index 97ce30ea..00000000 --- a/maven-archetype-plugin/src/it/projects/create-3/invoker.properties +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project diff --git a/maven-archetype-plugin/src/it/projects/create-3/verify.groovy b/maven-archetype-plugin/src/it/projects/create-3/verify.groovy deleted file mode 100644 index 6570d171..00000000 --- a/maven-archetype-plugin/src/it/projects/create-3/verify.groovy +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -def templateDir = new File(basedir,'target/generated-sources/archetype/src/main/resources/archetype-resources') - -template = new File(templateDir,'pom.xml') -assert template.exists() -assert template.text.contains('${groupId}') -assert template.text.contains('${artifactId}') -assert template.text.contains('${version}') -assert template.text.contains('Maven archetype Test create-3') -assert template.text.contains('<packaging>pom</packaging>') -assert !template.text.contains('<parent>') - -template = new File(templateDir,'src/site/site.xml') -assert template.exists() -assert template.text.contains('<!-- ${packageInPathFormat}/test') -assert template.text.contains('${someProperty} -->') - -template = new File(templateDir,'src/site/resources/site.png') -assert template.exists() -assert !template.text.contains('${someProperty}') - -template = new File(templateDir,'libs/pom.xml') -assert template.exists() -assert template.text.contains('${groupId}') -assert template.text.contains('${artifactId}') -assert template.text.contains('${version}') -assert template.text.contains('Maven archetype Test create-3-libraries') -assert template.text.contains('<packaging>pom</packaging>') -assert template.text.contains('<parent>') - -template = new File(templateDir,'libs/prj-a/pom.xml') -assert template.exists() -assert template.text.contains('${groupId}') -assert template.text.contains('${artifactId}') -assert template.text.contains('${version}') -assert template.text.contains('Maven archetype Test create-3-libraries-project-a') -assert !template.text.contains('<packaging>pom</packaging>') -assert template.text.contains('<parent>') - -template = new File(templateDir,'libs/prj-a/src/main/mdo/descriptor.xml') -assert template.exists() -assert template.text.contains('<!-- ${packageInPathFormat}/test') -assert template.text.contains('${someProperty} -->') - -template = new File(templateDir,'libs/prj-b/pom.xml') -assert template.exists() -assert template.text.contains('${groupId}') -assert template.text.contains('${artifactId}') -assert template.text.contains('${version}') -assert template.text.contains('Maven archetype Test create-3-libraries-project-b') -assert !template.text.contains('<packaging>pom</packaging>') -assert template.text.contains('<parent>') - -template = new File(templateDir,'libs/prj-b/src/main/java/test/com/Component.java') -assert template.exists() -assert template.text.contains('${someProperty}') -assert template.text.contains('${package}') -assert template.text.contains('${packageInPathFormat}') - -template = new File(templateDir,'libs/prj-b/src/main/java/test/com/package.html') -assert template.exists() -assert template.text.contains('<!-- ${packageInPathFormat}/test') -assert template.text.contains('${someProperty} -->') - -template = new File(templateDir,'libs/prj-b/src/test/java/test/common/ComponentTest.java') -assert template.exists() -assert template.text.contains('${someProperty}') -assert template.text.contains('${package}') -assert template.text.contains('${packageInPathFormat}') - -template = new File(templateDir,'application/pom.xml') -assert template.exists() -assert template.text.contains('${groupId}') -assert template.text.contains('${artifactId}') -assert template.text.contains('${version}') -assert template.text.contains('Maven archetype Test create-3-application') -assert !template.text.contains('<packaging>pom</packaging>') -assert template.text.contains('<parent>') - -template = new File(templateDir,'application/src/main/java/Main.java') -assert template.exists() -assert template.text.contains('${someProperty}') -assert !template.text.contains('${package}') -assert template.text.contains('${packageInPathFormat}/test') - -template = new File(templateDir,'application/src/main/java/test/application/Application.java') -assert template.exists() -assert template.text.contains('${someProperty}') -assert template.text.contains('${package}') -assert template.text.contains('${packageInPathFormat}') - -template = new File(templateDir,'application/src/main/java/test/application/audios/Application.ogg') -assert template.exists() -assert !template.text.contains('${someProperty}') - -template = new File(templateDir,'application/src/main/java/test/application/images/Application.png') -assert template.exists() -assert !template.text.contains('${someProperty}') - -template = new File(templateDir,'application/src/main/resources/log4j.properties') -assert template.exists() -assert template.text.contains('${someProperty}') -assert !template.text.contains('${package}') -assert template.text.contains('${packageInPathFormat}/test') - -template = new File(templateDir,'application/src/main/resources/META-INF/MANIFEST.MF') -assert template.exists() -assert template.text.contains('${someProperty}') -assert !template.text.contains('${package}') -assert template.text.contains('${packageInPathFormat}/test') - -template = new File(templateDir,'application/src/main/resources/test/application/some/Gro.groovy') -assert template.exists() -assert template.text.contains('${someProperty}') -assert !template.text.contains('${package}') -assert template.text.contains('${packageInPathFormat}/test') - -template = new File(templateDir,'application/src/main/resources/splash.png') -assert template.exists() -assert !template.text.contains('${someProperty}') - -template = new File(templateDir,'application/src/test/java/TestAll.java') -assert template.exists() -assert template.text.contains('${someProperty}') -assert !template.text.contains('${package}') -assert template.text.contains('${packageInPathFormat}/test') - -template = new File(templateDir,'application/src/test/java/test/application/ApplicationTest.java') -assert template.exists() -assert template.text.contains('${someProperty}') -assert template.text.contains('package ${package}.test.application;') -assert template.text.contains('${packageInPathFormat}/test/application') - -template = new File(templateDir,'application/src/it-test/java/test/ItTest1.java') -assert template.exists() -assert template.text.contains('${someProperty}') -assert template.text.contains('package ${package}.test;') -assert template.text.contains('${packageInPathFormat}/test') - -template = new File(templateDir,'application/src/it-test/java/ItTestAll.java') -assert template.exists() -assert template.text.contains('${someProperty}') -assert !template.text.contains('${package}') -assert template.text.contains('${packageInPathFormat}/test') - -template = new File(templateDir,'application/src/it-test/resources/ItTest1Result.txt') -assert template.exists() -assert template.text.contains('${someProperty}') -assert !template.text.contains('${package}') -assert template.text.contains('${packageInPathFormat}/test') \ No newline at end of file diff --git a/maven-archetype-plugin/src/it/projects/create-4/invoker.properties b/maven-archetype-plugin/src/it/projects/create-4/invoker.properties deleted file mode 100644 index 97ce30ea..00000000 --- a/maven-archetype-plugin/src/it/projects/create-4/invoker.properties +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project diff --git a/maven-archetype-plugin/src/it/projects/create-4/verify.groovy b/maven-archetype-plugin/src/it/projects/create-4/verify.groovy deleted file mode 100644 index 7e4f46b9..00000000 --- a/maven-archetype-plugin/src/it/projects/create-4/verify.groovy +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -def templateDir = new File(basedir,'target/generated-sources/archetype/src/main/resources/archetype-resources') - -template = new File(templateDir,'pom.xml') -assert template.exists() -assert template.text.contains('Maven archetype Test create-4 ${someProperty}') -assert template.text.contains('<packaging>pom</packaging>') - -earTemplate = new File(templateDir,'subModuleEAR/pom.xml') -assert earTemplate.exists() -assert earTemplate.text.contains('${groupId}') -assert earTemplate.text.contains('${artifactId}') -assert earTemplate.text.contains('${version}') -assert earTemplate.text.contains('Maven archetype Test create-4-subModuleEAR') -assert earTemplate.text.contains('<packaging>ear</packaging>') -assert earTemplate.text.contains('<parent>') - -warTemplate = new File(templateDir,'subModuleWar/pom.xml') -assert warTemplate.exists() -assert warTemplate.text.contains('${groupId}') -assert warTemplate.text.contains('${artifactId}') -assert warTemplate.text.contains('${version}') -assert warTemplate.text.contains('Maven archetype Test create-4-subModuleWar ${someProperty}') -assert warTemplate.text.contains('<packaging>war</packaging>') -assert warTemplate.text.contains('<parent>') \ No newline at end of file diff --git a/maven-archetype-plugin/src/it/projects/create-5/invoker.properties b/maven-archetype-plugin/src/it/projects/create-5/invoker.properties deleted file mode 100644 index 97ce30ea..00000000 --- a/maven-archetype-plugin/src/it/projects/create-5/invoker.properties +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project diff --git a/maven-archetype-plugin/src/it/projects/create-5/verify.groovy b/maven-archetype-plugin/src/it/projects/create-5/verify.groovy deleted file mode 100644 index cbff5746..00000000 --- a/maven-archetype-plugin/src/it/projects/create-5/verify.groovy +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -def templateDir = new File(basedir,'target/generated-sources/archetype/src/main/resources/archetype-resources') - -template = new File(templateDir,'dummy.file') -assert template.exists() \ No newline at end of file diff --git a/maven-archetype-plugin/src/it/projects/create-6/invoker.properties b/maven-archetype-plugin/src/it/projects/create-6/invoker.properties deleted file mode 100644 index 97ce30ea..00000000 --- a/maven-archetype-plugin/src/it/projects/create-6/invoker.properties +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project diff --git a/maven-archetype-plugin/src/it/projects/create-6/verify.groovy b/maven-archetype-plugin/src/it/projects/create-6/verify.groovy deleted file mode 100644 index adf12702..00000000 --- a/maven-archetype-plugin/src/it/projects/create-6/verify.groovy +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -def templateDir = new File(basedir,'target/generated-sources/archetype/src/main/resources/archetype-resources') - -assert new File(templateDir,'src/main/webapp/resources/__artifactId__/a.jsp').exists() -assert new File(templateDir,'src/main/webapp/resources/__artifactId__/a.gif').exists() \ No newline at end of file diff --git a/maven-archetype-plugin/src/it/projects/exclude-patterns-2/invoker.properties b/maven-archetype-plugin/src/it/projects/exclude-patterns-2/invoker.properties deleted file mode 100644 index 97ce30ea..00000000 --- a/maven-archetype-plugin/src/it/projects/exclude-patterns-2/invoker.properties +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project diff --git a/maven-archetype-plugin/src/it/projects/exclude-patterns-2/verify.groovy b/maven-archetype-plugin/src/it/projects/exclude-patterns-2/verify.groovy deleted file mode 100644 index b95e39c0..00000000 --- a/maven-archetype-plugin/src/it/projects/exclude-patterns-2/verify.groovy +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -def templateDir = new File(basedir, 'target/generated-sources/archetype/src/main/resources/archetype-resources') - -assert !new File(templateDir, '.sonar/file.txt').exists() -assert !new File(templateDir, 'folder/.sonar/file.txt').exists() -assert new File(templateDir, 'folder/file.txt').exists() \ No newline at end of file diff --git a/maven-archetype-plugin/src/it/projects/exclude-patterns/invoker.properties b/maven-archetype-plugin/src/it/projects/exclude-patterns/invoker.properties deleted file mode 100644 index 97ce30ea..00000000 --- a/maven-archetype-plugin/src/it/projects/exclude-patterns/invoker.properties +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project diff --git a/maven-archetype-plugin/src/it/projects/exclude-patterns/verify.groovy b/maven-archetype-plugin/src/it/projects/exclude-patterns/verify.groovy deleted file mode 100644 index 0f0c92df..00000000 --- a/maven-archetype-plugin/src/it/projects/exclude-patterns/verify.groovy +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -def templateDir = new File(basedir, 'target/generated-sources/archetype/src/main/resources/archetype-resources') - -template = new File(templateDir, '.toexclude/dummy.file') -assert !template.exists() - -template = new File(templateDir, 'nottoexclude/dummy.file') -assert template.exists() \ No newline at end of file diff --git a/maven-archetype-plugin/src/it/projects/include-file-with-no-extension/invoker.properties b/maven-archetype-plugin/src/it/projects/include-file-with-no-extension/invoker.properties deleted file mode 100644 index 97ce30ea..00000000 --- a/maven-archetype-plugin/src/it/projects/include-file-with-no-extension/invoker.properties +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project diff --git a/maven-archetype-plugin/src/it/projects/include-file-with-no-extension/verify.groovy b/maven-archetype-plugin/src/it/projects/include-file-with-no-extension/verify.groovy deleted file mode 100644 index a06793f1..00000000 --- a/maven-archetype-plugin/src/it/projects/include-file-with-no-extension/verify.groovy +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -def templateDir = new File(basedir, 'target/generated-sources/archetype/src/main/resources/archetype-resources') - -assert new File(templateDir, 'src/main/csharp/filewithnoextension').exists() diff --git a/maven-archetype-plugin/src/it/projects/include-resource-file-with-no-extension/invoker.properties b/maven-archetype-plugin/src/it/projects/include-resource-file-with-no-extension/invoker.properties deleted file mode 100644 index 97ce30ea..00000000 --- a/maven-archetype-plugin/src/it/projects/include-resource-file-with-no-extension/invoker.properties +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project diff --git a/maven-archetype-plugin/src/it/projects/include-resource-file-with-no-extension/verify.groovy b/maven-archetype-plugin/src/it/projects/include-resource-file-with-no-extension/verify.groovy deleted file mode 100644 index 248829f0..00000000 --- a/maven-archetype-plugin/src/it/projects/include-resource-file-with-no-extension/verify.groovy +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -def templateDir = new File(basedir, 'target/generated-sources/archetype/src/main/resources/archetype-resources') - -assert new File(templateDir, 'res/txt/filewithnoextension').exists()
