maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rfscho...@apache.org
Subject [maven-archetype] 01/01: Move integration tests to maven-archetype-plugin/src/it/projects
Date Sat, 13 Apr 2019 14:35:08 GMT
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch integration-tests
in repository https://gitbox.apache.org/repos/asf/maven-archetype.git

commit 2cf6933774bec5345e4505948fc1be2f75a66153
Author: rfscholte <rfscholte@apache.org>
AuthorDate: Sat Apr 13 16:32:11 2019 +0200

    Move integration tests to maven-archetype-plugin/src/it/projects
---
 .../creator/DefaultArchetypeCreatorIT.java         | 536 ---------------------
 .../test/resources/projects/create-3/.classpath    |   2 -
 .../test/resources/projects/create-3/profiles.xml  |  22 -
 maven-archetype-plugin/pom.xml                     |  42 +-
 .../change-file-with-property/archetype.properties |   0
 .../change-file-with-property/invoker.properties   |   2 +-
 .../it/projects/change-file-with-property/pom.xml  |   0
 .../src/main/java/App.java                         |   0
 .../change-file-with-property/verify.groovy        |   9 +-
 .../src/it/projects/create-1/archetype.properties  |   2 +
 .../src/it/projects/create-1/invoker.properties    |   2 +-
 .../src/it/projects/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
 .../src/it}/projects/create-1/src/site/site.xml    |   0
 .../src/test/java/archetype/test/AppTest.java      |   0
 .../create-1/src/test}/resources/log4j.properties  |   0
 .../src/it/projects/create-1/verify.groovy         |  12 +-
 .../src/it/projects/create-2/archetype.properties  |   0
 .../src/it/projects/create-2/invoker.properties    |   2 +-
 .../src/it/projects/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
 .../src/it}/projects/create-2/src/site/site.xml    |   0
 .../org/apache/maven/archetype/test/AppTest.java   |   0
 .../create-2/src/test}/resources/log4j.properties  |   0
 .../src/it}/projects/create-2/subModule/pom.xml    |   2 +-
 .../src/it}/projects/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
 .../src/it/projects/create-3/archetype.properties  |   2 +
 .../src/it/projects/create-3/invoker.properties    |   2 +-
 .../src/it}/projects/create-3/libs/pom.xml         |   0
 .../src/it}/projects/create-3/libs/prj-a/pom.xml   |   0
 .../libs/prj-a/src/main/mdo/descriptor.xml         |   0
 .../src/it}/projects/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
 .../src/it/projects/create-3/pom.xml               |   0
 .../it}/projects/create-3/src/site/apt/index.apt   |   0
 .../projects/create-3/src/site/resources/site.png  |   0
 .../src/it}/projects/create-3/src/site/site.xml    |   0
 .../src/it/projects/create-3/verify.groovy         | 168 +++++++
 .../src/it/projects/create-4/archetype.properties  |   0
 .../src/it/projects/create-4/invoker.properties    |   2 +-
 .../src/it/projects/create-4/pom.xml               |   0
 .../src/it}/projects/create-4/subModuleEAR/pom.xml |   2 +-
 .../src/it}/projects/create-4/subModuleWar/pom.xml |   2 +-
 .../src/it/projects/create-4/verify.groovy         |  43 ++
 .../src/it/projects/create-5/archetype.properties  |   0
 .../src/it/projects/create-5}/dummy.file           |   0
 .../src/it/projects/create-5/invoker.properties    |   2 +-
 .../src/it/projects/create-5/pom.xml               |   0
 .../src/it/projects/create-5/verify.groovy         |   8 +-
 .../src/it/projects/create-6/archetype.properties  |   0
 .../src/it/projects/create-6/invoker.properties    |   2 +-
 .../src/it/projects/create-6/pom.xml               |   0
 .../src/main/webapp/resources/create-6/a.gif       |   0
 .../src/main/webapp/resources/create-6/a.jsp       |   0
 .../src/it/projects/create-6/verify.groovy         |   8 +-
 .../projects/exclude-patterns-2/.sonar}/file.txt   |   0
 .../exclude-patterns-2/archetype.properties        |   0
 .../exclude-patterns-2/folder/.sonar/file.txt      |   0
 .../projects/exclude-patterns-2/folder}/file.txt   |   0
 .../projects/exclude-patterns-2/invoker.properties |   2 +-
 .../src/it/projects/exclude-patterns-2/pom.xml     |   0
 .../it/projects/exclude-patterns-2/verify.groovy   |   9 +-
 .../exclude-patterns/.toexclude/dummy.file         |   0
 .../projects/exclude-patterns/archetype.properties |   0
 .../projects/exclude-patterns/invoker.properties   |   2 +-
 .../exclude-patterns/nottoexclude}/dummy.file      |   0
 .../src/it/projects/exclude-patterns/pom.xml       |   0
 .../src/it/projects/exclude-patterns/verify.groovy |  11 +-
 .../archetype.properties                           |   0
 .../invoker.properties                             |   2 +-
 .../include-file-with-no-extension/pom.xml         |   0
 .../src/main/csharp/filewithnoextension            |   0
 .../include-file-with-no-extension/verify.groovy   |   7 +-
 .../archetype.properties                           |   0
 .../included-system-properties/invoker.properties  |   2 +-
 .../included-system-properties/pom-parent.xml      |   0
 .../it/projects/included-system-properties/pom.xml |   2 +-
 .../src/main/java/App.java                         |   0
 .../included-system-properties/verify.groovy       |   7 +-
 .../mojos/CreateArchetypeFromProjectMojo.java      |   2 +-
 .../DefaultArchetypeCreationConfigurator.java      |   2 +-
 105 files changed, 284 insertions(+), 638 deletions(-)

