Examples of POM


Examples of org.apache.maven.artifact.ant.Pom

            loggingManager.stop();
        }
    }

    private void addPomAndArtifact(InstallDeployTaskSupport installOrDeployTask, DefaultMavenDeployment defaultMavenDeployment) {
        Pom pom = new Pom();
        pom.setProject(installOrDeployTask.getProject());
        pom.setFile(defaultMavenDeployment.getPomArtifact().getFile());
        installOrDeployTask.addPom(pom);
        if (defaultMavenDeployment.getMainArtifact() != null) {
            installOrDeployTask.setFile(defaultMavenDeployment.getMainArtifact().getFile());
        }
        for (PublishArtifact classifierArtifact : defaultMavenDeployment.getAttachedArtifacts()) {
View Full Code Here

Examples of org.apache.maven.artifact.ant.Pom

            public void describeTo(Description description) {
                description.appendText("matching pom");
            }

            public boolean matches(Object actual) {
                Pom actualPom = (Pom) actual;
                return actualPom.getFile().equals(expectedPomFile) && actualPom.getProject().equals(expectedAntProject);
            }
        };
    }
View Full Code Here

Examples of org.guvnor.common.services.project.model.POM

            result.setStatus( JobStatus.RESOURCE_NOT_EXIST );
            result.setResult( "Repository [" + repositoryName + "] does not exist" );
            jobResultEvent.fire( result );
            return;
        } else {
            POM pom = new POM();
            pom.getGav().setArtifactId( projectName );
            pom.getGav().setGroupId( projectName );
            pom.getGav().setVersion( "1.0" );

            try {
                Project project = projectService.newProject( makeRepository( Paths.convert( repositoryPath ) ),
                                                             projectName,
                                                             pom,
View Full Code Here

Examples of org.guvnor.common.services.project.model.POM

        final POMContentHandler handler = new POMContentHandler();
        final GAV gav = new GAV();
        gav.setGroupId("org.guvnor");
        gav.setArtifactId( "test" );
        gav.setVersion( "0.0.1" );
        final POM pom = new POM( "name",
                                 "description",
                                 gav );
        final String xml = handler.toString( pom );

        assertContainsIgnoreWhitespace( GAV_GROUP_ID_XML,
View Full Code Here

Examples of org.guvnor.common.services.project.model.POM

                + "<version>0.0.1</version>"
                + "<name>name</name>"
                + "<description>description</description>"
                + "</project>";

        final POM pom = handler.toModel( xml );
        assertEquals( "org.guvnor",
                      pom.getGav().getGroupId() );
        assertEquals( "test",
                      pom.getGav().getArtifactId() );
        assertEquals( "0.0.1",
                      pom.getGav().getVersion() );
        assertEquals( "name",
                      pom.getName() );
        assertEquals( "description",
                      pom.getDescription() );

        final String enrichedXml = handler.toString( pom,
                                                     xml );

        assertContainsIgnoreWhitespace( GAV_GROUP_ID_XML,
View Full Code Here

Examples of org.guvnor.common.services.project.model.POM

                + "</plugin>"
                + "</plugins>"
                + "</build>"
                + "</project>";

        final POM pom = handler.toModel( xml );
        assertEquals( "org.guvnor",
                      pom.getGav().getGroupId() );
        assertEquals( "test",
                      pom.getGav().getArtifactId() );
        assertEquals( "0.0.1",
                      pom.getGav().getVersion() );
        assertEquals( "name",
                      pom.getName() );
        assertEquals( "description",
                      pom.getDescription() );

        final String enrichedXml = handler.toString( pom,
                                                     xml );

        assertContainsIgnoreWhitespace( GAV_GROUP_ID_XML,
View Full Code Here

Examples of org.guvnor.common.services.project.model.POM

                        "      </plugin>" +
                        "    </plugins>" +
                        "  </build>" +
                        "</project>";

        final POM pom = handler.toModel(xml);

        assertNotNull(pom.getParent());
        assertEquals("org.tadaa", pom.getParent().getGroupId());
        assertEquals("tadaa", pom.getParent().getArtifactId());
        assertEquals("1.2.3", pom.getParent().getVersion());
    }
View Full Code Here

Examples of org.guvnor.common.services.project.model.POM

        String groupId = groupIdBuilder.toString();
        String artifactId = nameSplit[nameSplit.length - 1];
        GAV gav = new GAV(groupId,
                          artifactId,
                          "0.0.1");
        POM pom = new POM(gav);

        Path modulePath = migrationPathManager.generateRootPath();
        projectService.newProject( makeRepository( modulePath ),
                                   jcrModule.getName(),
                                   pom,
View Full Code Here

Examples of org.guvnor.common.services.project.model.POM

        try {
            final org.uberfire.java.nio.file.Path projectDirectory = Paths.convert( pathToPomXML ).getParent();
            final org.uberfire.java.nio.file.Path newProjectPath = projectDirectory.resolveSibling( newName );

            final POM content = pomService.load( pathToPomXML );

            if ( newProjectPath.equals( projectDirectory ) ) {
                return pathToPomXML;
            }

            if ( ioService.exists( newProjectPath ) ) {
                throw new FileAlreadyExistsException( newProjectPath.toString() );
            }

            final Path oldProjectDir = Paths.convert( projectDirectory );
            final Project oldProject = resolveProject( oldProjectDir );

            content.setName( newName );
            final Path newPathToPomXML = Paths.convert( newProjectPath.resolve( "pom.xml" ) );
            try {
                ioService.startBatch( new FileSystem[]{newProjectPath.getFileSystem()} );
                ioService.move( projectDirectory, newProjectPath, makeCommentedOption( comment ) );
                pomService.save( newPathToPomXML, content, null, comment );
View Full Code Here

Examples of org.guvnor.common.services.project.model.POM

        try {
            final org.uberfire.java.nio.file.Path projectDirectory = Paths.convert( pathToPomXML ).getParent();
            final Project project2Delete = resolveProject( Paths.convert( projectDirectory ) );

            final org.uberfire.java.nio.file.Path parentPom = projectDirectory.getParent().resolve( "pom.xml" );
            POM parent = null;
            if ( ioService.exists( parentPom ) ) {
                parent = pomService.load( Paths.convert( parentPom ) );
            }

            ioService.delete( projectDirectory, StandardDeleteOption.NON_EMPTY_DIRECTORIES, optionsFactory.makeCommentedOption( comment, identity, sessionInfo ) );
            deleteProjectEvent.fire( new DeleteProjectEvent( project2Delete ) );

            if ( parent != null ) {
                parent.setMultiModule( true );
                parent.getModules().remove( project2Delete.getProjectName() );
                pomService.save( Paths.convert( parentPom), parent, null, "Removing child module " + project2Delete.getProjectName() );
            }
        } catch ( final Exception e ) {
            throw ExceptionUtilities.handleException( e );
        }
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.