Examples of ArchetypeGenerationRequest


Examples of org.apache.maven.archetype.ArchetypeGenerationRequest

    public void testGenerateArchetypeCompleteWithParent()
        throws Exception
    {
        System.out.println( "testGenerateArchetypeCompleteWithParent" );

        ArchetypeGenerationRequest request = createArchetypeGenerationRequest( "generate-5", ARCHETYPE_BASIC );

        File projectFile = getProjectFile();
        File projectFileSample = getProjectSampleFile();
        copy( projectFileSample, projectFile );
View Full Code Here

Examples of org.apache.maven.archetype.ArchetypeGenerationRequest

    public void testGenerateArchetypePartialOnChild()
        throws Exception
    {
        System.out.println( "testGenerateArchetypePartialOnChild" );

        ArchetypeGenerationRequest request = createArchetypeGenerationRequest( "generate-8", ARCHETYPE_PARTIAL );

        File parentProjectFile = getProjectFile();
        File parentProjectFileSample = getProjectSampleFile();
        copy( parentProjectFileSample, parentProjectFile );
View Full Code Here

Examples of org.apache.maven.archetype.ArchetypeGenerationRequest

    public void testGenerateArchetypePartialOnChildDontOverride()
        throws Exception
    {
        System.out.println( "testGenerateArchetypePartialOnChildDontOverride" );

        ArchetypeGenerationRequest request = createArchetypeGenerationRequest( "generate-9", ARCHETYPE_PARTIAL );

        File projectFile = new File( projectDirectory, "pom.xml" );
        File projectFileSample = new File( projectDirectory, "pom.xml.sample" );
        copy( projectFileSample, projectFile );
View Full Code Here

Examples of org.apache.maven.archetype.ArchetypeGenerationRequest

    public void testGenerateArchetypePartialOnParent()
        throws Exception
    {
        System.out.println( "testGenerateArchetypePartialOnParent" );

        ArchetypeGenerationRequest request = createArchetypeGenerationRequest( "generate-7", ARCHETYPE_PARTIAL );

        File projectFile = new File( outputDirectory, "pom.xml" );
        File projectFileSample = new File( outputDirectory, "pom.xml.sample" );
        copy( projectFileSample, projectFile );
View Full Code Here

Examples of org.apache.maven.archetype.ArchetypeGenerationRequest

    public void testGenerateArchetypePartialWithoutPoms()
        throws Exception
    {
        System.out.println( "testGenerateArchetypePartialWithoutPoms" );

        ArchetypeGenerationRequest request = createArchetypeGenerationRequest( "generate-6", ARCHETYPE_PARTIAL );

        File projectFile = new File( projectDirectory, "pom.xml" );

        FileUtils.forceDelete( projectDirectory );
View Full Code Here

Examples of org.apache.maven.archetype.ArchetypeGenerationRequest

    public void testGenerateArchetypeSite()
        throws Exception
    {
        System.out.println( "testGenerateArchetypeSite" );

        ArchetypeGenerationRequest request = createArchetypeGenerationRequest( "generate-10", ARCHETYPE_SITE );

        File projectFile = new File( projectDirectory, "pom.xml" );

        FileUtils.forceDelete( projectDirectory );
View Full Code Here

Examples of org.apache.maven.archetype.ArchetypeGenerationRequest

    public void testGenerateFileSetArchetype()
        throws Exception
    {
        System.out.println( "testGenerateFileSetArchetype" );

        ArchetypeGenerationRequest request = createArchetypeGenerationRequest( "generate-12", ARCHETYPE_FILESET );

        File projectFile = new File( projectDirectory, "pom.xml" );

        FileUtils.forceDelete( projectDirectory );
View Full Code Here

Examples of org.apache.maven.archetype.ArchetypeGenerationRequest

    public void testGenerateOldArchetype()
        throws Exception
    {
        System.out.println( "testGenerateOldArchetype" );

        ArchetypeGenerationRequest request = createArchetypeGenerationRequest( "generate-11", ARCHETYPE_OLD );

        File projectFile = new File( projectDirectory, "pom.xml" );

        FileUtils.forceDelete( projectDirectory );
View Full Code Here

Examples of org.apache.maven.archetype.ArchetypeGenerationRequest

    public void testPropertiesNotDefined()
        throws Exception
    {
        System.out.println( "testPropertiesNotDefined" );

        ArchetypeGenerationRequest request = createArchetypeGenerationRequest( "generate-3", ARCHETYPE_BASIC );
       
        request.setProperties( new Properties() );

        ArchetypeGenerationResult result = generateProjectFromArchetypeWithFailure( request );

        assertTrue( "Exception not correct",
                    result.getCause().getMessage().startsWith( "Archetype archetypes:basic:1.0 is not configured" )
View Full Code Here

Examples of org.apache.maven.archetype.ArchetypeGenerationRequest

    {
        outputDirectory = getBasedir() + "/target/test-classes/projects/" + project;

        projectDirectory = new File( outputDirectory, "file-value" );

        ArchetypeGenerationRequest request = new ArchetypeGenerationRequest();
        request.setLocalRepository( localRepository );
        request.setArchetypeRepository( remoteRepository );
        request.setOutputDirectory( outputDirectory );

        request.setArchetypeGroupId( archetype.groupId );
        request.setArchetypeArtifactId( archetype.artifactId );
        request.setArchetypeVersion( archetype.version );

        request.setGroupId( "file-value" );
        request.setArtifactId( "file-value" );
        request.setVersion( "file-value" );
        request.setPackage( "file.value.package" );

        request.setProperties( ADDITIONAL_PROPERTIES );

        return request;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.