diff --git a/archetype-testing/archetype-final/src/test/java/org/apache/maven/archetype/creator/DefaultArchetypeCreatorIT.java b/archetype-testing/archetype-final/src/test/java/org/apache/maven/archetype/creator/DefaultArchetypeCreatorIT.java
deleted file mode 100644
index 4ad9d2c..0000000
--- a/archetype-testing/archetype-final/src/test/java/org/apache/maven/archetype/creator/DefaultArchetypeCreatorIT.java
+++ /dev/null
@@ -1,536 +0,0 @@
-package org.apache.maven.archetype.creator;
-
-/*
- * 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.
- */
-
-import org.apache.maven.archetype.ArchetypeCreationRequest;
-import org.apache.maven.archetype.ArchetypeCreationResult;
-import org.apache.maven.archetype.common.Constants;
-import org.apache.maven.artifact.repository.DefaultArtifactRepository;
-import org.apache.maven.artifact.repository.layout.DefaultRepositoryLayout;
-import org.apache.maven.plugin.testing.AbstractMojoTestCase;
-import org.apache.maven.project.DefaultProjectBuildingRequest;
-import org.apache.maven.project.MavenProject;
-import org.apache.maven.project.ProjectBuilder;
-import org.apache.maven.project.ProjectBuildingRequest;
-//import org.apache.maven.project.MavenProjectBuildingResult;
-import org.apache.maven.repository.internal.MavenRepositorySystemSession;
-import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.PropertyUtils;
-import org.codehaus.plexus.util.StringUtils;
-import org.sonatype.aether.impl.internal.SimpleLocalRepositoryManager;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
-public class DefaultArchetypeCreatorIT
-    extends AbstractMojoTestCase
-{
-    private List<String> filtereds;
-
-    private List<String> languages;
-
-    private DefaultArtifactRepository localRepository;
-
-    protected void createFilesetArchetype( String project )
-        throws Exception
-    {
-        System.out.println( ">>>>>> testCreateFilesetArchetype( \"" + project + "\" )" );
-
-        ProjectBuilder builder = lookup( ProjectBuilder.class );
-
-        File projectFile = getProjectFile( project );
-
-        File projectFileSample = getProjectSampleFile( project );
-
-        copy( projectFileSample, projectFile );
-
-        FileUtils.deleteDirectory( new File( projectFile.getParentFile(), "target" ) );
-
-        File propertyFile = getPropertiesFile( project );
-
-        File propertyFileSample = getPropertiesSampleFile( project );
-
-        copy( propertyFileSample, propertyFile );
-
-        Properties p = PropertyUtils.loadProperties( propertyFile );
-
-        ProjectBuildingRequest buildingRequest = new DefaultProjectBuildingRequest();
-        buildingRequest.setLocalRepository( localRepository );
-        buildingRequest.setSystemProperties(System.getProperties());
-        MavenRepositorySystemSession repositorySession = new MavenRepositorySystemSession();
-        repositorySession.setLocalRepositoryManager( new SimpleLocalRepositoryManager(localRepository.getBasedir() ) );
-        buildingRequest.setRepositorySession(repositorySession);
-
-        MavenProject mavenProject = builder.build( projectFile, buildingRequest ).getProject();
-
-        FilesetArchetypeCreator instance =
-            (FilesetArchetypeCreator) lookup( ArchetypeCreator.class.getName(), "fileset" );
-
-        languages = new ArrayList<String>();
-        languages.add( "java" );
-        languages.add( "aspectj" );
-        languages.add( "csharp" );
-        languages.add( "groovy" );
-        languages.add( "resources" );
-
-        filtereds = new ArrayList<String>();
-        filtereds.add( "java" );
-        filtereds.add( "xml" );
-        filtereds.add( "txt" );
-        filtereds.add( "groovy" );
-        filtereds.add( "cs" );
-        filtereds.add( "mdo" );
-        filtereds.add( "aj" );
-        filtereds.add( "jsp" );
-        filtereds.add( "js" );
-        filtereds.add( "gsp" );
-        filtereds.add( "vm" );
-        filtereds.add( "html" );
-        filtereds.add( "xhtml" );
-        filtereds.add( "properties" );
-        filtereds.add( ".classpath" );
-        filtereds.add( ".project" );
-        filtereds.add( "MF" );
-
-        ArchetypeCreationRequest request = new ArchetypeCreationRequest()
-            .setProject( mavenProject )
-            .setPackageName( p.getProperty( Constants.PACKAGE ) )
-            .setProperties( p )
-            .setLanguages( languages )
-            .setFiltereds( filtereds )
-            .setDefaultEncoding( "UTF-8" )
-            .setPartialArchetype( false )
-            .setPreserveCData( false )
-            .setKeepParent( false )
-            .setPostPhase( "verify" )
-            .setLocalRepository( localRepository )
-            .setProjectBuildingRequest( buildingRequest );
-
-        ArchetypeCreationResult result = new ArchetypeCreationResult();
-
-        instance.createArchetype( request, result );
-
-        if ( result.getCause() != null )
-        {
-            throw result.getCause();
-        }
-
-        System.out.println( "<<<<<< testCreateFilesetArchetype( \"" + project + "\" )" );
-    }
-
-    public void testChangeJavaFilenameWhenCustomPropertyEqualsClassName()
-        throws Exception
-    {
-        String project = "change-file-with-property";
-
-        createFilesetArchetype( project );
-
-        File template = getTemplateFile( project, "src/main/java/__someProperty__.java" );
-        assertExists( template );
-		assertContent( template, "class ${someProperty}" );
-    }
-
-    public void testExcludePatternsMustExcludeDirectory()
-        throws Exception
-    {
-        String project = "exclude-patterns";
-
-        createFilesetArchetype( project );
-
-        File template = getTemplateFile( project, ".toexclude/dummy.file");
-        assertNotExists(template);
-
-        File template1 = getTemplateFile( project, "nottoexclude/dummy.file" );
-        assertExists(template1);
-    }
-
-    public void testExcludePatternsContainingFilesSameExtension()
-        throws Exception
-    {
-        String project = "exclude-patterns-2";
-
-        createFilesetArchetype( project );
-
-        assertNotExists( getTemplateFile( project, ".sonar/file.txt" ) );
-        assertNotExists( getTemplateFile( project, "folder/.sonar/file.txt" ) );
-        assertExists( getTemplateFile( project, "folder/file.txt" ) );
-    }
-
-    public void testIncludeFileWithNoExtension()
-                    throws Exception
-    {
-        String project = "include-file-with-no-extension";
-
-        createFilesetArchetype( project );
-
-        File template1 = getTemplateFile( project, "src/main/csharp/filewithnoextension" );
-        assertExists(template1);
-    }
-
-    public void testSystemPropertiesAreIncluded()
-                    throws Exception
-    {
-        String project = "included-system-properties";
-
-        createFilesetArchetype( project );
-
-        File template1 = getTemplateFile( project, "src/main/java/App.java" );
-        assertExists(template1);
-    }
-
-    public void testCreateFilesetArchetype1()
-        throws Exception
-    {
-        String project = "create-1";
-
-        createFilesetArchetype( project );
-
-        File template = getTemplateFile( project, "src/main/java/subfolder1/App.java" );
-        assertExists( template );
-        assertContent( template, "// ${someProperty}" );
-        assertContent( template, "package ${package}.subfolder1;" );
-        assertNotContent( template, "${packageInPathFormat}" );
-    }
-
-    public void testCreateFilesetArchetype2()
-        throws Exception
-    {
-        String project = "create-2";
-
-        createFilesetArchetype( project );
-    }
-
-    public void testCreateFilesetArchetype3()
-        throws Exception
-    {
-        String project = "create-3";
-
-        createFilesetArchetype( project );
-
-        File template = getTemplateFile( project, "pom.xml" );
-        assertExists( template );
-        assertContent( template, "${groupId}" );
-        assertContent( template, "${artifactId}" );
-        assertContent( template, "${version}" );
-        assertContent( template, "Maven archetype Test create-3" );
-        assertContent( template, "<packaging>pom</packaging>" );
-        assertNotContent( template, "<parent>" );
-
-        template = getTemplateFile( project, "src/site/site.xml" );
-        assertExists( template );
-        assertContent( template, "<!-- ${packageInPathFormat}/test" );
-        assertContent( template, "${someProperty} -->" );
-
-        template = getTemplateFile( project, "src/site/resources/site.png" );
-        assertExists( template );
-        assertNotContent( template, "${someProperty}" );
-
-        template = getTemplateFile( project, ".classpath" );
-        assertExists( template );
-        assertContent( template, "${someProperty}" );
-
-        template = getTemplateFile( project, "profiles.xml" );
-        assertExists( template );
-        assertContent( template, "<!-- ${packageInPathFormat}/test" );
-        assertContent( template, "${someProperty} -->" );
-
-        template = getTemplateFile( project, "libs/pom.xml" );
-        assertExists( template );
-        assertContent( template, "${groupId}" );
-        assertContent( template, "${artifactId}" );
-        assertContent( template, "${version}" );
-        assertContent( template, "Maven archetype Test create-3-libraries" );
-        assertContent( template, "<packaging>pom</packaging>" );
-        assertContent( template, "<parent>" );
-
-        template = getTemplateFile( project, "libs/prj-a/pom.xml" );
-        assertExists( template );
-        assertContent( template, "${groupId}" );
-        assertContent( template, "${artifactId}" );
-        assertContent( template, "${version}" );
-        assertContent( template, "Maven archetype Test create-3-libraries-project-a" );
-        assertNotContent( template, "<packaging>pom</packaging>" );
-        assertContent( template, "<parent>" );
-
-        template = getTemplateFile( project, "libs/prj-a/src/main/mdo/descriptor.xml" );
-        assertExists( template );
-        assertContent( template, "<!-- ${packageInPathFormat}/test" );
-        assertContent( template, "${someProperty} -->" );
-
-        template = getTemplateFile( project, "libs/prj-b/pom.xml" );
-        assertExists( template );
-        assertContent( template, "${groupId}" );
-        assertContent( template, "${artifactId}" );
-        assertContent( template, "${version}" );
-        assertContent( template, "Maven archetype Test create-3-libraries-project-b" );
-        assertNotContent( template, "<packaging>pom</packaging>" );
-        assertContent( template, "<parent>" );
-
-        template = getTemplateFile( project, "libs/prj-b/src/main/java/test/com/Component.java" );
-        assertExists( template );
-        assertContent( template, "${someProperty}" );
-        assertContent( template, "${package}" );
-        assertContent( template, "${packageInPathFormat}" );
-
-        template = getTemplateFile( project, "libs/prj-b/src/main/java/test/com/package.html" );
-        assertExists( template );
-        assertContent( template, "<!-- ${packageInPathFormat}/test" );
-        assertContent( template, "${someProperty} -->" );
-
-        template = getTemplateFile( project, "libs/prj-b/src/test/java/test/common/ComponentTest.java" );
-        assertExists( template );
-        assertContent( template, "${someProperty}" );
-        assertContent( template, "${package}" );
-        assertContent( template, "${packageInPathFormat}" );
-
-        template = getTemplateFile( project, "application/pom.xml" );
-        assertExists( template );
-        assertContent( template, "${groupId}" );
-        assertContent( template, "${artifactId}" );
-        assertContent( template, "${version}" );
-        assertContent( template, "Maven archetype Test create-3-application" );
-        assertNotContent( template, "<packaging>pom</packaging>" );
-        assertContent( template, "<parent>" );
-
-        template = getTemplateFile( project, "application/src/main/java/Main.java" );
-        assertExists( template );
-        assertContent( template, "${someProperty}" );
-        assertNotContent( template, "${package}" );
-        assertContent( template, "${packageInPathFormat}/test" );
-
-        template = getTemplateFile( project, "application/src/main/java/test/application/Application.java" );
-        assertExists( template );
-        assertContent( template, "${someProperty}" );
-        assertContent( template, "${package}" );
-        assertContent( template, "${packageInPathFormat}" );
-
-        template = getTemplateFile( project, "application/src/main/java/test/application/audios/Application.ogg" );
-        assertExists( template );
-        assertNotContent( template, "${someProperty}" );
-
-        template = getTemplateFile( project, "application/src/main/java/test/application/images/Application.png" );
-        assertExists( template );
-        assertNotContent( template, "${someProperty}" );
-
-        template = getTemplateFile( project, "application/src/main/resources/log4j.properties" );
-        assertExists( template );
-        assertContent( template, "${someProperty}" );
-        assertNotContent( template, "${package}" );
-        assertContent( template, "${packageInPathFormat}/test" );
-
-        template = getTemplateFile( project, "application/src/main/resources/META-INF/MANIFEST.MF" );
-        assertExists( template );
-        assertContent( template, "${someProperty}" );
-        assertNotContent( template, "${package}" );
-        assertContent( template, "${packageInPathFormat}/test" );
-
-        template = getTemplateFile( project, "application/src/main/resources/test/application/some/Gro.groovy" );
-        assertExists( template );
-        assertContent( template, "${someProperty}" );
-        assertNotContent( template, "${package}" );
-        assertContent( template, "${packageInPathFormat}/test" );
-
-        template = getTemplateFile( project, "application/src/main/resources/splash.png" );
-        assertExists( template );
-        assertNotContent( template, "${someProperty}" );
-
-        template = getTemplateFile( project, "application/src/test/java/TestAll.java" );
-        assertExists( template );
-        assertContent( template, "${someProperty}" );
-        assertNotContent( template, "${package}" );
-        assertContent( template, "${packageInPathFormat}/test" );
-
-        template = getTemplateFile( project, "application/src/test/java/test/application/ApplicationTest.java" );
-        assertExists( template );
-        assertContent( template, "${someProperty}" );
-        assertContent( template, "package ${package}.test.application;" );
-        assertContent( template, "${packageInPathFormat}/test/application" );
-
-        template = getTemplateFile( project, "application/src/it-test/java/test/ItTest1.java" );
-        assertExists( template );
-        assertContent( template, "${someProperty}" );
-        assertContent( template, "package ${package}.test;" );
-        assertContent( template, "${packageInPathFormat}/test" );
-
-        template = getTemplateFile( project, "application/src/it-test/java/ItTestAll.java" );
-        assertExists( template );
-        assertContent( template, "${someProperty}" );
-        assertNotContent( template, "${package}" );
-        assertContent( template, "${packageInPathFormat}/test" );
-
-        template = getTemplateFile( project, "application/src/it-test/resources/ItTest1Result.txt" );
-        assertExists( template );
-        assertContent( template, "${someProperty}" );
-        assertNotContent( template, "${package}" );
-        assertContent( template, "${packageInPathFormat}/test" );
-    }
-
-    public void testCreateFilesetArchetype4()
-            throws Exception
-    {
-        String project = "create-4";
-
-        createFilesetArchetype( project );
-
-        File template = getTemplateFile( project, "pom.xml" );
-        assertExists( template );
-        assertContent( template, "Maven archetype Test create-4 ${someProperty}" );
-        assertContent( template, "<packaging>pom</packaging>" );
-
-        File earTemplate = getTemplateFile( project, "subModuleEAR/pom.xml" );
-        assertExists( earTemplate );
-        assertContent( earTemplate, "${groupId}" );
-        assertContent( earTemplate, "${artifactId}" );
-        assertContent( earTemplate, "${version}" );
-        assertContent( earTemplate, "Maven archetype Test create-4-subModuleEAR" );
-        assertContent( earTemplate, "<packaging>ear</packaging>" );
-        assertContent( earTemplate, "<parent>" );
-
-        File warTemplate = getTemplateFile( project, "subModuleWar/pom.xml" );
-        assertExists( warTemplate );
-        assertContent( warTemplate, "${groupId}" );
-        assertContent( warTemplate, "${artifactId}" );
-        assertContent( warTemplate, "${version}" );
-        assertContent( warTemplate, "Maven archetype Test create-4-subModuleWar ${someProperty}" );
-        assertContent( warTemplate, "<packaging>war</packaging>" );
-        assertContent( warTemplate, "<parent>" );
-    }
-
-    public void testCreateFilesetArchetype5()
-        throws Exception
-    {
-        String project = "create-5";
-
-        createFilesetArchetype( project );
-
-        File template = getTemplateFile( project, "dummy.file" );
-        assertExists( template );
-    }
-
-    /**
-     * A test-case for ARCHETYPE-524
-     *
-     * @throws Exception
-     */
-    public void testCreateFilesetArchetype6()
-                    throws Exception
-    {
-        String project = "create-6";
-
-        createFilesetArchetype( project );
-
-        assertExists( getTemplateFile( project, "src/main/webapp/resources/__artifactId__/a.jsp" ) );
-        assertExists( getTemplateFile( project, "src/main/webapp/resources/__artifactId__/a.gif" ) );
-    }
-    
-    @Override
-    protected void tearDown()
-        throws Exception
-    {
-        super.tearDown();
-    }
-
-    @Override
-    protected void setUp()
-        throws Exception
-    {
-        super.setUp();
-
-        localRepository = new DefaultArtifactRepository( "local",
-           new File( getBasedir(), "target/test-classes/repositories/local" ).toURI().toString(),
-           new DefaultRepositoryLayout() );
-    }
-
-    private void assertContent( File template, String content )
-        throws FileNotFoundException, IOException
-    {
-        String templateContent = FileUtils.fileRead( template, "UTF-8" );
-        assertTrue( "File " + template + " does not contain " + content,
-                    StringUtils.countMatches( templateContent, content ) > 0 );
-    }
-
-    private void assertExists( File file )
-    {
-        assertTrue( "File doesn't exist: " + file.getAbsolutePath(), file.exists() );
-    }
-
-    private void assertNotContent( File template, String content )
-        throws FileNotFoundException, IOException
-    {
-        String templateContent = FileUtils.fileRead( template, "UTF-8" );
-        assertFalse( "File " + template + " contains " + content,
-                     StringUtils.countMatches( templateContent, content ) > 0 );
-    }
-
-    private void copy( File in, File out )
-        throws IOException, FileNotFoundException
-    {
-        assertTrue( !out.exists() || out.delete() );
-        assertFalse( out.exists() );
-        FileUtils.copyFile( in, out );
-        assertTrue( out.exists() );
-        assertTrue( in.exists() );
-    }
-
-    private File getDescriptorFile( String project )
-    {
-        return getFile( project, "target/generated-sources/archetype/src/main/resources/META-INF/maven/archetype.xml" );
-    }
-
-    private void assertNotExists( File file )
-    {
-        assertFalse( "File exists: " + file.getAbsolutePath(), file.exists() );
-    }
-
-    private File getFile( String project, String file )
-    {
-        return new File( getBasedir(), "target/test-classes/projects/" + project + "/" + file );
-    }
-
-    private File getProjectFile( String project )
-    {
-        return getFile( project, "pom.xml" );
-    }
-
-    private File getProjectSampleFile( String project )
-    {
-        return getFile( project, "pom.xml.sample" );
-    }
-
-    private File getPropertiesFile( String project )
-    {
-        return getFile( project, "archetype.properties" );
-    }
-
-    private File getPropertiesSampleFile( final String project )
-    {
-        return getFile( project, "archetype.properties.sample" );
-    }
-
-    private File getTemplateFile( String project, String template )
-    {
-        return getFile( project, "target/generated-sources/archetype/src/main/resources/archetype-resources/"
-            + template );
-    }
-}
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/.classpath b/archetype-testing/archetype-final/src/test/resources/projects/create-3/.classpath
deleted file mode 100644
index 807b540..0000000
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-3/.classpath
+++ /dev/null
@@ -1,2 +0,0 @@
-org/apache/maven/archetype/test
-A String to search for
\ No newline at end of file
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/profiles.xml b/archetype-testing/archetype-final/src/test/resources/projects/create-3/profiles.xml
deleted file mode 100644
index db3630e..0000000
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-3/profiles.xml
+++ /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.
-  -->
-<!-- org/apache/maven/archetype/test
-A String to search for -->
-<profilesXml>
-</profilesXml>
diff --git a/maven-archetype-plugin/pom.xml b/maven-archetype-plugin/pom.xml
index 98cbaaf..17d2823 100644
--- a/maven-archetype-plugin/pom.xml
+++ b/maven-archetype-plugin/pom.xml
@@ -136,6 +136,19 @@
   <build>
     <plugins>
       <plugin>
