Package org.kie.builder

Examples of org.kie.builder.ReleaseId


    }   
   
   
    public void addKBaseBean(AfterBeanDiscovery abd,
                             KieCDIEntry entry) {
        ReleaseId releaseId = entry.getReleaseId();
        KieContainerImpl kieContainer = classpathKContainer; // default to classpath, but allow it to be overriden
        if ( releaseId != null ) {
            kieContainer = (KieContainerImpl) gavs.get(releaseId);
            if ( kieContainer == null ) {
                log.error( "Unable to create @KBase({}), could not retrieve KieContainer for ReleaseId {}",
                           entry.getValue(),
                           releaseId.toString() );
                return;
            }
        }
        KieProject kProject = kieContainer.getKieProject();
View Full Code Here


        abd.addBean( bean );
    }

    public void addKSessionBean(AfterBeanDiscovery abd,
                                KieCDIEntry entry) {
        ReleaseId releaseId = entry.getReleaseId();
        KieContainerImpl kieContainer = classpathKContainer; // default to classpath, but allow it to be overriden
        if ( releaseId != null ) {
            kieContainer = (KieContainerImpl) gavs.get(releaseId);
            if ( kieContainer == null ) {
                log.error( "Unable to create KSession({}), could not retrieve KieContainer for ReleaseId {}",
                           entry.getValue(),
                           releaseId.toString() );
                return;
            }
        }
        KieProject kProject = kieContainer.getKieProject();
View Full Code Here

    private static class KieModuleRepo {
        private final Map<String, TreeMap<ComparableVersion, KieModule>> kieModules = new HashMap<String, TreeMap<ComparableVersion, KieModule>>();

        void store(KieModule kieModule) {
            ReleaseId releaseId = kieModule.getReleaseId();
            String ga = releaseId.getGroupId() + ":" + releaseId.getArtifactId();

            TreeMap<ComparableVersion, KieModule> artifactMap = kieModules.get(ga);
            if (artifactMap == null) {
                artifactMap = new TreeMap<ComparableVersion, KieModule>();
                kieModules.put(ga, artifactMap);
            }
            artifactMap.put(new ComparableVersion(releaseId.getVersion()), kieModule);
        }
View Full Code Here

    public void endElement(final String uri,
                           final String localName,
                           final String qname) throws SAXException {
        if ( "project".equals( qname ) ) {
            ReleaseId parentReleaseId = model.getParentReleaseId();
            model.setReleaseId(new ReleaseIdImpl(pomGroupId != null ? pomGroupId : parentReleaseId.getGroupId(),
                                                 pomArtifactId,
                                                 pomVersion != null ? pomVersion : parentReleaseId.getVersion()));
        } else if ( "parent".equals( qname ) ) {
            if ( currentGroupId != null && currentArtifactId != null && currentVersion != null ) {
                model.setParentReleaseId(new ReleaseIdImpl(currentGroupId, currentArtifactId, currentVersion));
            }
            currentGroupId = null;
View Full Code Here

                                 "maven pom.xml found, but unable to read\n" + e.getMessage() );
        }
    }

    public static void validatePomModel(PomModel pomModel) {
        ReleaseId pomReleaseId = pomModel.getReleaseId();
        if ( StringUtils.isEmpty( pomReleaseId.getGroupId() ) || StringUtils.isEmpty( pomReleaseId.getArtifactId() ) || StringUtils.isEmpty( pomReleaseId.getVersion() ) ) {
            throw new RuntimeException( "Maven pom.properties exists but ReleaseId content is malformed" );
        }
    }
View Full Code Here

            System.out.println( "kmodules: " + url);
            try {
                String fixedURL = fixURLFromKProjectPath( url );
                InternalKieModule kModule = fetchKModule(url, fixedURL);

                ReleaseId releaseId = kModule.getReleaseId();
                kieModules.put(releaseId, kModule);

                log.debug( "Discovered classpath module " + releaseId.toExternalForm() );
               
                kr.addKieModule(kModule);

            } catch ( Exception exc ) {
                log.error( "Unable to build index of kmodule.xml url=" + url.toExternalForm() + "\n" + exc.getMessage() );
View Full Code Here

        setDefaultsforEmptyKieModule(kieProject);

        String pomProperties = getPomProperties( fixedURL );
       
        ReleaseId releaseId = ReleaseIdImpl.fromPropertiesString(pomProperties);

        String rootPath = fixedURL;
        if ( rootPath.lastIndexOf( ':' ) > 0 ) {
            rootPath = fixedURL.substring( rootPath.lastIndexOf( ':' ) + 1 );
        }
View Full Code Here

TOP

Related Classes of org.kie.builder.ReleaseId

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.