Package org.drools.compiler.kproject.xml

Examples of org.drools.compiler.kproject.xml.PomModel


            // will be null if the provided pom is invalid
            return;
        }

        try {
            PomModel tempPomModel = PomModel.Parser.parse( "pom.xml",
                                                            new ByteArrayInputStream( pomXml ) );
            validatePomModel( tempPomModel ); // throws an exception if invalid
            pomModel = tempPomModel;
        } catch ( Exception e ) {
            results.addMessage( Level.ERROR,
View Full Code Here


           
            if ( file != null ) {
                FileInputStream fis = null;
                try {
                    fis = new FileInputStream( file ) ;
                    PomModel pomModel = PomModel.Parser.parse( rootPath + "/pom.xml", fis);
                   
                    KieBuilderImpl.validatePomModel( pomModel ); // throws an exception if invalid
                   
                    ReleaseIdImpl gav = (ReleaseIdImpl) pomModel.getReleaseId();
                   
                    String str =  KieBuilderImpl.generatePomProperties( gav );
                    log.info( "Recursed up folders,  found and used pom.xml " + file );
                   
                    return str;
View Full Code Here

    public PomModel getPomModel() {
        if (pomModel == null) {
            try {
                byte[] pomXml = getPomXml();
                if( pomXml != null ) {
                    PomModel tempPomModel = PomModel.Parser.parse("pom.xml", new ByteArrayInputStream(pomXml));
                    validatePomModel(tempPomModel); // throws an exception if invalid
                    pomModel = tempPomModel;
                }
            } catch( Exception e ) {
                // nothing to do as it was not possible to retrieve pom.xml
View Full Code Here

    public PomModel getPomModel() {
        if (pomModel == null) {
            try {
                byte[] pomXml = getPomXml();
                if( pomXml != null ) {
                    PomModel tempPomModel = PomModel.Parser.parse("pom.xml", new ByteArrayInputStream(pomXml));
                    validatePomModel(tempPomModel); // throws an exception if invalid
                    pomModel = tempPomModel;
                }
            } catch( Exception e ) {
                // nothing to do as it was not possible to retrieve pom.xml
View Full Code Here

            // will be null if the provided pom is invalid
            return;
        }

        try {
            PomModel tempPomModel = PomModel.Parser.parse( "pom.xml",
                                                            new ByteArrayInputStream( pomXml ) );
            validatePomModel( tempPomModel ); // throws an exception if invalid
            pomModel = tempPomModel;
        } catch ( Exception e ) {
            results.addMessage( Level.ERROR,
View Full Code Here

           
            if ( file != null ) {
                FileInputStream fis = null;
                try {
                    fis = new FileInputStream( file ) ;
                    PomModel pomModel = PomModel.Parser.parse( rootPath + "/pom.xml", fis);
                   
                    KieBuilderImpl.validatePomModel( pomModel ); // throws an exception if invalid
                   
                    ReleaseIdImpl gav = (ReleaseIdImpl) pomModel.getReleaseId();
                   
                    String str =  KieBuilderImpl.generatePomProperties( gav );
                    log.info( "Recursed up folders,  found and used pom.xml " + file );
                   
                    return str;
View Full Code Here

                }

                fileData.mark( fileData.available() ); // is available() safe?

                String pomContent = GuvnorM2Repository.loadPOMFromJar(fileData);
                PomModel pomModel = null;
                if ( pomContent != null ) {
                    pomModel = PomModel.Parser.parse("pom.xml", new ByteArrayInputStream(pomContent.getBytes()));
                }

                if ( pomModel != null ) {

                    String groupId = pomModel.getReleaseId().getGroupId();
                    String artifactId = pomModel.getReleaseId().getArtifactId();
                    String version = pomModel.getReleaseId().getVersion();

                    if (isNullOrEmpty(groupId) || isNullOrEmpty(artifactId) || isNullOrEmpty(version)) {
                        return NO_VALID_POM;
                    } else {
                        gav = new GAV(groupId, artifactId, version);
View Full Code Here

    public PomModel getPomModel() {
        if (pomModel == null) {
            try {
                byte[] pomXml = getPomXml();
                if( pomXml != null ) {
                    PomModel tempPomModel = MinimalPomParser.parse("pom.xml",
                            new ByteArrayInputStream(pomXml));
                    validatePomModel(tempPomModel); // throws an exception if invalid
                    pomModel = tempPomModel;
                }
            } catch( Exception e ) {
View Full Code Here

            // will be null if the provided pom is invalid
            return;
        }

        try {
            PomModel tempPomModel = MinimalPomParser.parse( "pom.xml",
                                                            new ByteArrayInputStream( pomXml ) );
            validatePomModel( tempPomModel ); // throws an exception if invalid
            pomModel = tempPomModel;
        } catch ( Exception e ) {
            results.addMessage( Level.ERROR,
View Full Code Here

            // will be null if the provided pom is invalid
            return;
        }

        try {
            PomModel tempPomModel = PomModel.Parser.parse( "pom.xml",
                                                            new ByteArrayInputStream( pomXml ) );
            validatePomModel( tempPomModel ); // throws an exception if invalid
            pomModel = tempPomModel;
        } catch ( Exception e ) {
            results.addMessage( Level.ERROR,
View Full Code Here

TOP

Related Classes of org.drools.compiler.kproject.xml.PomModel

Copyright © 2018 www.massapicom. 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.