+        <groupId>org.apache.rat</groupId>
+        <artifactId>apache-rat-plugin</artifactId>
+        <configuration>
+          <excludes combine.children="append">
+            <exclude>src/it/projects/**/.checkstyle</exclude>
+            <exclude>src/it/projects/**/.classpath</exclude>
+            <exclude>src/it/projects/**/dummy</exclude>
+            <exclude>src/it/projects/**/META-INF/MANIFEST.MF</exclude>
+            <exclude>src/it/projects/**/*.ogg</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-plugin-plugin</artifactId>
         <executions>
@@ -276,34 +289,5 @@
         </plugins>
       </build>
     </profile>
-    <profile>
-      <id>maven-2</id>
-      <activation>
-        <file>
-          <!--  This employs that the basedir expression is only recognized by Maven 3.x (see MNG-2363) -->
-          <missing>${basedir}</missing>
-        </file>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-plugin-plugin</artifactId>
-            <configuration>
-              <!-- see http://jira.codehaus.org/browse/MNG-5346 -->
-              <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
-            </configuration>
-            <executions>
-              <execution>
-                <id>mojo-descriptor</id>
-                <goals><!-- Maven 2 does not support phase overriding: need to add an execution -->
-                  <goal>descriptor</goal>
-                </goals>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>    
   </profiles>
 </project>
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/change-file-with-property/archetype.properties.sample b/maven-archetype-plugin/src/it/projects/change-file-with-property/archetype.properties
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/change-file-with-property/archetype.properties.sample
rename to maven-archetype-plugin/src/it/projects/change-file-with-property/archetype.properties
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties b/maven-archetype-plugin/src/it/projects/change-file-with-property/invoker.properties
similarity index 88%
copy from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
copy to maven-archetype-plugin/src/it/projects/change-file-with-property/invoker.properties
index 105b612..97ce30e 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
+++ b/maven-archetype-plugin/src/it/projects/change-file-with-property/invoker.properties
@@ -15,4 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-#org.apache.maven.archetype
+invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/change-file-with-property/pom.xml.sample b/maven-archetype-plugin/src/it/projects/change-file-with-property/pom.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/change-file-with-property/pom.xml.sample
rename to maven-archetype-plugin/src/it/projects/change-file-with-property/pom.xml
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/change-file-with-property/src/main/java/App.java b/maven-archetype-plugin/src/it/projects/change-file-with-property/src/main/java/App.java
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/change-file-with-property/src/main/java/App.java
rename to maven-archetype-plugin/src/it/projects/change-file-with-property/src/main/java/App.java
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java b/maven-archetype-plugin/src/it/projects/change-file-with-property/verify.groovy
similarity index 75%
copy from archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
copy to maven-archetype-plugin/src/it/projects/change-file-with-property/verify.groovy
index 9dee189..e151922 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
+++ b/maven-archetype-plugin/src/it/projects/change-file-with-property/verify.groovy
@@ -1,5 +1,3 @@
-package org.apache.maven.archetype.test.common;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -19,5 +17,8 @@ package org.apache.maven.archetype.test.common;
  * under the License.
  */
 
-org/apache/maven/archetype/test/common
-A String to search for
\ No newline at end of file
+def templateDir = new File(basedir, 'target/generated-sources/archetype/src/main/resources/archetype-resources')
+
+template = new File(templateDir, 'src/main/java/__someProperty__.java')
+assert template.exists()
+assert template.text.contains('class ${someProperty}')
\ No newline at end of file
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-1/archetype.properties.sample b/maven-archetype-plugin/src/it/projects/create-1/archetype.properties
similarity index 91%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-1/archetype.properties.sample
rename to maven-archetype-plugin/src/it/projects/create-1/archetype.properties
index fab6f4f..49f78bd 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-1/archetype.properties.sample
+++ b/maven-archetype-plugin/src/it/projects/create-1/archetype.properties
@@ -18,6 +18,8 @@
 archetype.groupId=org.codehaus.mojo.archetypes
 archetype.artifactId=maven-archetype-test
 archetype.version=1.0
+archetype.languages=java
+archetype.filteredExtensions=java
 groupId=org.apache.maven.archetype.test
 artifactId=test-create-1
 version=1.0-SNAPSHOT
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties b/maven-archetype-plugin/src/it/projects/create-1/invoker.properties
similarity index 88%
copy from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
copy to maven-archetype-plugin/src/it/projects/create-1/invoker.properties
index 105b612..97ce30e 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
+++ b/maven-archetype-plugin/src/it/projects/create-1/invoker.properties
@@ -15,4 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-#org.apache.maven.archetype
+invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-1/pom.xml.sample b/maven-archetype-plugin/src/it/projects/create-1/pom.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-1/pom.xml.sample
rename to maven-archetype-plugin/src/it/projects/create-1/pom.xml
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-1/src/main/java/archetype/subfolder1/App.java b/maven-archetype-plugin/src/it/projects/create-1/src/main/java/archetype/subfolder1/App.java
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-1/src/main/java/archetype/subfolder1/App.java
rename to maven-archetype-plugin/src/it/projects/create-1/src/main/java/archetype/subfolder1/App.java
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-1/src/main/java/archetype/subfolder2/App.java b/maven-archetype-plugin/src/it/projects/create-1/src/main/java/archetype/subfolder2/App.java
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-1/src/main/java/archetype/subfolder2/App.java
rename to maven-archetype-plugin/src/it/projects/create-1/src/main/java/archetype/subfolder2/App.java
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-1/src/test/resources/log4j.properties b/maven-archetype-plugin/src/it/projects/create-1/src/main/resources/log4j.properties
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-1/src/test/resources/log4j.properties
rename to maven-archetype-plugin/src/it/projects/create-1/src/main/resources/log4j.properties
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-1/src/main/webapp/WEB-INF/web.xml b/maven-archetype-plugin/src/it/projects/create-1/src/main/webapp/WEB-INF/web.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-1/src/main/webapp/WEB-INF/web.xml
rename to maven-archetype-plugin/src/it/projects/create-1/src/main/webapp/WEB-INF/web.xml
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-1/src/site/site.xml b/maven-archetype-plugin/src/it/projects/create-1/src/site/site.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-1/src/site/site.xml
rename to maven-archetype-plugin/src/it/projects/create-1/src/site/site.xml
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-1/src/test/java/archetype/test/AppTest.java b/maven-archetype-plugin/src/it/projects/create-1/src/test/java/archetype/test/AppTest.java
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-1/src/test/java/archetype/test/AppTest.java
rename to maven-archetype-plugin/src/it/projects/create-1/src/test/java/archetype/test/AppTest.java
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-1/src/main/resources/log4j.properties b/maven-archetype-plugin/src/it/projects/create-1/src/test/resources/log4j.properties
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-1/src/main/resources/log4j.properties
rename to maven-archetype-plugin/src/it/projects/create-1/src/test/resources/log4j.properties
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java b/maven-archetype-plugin/src/it/projects/create-1/verify.groovy
similarity index 68%
copy from archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
copy to maven-archetype-plugin/src/it/projects/create-1/verify.groovy
index 9dee189..90c0743 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
+++ b/maven-archetype-plugin/src/it/projects/create-1/verify.groovy
@@ -1,5 +1,3 @@
-package org.apache.maven.archetype.test.common;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -19,5 +17,11 @@ package org.apache.maven.archetype.test.common;
  * under the License.
  */
 
-org/apache/maven/archetype/test/common
-A String to search for
\ No newline at end of file
+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/archetype-testing/archetype-final/src/test/resources/projects/create-2/archetype.properties.sample b/maven-archetype-plugin/src/it/projects/create-2/archetype.properties
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-2/archetype.properties.sample
rename to maven-archetype-plugin/src/it/projects/create-2/archetype.properties
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties b/maven-archetype-plugin/src/it/projects/create-2/invoker.properties
similarity index 88%
copy from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
copy to maven-archetype-plugin/src/it/projects/create-2/invoker.properties
index 105b612..97ce30e 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
+++ b/maven-archetype-plugin/src/it/projects/create-2/invoker.properties
@@ -15,4 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-#org.apache.maven.archetype
+invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/pom.xml.sample b/maven-archetype-plugin/src/it/projects/create-2/pom.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-2/pom.xml.sample
rename to maven-archetype-plugin/src/it/projects/create-2/pom.xml
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/main/java/org/apache/maven/archetype/subfolder1/App.java b/maven-archetype-plugin/src/it/projects/create-2/src/it-test/java/org/apache/maven/archetype/subfolder1/App.java
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/main/java/org/apache/maven/archetype/subfolder1/App.java
rename to maven-archetype-plugin/src/it/projects/create-2/src/it-test/java/org/apache/maven/archetype/subfolder1/App.java
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/main/java/org/apache/maven/archetype/subfolder2/App.java b/maven-archetype-plugin/src/it/projects/create-2/src/it-test/java/org/apache/maven/archetype/subfolder2/App.java
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/main/java/org/apache/maven/archetype/subfolder2/App.java
rename to maven-archetype-plugin/src/it/projects/create-2/src/it-test/java/org/apache/maven/archetype/subfolder2/App.java
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/test/resources/log4j.properties b/maven-archetype-plugin/src/it/projects/create-2/src/it-test/resources/log4j.properties
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/test/resources/log4j.properties
rename to maven-archetype-plugin/src/it/projects/create-2/src/it-test/resources/log4j.properties
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/java/org/apache/maven/archetype/subfolder1/App.java b/maven-archetype-plugin/src/it/projects/create-2/src/main/java/org/apache/maven/archetype/subfolder1/App.java
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/java/org/apache/maven/archetype/subfolder1/App.java
rename to maven-archetype-plugin/src/it/projects/create-2/src/main/java/org/apache/maven/archetype/subfolder1/App.java
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/java/org/apache/maven/archetype/subfolder2/App.java b/maven-archetype-plugin/src/it/projects/create-2/src/main/java/org/apache/maven/archetype/subfolder2/App.java
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/java/org/apache/maven/archetype/subfolder2/App.java
rename to maven-archetype-plugin/src/it/projects/create-2/src/main/java/org/apache/maven/archetype/subfolder2/App.java
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/main/resources/log4j.properties b/maven-archetype-plugin/src/it/projects/create-2/src/main/resources/log4j.properties
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/main/resources/log4j.properties
rename to maven-archetype-plugin/src/it/projects/create-2/src/main/resources/log4j.properties
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/main/webapp/WEB-INF/web.xml b/maven-archetype-plugin/src/it/projects/create-2/src/main/webapp/WEB-INF/web.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/main/webapp/WEB-INF/web.xml
rename to maven-archetype-plugin/src/it/projects/create-2/src/main/webapp/WEB-INF/web.xml
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/site/site.xml b/maven-archetype-plugin/src/it/projects/create-2/src/site/site.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/site/site.xml
rename to maven-archetype-plugin/src/it/projects/create-2/src/site/site.xml
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/test/java/org/apache/maven/archetype/test/AppTest.java b/maven-archetype-plugin/src/it/projects/create-2/src/test/java/org/apache/maven/archetype/test/AppTest.java
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/test/java/org/apache/maven/archetype/test/AppTest.java
rename to maven-archetype-plugin/src/it/projects/create-2/src/test/java/org/apache/maven/archetype/test/AppTest.java
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties b/maven-archetype-plugin/src/it/projects/create-2/src/test/resources/log4j.properties
similarity index 100%
copy from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
copy to maven-archetype-plugin/src/it/projects/create-2/src/test/resources/log4j.properties
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/subModule/pom.xml b/maven-archetype-plugin/src/it/projects/create-2/subModule/pom.xml
similarity index 96%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-2/subModule/pom.xml
rename to maven-archetype-plugin/src/it/projects/create-2/subModule/pom.xml
index 9ebc355..1322ea6 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-2/subModule/pom.xml
+++ b/maven-archetype-plugin/src/it/projects/create-2/subModule/pom.xml
@@ -30,7 +30,7 @@
     <version>1.0-SNAPSHOT</version>
   </parent>
 
-  <artifactId>test-create-2</artifactId>
+  <artifactId>test-create-2-subModule</artifactId>
   <name>Maven archetype Test create-2-subModule</name>
   <packaging>pom</packaging>
 
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/application/pom.xml b/maven-archetype-plugin/src/it/projects/create-3/application/pom.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/application/pom.xml
rename to maven-archetype-plugin/src/it/projects/create-3/application/pom.xml
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/it-test/java/ItTestAll.java b/maven-archetype-plugin/src/it/projects/create-3/application/src/it-test/java/ItTestAll.java
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/it-test/java/ItTestAll.java
rename to maven-archetype-plugin/src/it/projects/create-3/application/src/it-test/java/ItTestAll.java
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/it-test/java/org/apache/maven/archetype/test/ItTest1.java b/maven-archetype-plugin/src/it/projects/create-3/application/src/it-test/java/org/apache/maven/archetype/test/ItTest1.java
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/it-test/java/org/apache/maven/archetype/test/ItTest1.java
rename to maven-archetype-plugin/src/it/projects/create-3/application/src/it-test/java/org/apache/maven/archetype/test/ItTest1.java
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/it-test/resources/ItTest1Result.txt b/maven-archetype-plugin/src/it/projects/create-3/application/src/it-test/resources/ItTest1Result.txt
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/it-test/resources/ItTest1Result.txt
rename to maven-archetype-plugin/src/it/projects/create-3/application/src/it-test/resources/ItTest1Result.txt
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/main/java/Main.java b/maven-archetype-plugin/src/it/projects/create-3/application/src/main/java/Main.java
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/main/java/Main.java
rename to maven-archetype-plugin/src/it/projects/create-3/application/src/main/java/Main.java
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/Application.java b/maven-archetype-plugin/src/it/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/Application.java
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/Application.java
rename to maven-archetype-plugin/src/it/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/Application.java
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/audios/Application.ogg b/maven-archetype-plugin/src/it/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/audios/Application.ogg
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/audios/Application.ogg
rename to maven-archetype-plugin/src/it/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/audios/Application.ogg
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/images/Application.png b/maven-archetype-plugin/src/it/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/images/Application.png
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/images/Application.png
rename to maven-archetype-plugin/src/it/projects/create-3/application/src/main/java/org/apache/maven/archetype/test/application/images/Application.png
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/main/resources/META-INF/MANIFEST.MF b/maven-archetype-plugin/src/it/projects/create-3/application/src/main/resources/META-INF/MANIFEST.MF
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/main/resources/META-INF/MANIFEST.MF
rename to maven-archetype-plugin/src/it/projects/create-3/application/src/main/resources/META-INF/MANIFEST.MF
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/main/resources/log4j.properties b/maven-archetype-plugin/src/it/projects/create-3/application/src/main/resources/log4j.properties
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/main/resources/log4j.properties
rename to maven-archetype-plugin/src/it/projects/create-3/application/src/main/resources/log4j.properties
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/main/resources/org/apache/maven/archetype/test/application/some/Gro.groovy b/maven-archetype-plugin/src/it/projects/create-3/application/src/main/resources/org/apache/maven/archetype/test/application/some/Gro.groovy
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/main/resources/org/apache/maven/archetype/test/application/some/Gro.groovy
rename to maven-archetype-plugin/src/it/projects/create-3/application/src/main/resources/org/apache/maven/archetype/test/application/some/Gro.groovy
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/main/resources/splash.png b/maven-archetype-plugin/src/it/projects/create-3/application/src/main/resources/splash.png
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/main/resources/splash.png
rename to maven-archetype-plugin/src/it/projects/create-3/application/src/main/resources/splash.png
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/test/java/TestAll.java b/maven-archetype-plugin/src/it/projects/create-3/application/src/test/java/TestAll.java
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/test/java/TestAll.java
rename to maven-archetype-plugin/src/it/projects/create-3/application/src/test/java/TestAll.java
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/test/java/org/apache/maven/archetype/test/application/ApplicationTest.java b/maven-archetype-plugin/src/it/projects/create-3/application/src/test/java/org/apache/maven/archetype/test/application/ApplicationTest.java
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/application/src/test/java/org/apache/maven/archetype/test/application/ApplicationTest.java
rename to maven-archetype-plugin/src/it/projects/create-3/application/src/test/java/org/apache/maven/archetype/test/application/ApplicationTest.java
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/archetype.properties.sample b/maven-archetype-plugin/src/it/projects/create-3/archetype.properties
similarity index 87%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/archetype.properties.sample
rename to maven-archetype-plugin/src/it/projects/create-3/archetype.properties
index e984094..dd8d660 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-3/archetype.properties.sample
+++ b/maven-archetype-plugin/src/it/projects/create-3/archetype.properties
@@ -18,6 +18,8 @@
 archetype.groupId=org.codehaus.mojo.archetypes
 archetype.artifactId=maven-archetype-test
 archetype.version=1.0
+archetype.filteredExtensions=java,xml,txt,groovy,cs,mdo,aj,jsp,js,gsp,vm,html,xhtml,properties,MF
+archetype.languages=java,aspectj,csharp,groovy,resources
 
 groupId=org.apache.maven.archetype.test
 artifactId=test-create-3
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties b/maven-archetype-plugin/src/it/projects/create-3/invoker.properties
similarity index 88%
copy from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
copy to maven-archetype-plugin/src/it/projects/create-3/invoker.properties
index 105b612..97ce30e 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
+++ b/maven-archetype-plugin/src/it/projects/create-3/invoker.properties
@@ -15,4 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-#org.apache.maven.archetype
+invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/pom.xml b/maven-archetype-plugin/src/it/projects/create-3/libs/pom.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/pom.xml
rename to maven-archetype-plugin/src/it/projects/create-3/libs/pom.xml
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-a/pom.xml b/maven-archetype-plugin/src/it/projects/create-3/libs/prj-a/pom.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-a/pom.xml
rename to maven-archetype-plugin/src/it/projects/create-3/libs/prj-a/pom.xml
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-a/src/main/mdo/descriptor.xml b/maven-archetype-plugin/src/it/projects/create-3/libs/prj-a/src/main/mdo/descriptor.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-a/src/main/mdo/descriptor.xml
rename to maven-archetype-plugin/src/it/projects/create-3/libs/prj-a/src/main/mdo/descriptor.xml
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/pom.xml b/maven-archetype-plugin/src/it/projects/create-3/libs/prj-b/pom.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/pom.xml
rename to maven-archetype-plugin/src/it/projects/create-3/libs/prj-b/pom.xml
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/Component.java b/maven-archetype-plugin/src/it/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/Component.java
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/Component.java
rename to maven-archetype-plugin/src/it/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/Component.java
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/package.html b/maven-archetype-plugin/src/it/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/package.html
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/package.html
rename to maven-archetype-plugin/src/it/projects/create-3/libs/prj-b/src/main/java/org/apache/maven/archetype/test/com/package.html
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java b/maven-archetype-plugin/src/it/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
similarity index 100%
copy from archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
copy to maven-archetype-plugin/src/it/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/pom.xml.sample b/maven-archetype-plugin/src/it/projects/create-3/pom.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/pom.xml.sample
rename to maven-archetype-plugin/src/it/projects/create-3/pom.xml
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/src/site/apt/index.apt b/maven-archetype-plugin/src/it/projects/create-3/src/site/apt/index.apt
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/src/site/apt/index.apt
rename to maven-archetype-plugin/src/it/projects/create-3/src/site/apt/index.apt
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/src/site/resources/site.png b/maven-archetype-plugin/src/it/projects/create-3/src/site/resources/site.png
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/src/site/resources/site.png
rename to maven-archetype-plugin/src/it/projects/create-3/src/site/resources/site.png
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/src/site/site.xml b/maven-archetype-plugin/src/it/projects/create-3/src/site/site.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/src/site/site.xml
rename to maven-archetype-plugin/src/it/projects/create-3/src/site/site.xml
diff --git a/maven-archetype-plugin/src/it/projects/create-3/verify.groovy b/maven-archetype-plugin/src/it/projects/create-3/verify.groovy
new file mode 100644
index 0000000..6570d17
--- /dev/null
+++ b/maven-archetype-plugin/src/it/projects/create-3/verify.groovy
@@ -0,0 +1,168 @@
+/*
+ * 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/archetype-testing/archetype-final/src/test/resources/projects/create-4/archetype.properties.sample b/maven-archetype-plugin/src/it/projects/create-4/archetype.properties
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-4/archetype.properties.sample
rename to maven-archetype-plugin/src/it/projects/create-4/archetype.properties
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties b/maven-archetype-plugin/src/it/projects/create-4/invoker.properties
similarity index 88%
copy from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
copy to maven-archetype-plugin/src/it/projects/create-4/invoker.properties
index 105b612..97ce30e 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
+++ b/maven-archetype-plugin/src/it/projects/create-4/invoker.properties
@@ -15,4 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-#org.apache.maven.archetype
+invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-4/pom.xml.sample b/maven-archetype-plugin/src/it/projects/create-4/pom.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-4/pom.xml.sample
rename to maven-archetype-plugin/src/it/projects/create-4/pom.xml
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-4/subModuleEAR/pom.xml b/maven-archetype-plugin/src/it/projects/create-4/subModuleEAR/pom.xml
similarity index 97%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-4/subModuleEAR/pom.xml
rename to maven-archetype-plugin/src/it/projects/create-4/subModuleEAR/pom.xml
index 4d004cf..48c5586 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-4/subModuleEAR/pom.xml
+++ b/maven-archetype-plugin/src/it/projects/create-4/subModuleEAR/pom.xml
@@ -26,7 +26,7 @@
 
   <parent>
     <groupId>org.apache.maven.archetype.test</groupId>
-    <artifactId>test-create-4-ear</artifactId>
+    <artifactId>test-create-4</artifactId>
     <version>1.0-SNAPSHOT</version>
   </parent>
 
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-4/subModuleWar/pom.xml b/maven-archetype-plugin/src/it/projects/create-4/subModuleWar/pom.xml
similarity index 96%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-4/subModuleWar/pom.xml
rename to maven-archetype-plugin/src/it/projects/create-4/subModuleWar/pom.xml
index bc571f7..a2884ef 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-4/subModuleWar/pom.xml
+++ b/maven-archetype-plugin/src/it/projects/create-4/subModuleWar/pom.xml
@@ -26,7 +26,7 @@
 
   <parent>
     <groupId>org.apache.maven.archetype.test</groupId>
-    <artifactId>test-create-4-war</artifactId>
+    <artifactId>test-create-4</artifactId>
     <version>1.0-SNAPSHOT</version>
   </parent>
 
diff --git a/maven-archetype-plugin/src/it/projects/create-4/verify.groovy b/maven-archetype-plugin/src/it/projects/create-4/verify.groovy
new file mode 100644
index 0000000..7e4f46b
--- /dev/null
+++ b/maven-archetype-plugin/src/it/projects/create-4/verify.groovy
@@ -0,0 +1,43 @@
+/*
+ * 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/archetype-testing/archetype-final/src/test/resources/projects/create-5/archetype.properties.sample b/maven-archetype-plugin/src/it/projects/create-5/archetype.properties
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-5/archetype.properties.sample
rename to maven-archetype-plugin/src/it/projects/create-5/archetype.properties
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/exclude-patterns/nottoexclude/dummy.file b/maven-archetype-plugin/src/it/projects/create-5/dummy.file
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/exclude-patterns/nottoexclude/dummy.file
rename to maven-archetype-plugin/src/it/projects/create-5/dummy.file
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties b/maven-archetype-plugin/src/it/projects/create-5/invoker.properties
similarity index 88%
copy from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
copy to maven-archetype-plugin/src/it/projects/create-5/invoker.properties
index 105b612..97ce30e 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
+++ b/maven-archetype-plugin/src/it/projects/create-5/invoker.properties
@@ -15,4 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-#org.apache.maven.archetype
+invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-5/pom.xml.sample b/maven-archetype-plugin/src/it/projects/create-5/pom.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-5/pom.xml.sample
rename to maven-archetype-plugin/src/it/projects/create-5/pom.xml
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java b/maven-archetype-plugin/src/it/projects/create-5/verify.groovy
similarity index 81%
copy from archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
copy to maven-archetype-plugin/src/it/projects/create-5/verify.groovy
index 9dee189..cbff574 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
+++ b/maven-archetype-plugin/src/it/projects/create-5/verify.groovy
@@ -1,5 +1,3 @@
-package org.apache.maven.archetype.test.common;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -19,5 +17,7 @@ package org.apache.maven.archetype.test.common;
  * under the License.
  */
 
-org/apache/maven/archetype/test/common
-A String to search for
\ No newline at end of file
+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/archetype-testing/archetype-final/src/test/resources/projects/create-6/archetype.properties.sample b/maven-archetype-plugin/src/it/projects/create-6/archetype.properties
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-6/archetype.properties.sample
rename to maven-archetype-plugin/src/it/projects/create-6/archetype.properties
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties b/maven-archetype-plugin/src/it/projects/create-6/invoker.properties
similarity index 88%
copy from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
copy to maven-archetype-plugin/src/it/projects/create-6/invoker.properties
index 105b612..97ce30e 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
+++ b/maven-archetype-plugin/src/it/projects/create-6/invoker.properties
@@ -15,4 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-#org.apache.maven.archetype
+invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-6/pom.xml.sample b/maven-archetype-plugin/src/it/projects/create-6/pom.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-6/pom.xml.sample
rename to maven-archetype-plugin/src/it/projects/create-6/pom.xml
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-6/src/main/webapp/resources/create-6/a.gif b/maven-archetype-plugin/src/it/projects/create-6/src/main/webapp/resources/create-6/a.gif
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-6/src/main/webapp/resources/create-6/a.gif
rename to maven-archetype-plugin/src/it/projects/create-6/src/main/webapp/resources/create-6/a.gif
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-6/src/main/webapp/resources/create-6/a.jsp b/maven-archetype-plugin/src/it/projects/create-6/src/main/webapp/resources/create-6/a.jsp
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-6/src/main/webapp/resources/create-6/a.jsp
rename to maven-archetype-plugin/src/it/projects/create-6/src/main/webapp/resources/create-6/a.jsp
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java b/maven-archetype-plugin/src/it/projects/create-6/verify.groovy
similarity index 74%
copy from archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
copy to maven-archetype-plugin/src/it/projects/create-6/verify.groovy
index 9dee189..adf1270 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
+++ b/maven-archetype-plugin/src/it/projects/create-6/verify.groovy
@@ -1,5 +1,3 @@
-package org.apache.maven.archetype.test.common;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -19,5 +17,7 @@ package org.apache.maven.archetype.test.common;
  * under the License.
  */
 
-org/apache/maven/archetype/test/common
-A String to search for
\ No newline at end of file
+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/archetype-testing/archetype-final/src/test/resources/projects/exclude-patterns-2/folder/file.txt b/maven-archetype-plugin/src/it/projects/exclude-patterns-2/.sonar/file.txt
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/exclude-patterns-2/folder/file.txt
rename to maven-archetype-plugin/src/it/projects/exclude-patterns-2/.sonar/file.txt
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/exclude-patterns-2/archetype.properties.sample b/maven-archetype-plugin/src/it/projects/exclude-patterns-2/archetype.properties
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/exclude-patterns-2/archetype.properties.sample
rename to maven-archetype-plugin/src/it/projects/exclude-patterns-2/archetype.properties
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/exclude-patterns-2/folder/.sonar/file.txt b/maven-archetype-plugin/src/it/projects/exclude-patterns-2/folder/.sonar/file.txt
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/exclude-patterns-2/folder/.sonar/file.txt
rename to maven-archetype-plugin/src/it/projects/exclude-patterns-2/folder/.sonar/file.txt
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/exclude-patterns-2/.sonar/file.txt b/maven-archetype-plugin/src/it/projects/exclude-patterns-2/folder/file.txt
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/exclude-patterns-2/.sonar/file.txt
rename to maven-archetype-plugin/src/it/projects/exclude-patterns-2/folder/file.txt
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties b/maven-archetype-plugin/src/it/projects/exclude-patterns-2/invoker.properties
similarity index 88%
copy from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
copy to maven-archetype-plugin/src/it/projects/exclude-patterns-2/invoker.properties
index 105b612..97ce30e 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
+++ b/maven-archetype-plugin/src/it/projects/exclude-patterns-2/invoker.properties
@@ -15,4 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-#org.apache.maven.archetype
+invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/exclude-patterns/pom.xml.sample b/maven-archetype-plugin/src/it/projects/exclude-patterns-2/pom.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/exclude-patterns/pom.xml.sample
rename to maven-archetype-plugin/src/it/projects/exclude-patterns-2/pom.xml
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java b/maven-archetype-plugin/src/it/projects/exclude-patterns-2/verify.groovy
similarity index 73%
copy from archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
copy to maven-archetype-plugin/src/it/projects/exclude-patterns-2/verify.groovy
index 9dee189..b95e39c 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
+++ b/maven-archetype-plugin/src/it/projects/exclude-patterns-2/verify.groovy
@@ -1,5 +1,3 @@
-package org.apache.maven.archetype.test.common;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -19,5 +17,8 @@ package org.apache.maven.archetype.test.common;
  * under the License.
  */
 
-org/apache/maven/archetype/test/common
-A String to search for
\ No newline at end of file
+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/archetype-testing/archetype-final/src/test/resources/projects/exclude-patterns/.toexclude/dummy.file b/maven-archetype-plugin/src/it/projects/exclude-patterns/.toexclude/dummy.file
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/exclude-patterns/.toexclude/dummy.file
rename to maven-archetype-plugin/src/it/projects/exclude-patterns/.toexclude/dummy.file
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/exclude-patterns/archetype.properties.sample b/maven-archetype-plugin/src/it/projects/exclude-patterns/archetype.properties
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/exclude-patterns/archetype.properties.sample
rename to maven-archetype-plugin/src/it/projects/exclude-patterns/archetype.properties
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties b/maven-archetype-plugin/src/it/projects/exclude-patterns/invoker.properties
similarity index 88%
copy from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
copy to maven-archetype-plugin/src/it/projects/exclude-patterns/invoker.properties
index 105b612..97ce30e 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
+++ b/maven-archetype-plugin/src/it/projects/exclude-patterns/invoker.properties
@@ -15,4 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-#org.apache.maven.archetype
+invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-5/dummy.file b/maven-archetype-plugin/src/it/projects/exclude-patterns/nottoexclude/dummy.file
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-5/dummy.file
rename to maven-archetype-plugin/src/it/projects/exclude-patterns/nottoexclude/dummy.file
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/exclude-patterns-2/pom.xml.sample b/maven-archetype-plugin/src/it/projects/exclude-patterns/pom.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/exclude-patterns-2/pom.xml.sample
rename to maven-archetype-plugin/src/it/projects/exclude-patterns/pom.xml
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java b/maven-archetype-plugin/src/it/projects/exclude-patterns/verify.groovy
similarity index 74%
copy from archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
copy to maven-archetype-plugin/src/it/projects/exclude-patterns/verify.groovy
index 9dee189..0f0c92d 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
+++ b/maven-archetype-plugin/src/it/projects/exclude-patterns/verify.groovy
@@ -1,5 +1,3 @@
-package org.apache.maven.archetype.test.common;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -19,5 +17,10 @@ package org.apache.maven.archetype.test.common;
  * under the License.
  */
 
-org/apache/maven/archetype/test/common
-A String to search for
\ No newline at end of file
+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/archetype-testing/archetype-final/src/test/resources/projects/include-file-with-no-extension/archetype.properties.sample b/maven-archetype-plugin/src/it/projects/include-file-with-no-extension/archetype.properties
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/include-file-with-no-extension/archetype.properties.sample
rename to maven-archetype-plugin/src/it/projects/include-file-with-no-extension/archetype.properties
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties b/maven-archetype-plugin/src/it/projects/include-file-with-no-extension/invoker.properties
similarity index 88%
copy from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
copy to maven-archetype-plugin/src/it/projects/include-file-with-no-extension/invoker.properties
index 105b612..97ce30e 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
+++ b/maven-archetype-plugin/src/it/projects/include-file-with-no-extension/invoker.properties
@@ -15,4 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-#org.apache.maven.archetype
+invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/include-file-with-no-extension/pom.xml.sample b/maven-archetype-plugin/src/it/projects/include-file-with-no-extension/pom.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/include-file-with-no-extension/pom.xml.sample
rename to maven-archetype-plugin/src/it/projects/include-file-with-no-extension/pom.xml
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/include-file-with-no-extension/src/main/csharp/filewithnoextension b/maven-archetype-plugin/src/it/projects/include-file-with-no-extension/src/main/csharp/filewithnoextension
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/include-file-with-no-extension/src/main/csharp/filewithnoextension
rename to maven-archetype-plugin/src/it/projects/include-file-with-no-extension/src/main/csharp/filewithnoextension
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java b/maven-archetype-plugin/src/it/projects/include-file-with-no-extension/verify.groovy
similarity index 81%
copy from archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
copy to maven-archetype-plugin/src/it/projects/include-file-with-no-extension/verify.groovy
index 9dee189..a06793f 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
+++ b/maven-archetype-plugin/src/it/projects/include-file-with-no-extension/verify.groovy
@@ -1,5 +1,3 @@
-package org.apache.maven.archetype.test.common;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -19,5 +17,6 @@ package org.apache.maven.archetype.test.common;
  * under the License.
  */
 
-org/apache/maven/archetype/test/common
-A String to search for
\ No newline at end of file
+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/archetype-testing/archetype-final/src/test/resources/projects/included-system-properties/archetype.properties.sample b/maven-archetype-plugin/src/it/projects/included-system-properties/archetype.properties
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/included-system-properties/archetype.properties.sample
rename to maven-archetype-plugin/src/it/projects/included-system-properties/archetype.properties
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties b/maven-archetype-plugin/src/it/projects/included-system-properties/invoker.properties
similarity index 88%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
rename to maven-archetype-plugin/src/it/projects/included-system-properties/invoker.properties
index 105b612..97ce30e 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-2/src/it-test/resources/log4j.properties
+++ b/maven-archetype-plugin/src/it/projects/included-system-properties/invoker.properties
@@ -15,4 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-#org.apache.maven.archetype
+invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:create-from-project
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/included-system-properties/pom-parent.xml.sample b/maven-archetype-plugin/src/it/projects/included-system-properties/pom-parent.xml
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/included-system-properties/pom-parent.xml.sample
rename to maven-archetype-plugin/src/it/projects/included-system-properties/pom-parent.xml
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/included-system-properties/pom.xml.sample b/maven-archetype-plugin/src/it/projects/included-system-properties/pom.xml
similarity index 96%
rename from archetype-testing/archetype-final/src/test/resources/projects/included-system-properties/pom.xml.sample
rename to maven-archetype-plugin/src/it/projects/included-system-properties/pom.xml
index 5f694b4..58f20dd 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/included-system-properties/pom.xml.sample
+++ b/maven-archetype-plugin/src/it/projects/included-system-properties/pom.xml
@@ -28,7 +28,7 @@
         <groupId>com.test</groupId>
         <artifactId>test</artifactId>
         <version>1.0-SNAPSHOT</version>
-        <relativePath>./pom-parent.xml.sample</relativePath>
+        <relativePath>./pom-parent.xml</relativePath>
     </parent>
 
     <groupId>org.apache.maven.archetype.test</groupId>
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/included-system-properties/src/main/java/App.java b/maven-archetype-plugin/src/it/projects/included-system-properties/src/main/java/App.java
similarity index 100%
rename from archetype-testing/archetype-final/src/test/resources/projects/included-system-properties/src/main/java/App.java
rename to maven-archetype-plugin/src/it/projects/included-system-properties/src/main/java/App.java
diff --git a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java b/maven-archetype-plugin/src/it/projects/included-system-properties/verify.groovy
similarity index 82%
rename from archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
rename to maven-archetype-plugin/src/it/projects/included-system-properties/verify.groovy
index 9dee189..5014d44 100644
--- a/archetype-testing/archetype-final/src/test/resources/projects/create-3/libs/prj-b/src/test/java/org/apache/maven/archetype/test/common/ComponentTest.java
+++ b/maven-archetype-plugin/src/it/projects/included-system-properties/verify.groovy
@@ -1,5 +1,3 @@
-package org.apache.maven.archetype.test.common;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -19,5 +17,6 @@ package org.apache.maven.archetype.test.common;
  * under the License.
  */
 
-org/apache/maven/archetype/test/common
-A String to search for
\ No newline at end of file
+def templateDir = new File(basedir, 'target/generated-sources/archetype/src/main/resources/archetype-resources')
+
+assert new File(templateDir, 'src/main/java/App.java').exists()
\ No newline at end of file
diff --git a/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateArchetypeFromProjectMojo.java b/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateArchetypeFromProjectMojo.java
index 2b0f21a..877ed89 100644
--- a/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateArchetypeFromProjectMojo.java
+++ b/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateArchetypeFromProjectMojo.java
@@ -196,7 +196,7 @@ public class CreateArchetypeFromProjectMojo
      * <code>archetype-metadata.xml</code>, with <code>2.5.1-SNAPSHOT</code> as the default value.
      * </p>
      */
-    @Parameter( property = "archetype.properties" )
+    @Parameter( defaultValue = "archetype.properties", property = "archetype.properties" )
     private File propertyFile;
 
     /**
diff --git a/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/creation/DefaultArchetypeCreationConfigurator.java b/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/creation/DefaultArchetypeCreationConfigurator.java
index 745e7a5..3c5f9e9 100644
--- a/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/creation/DefaultArchetypeCreationConfigurator.java
+++ b/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/creation/DefaultArchetypeCreationConfigurator.java
@@ -330,7 +330,7 @@ public class DefaultArchetypeCreationConfigurator
             }
             catch ( FileNotFoundException ex )
             {
-                getLogger().debug( "archetype.properties does not exist" );
+                getLogger().debug( propertyFile.getName() + "  does not exist" );
             }
         }
 


Mime
View raw message