Package qubexplorer

Examples of qubexplorer.MvnModelFactory


        return tokens[0] + ":" + tokens[1];
    }
   
    public Project getProjectOwner(Project parentProject)throws MvnModelInputException {
        BasicPomInfo basicPomInfo = getBasicPomInfo(getShortProjectKey());
        Model model = new MvnModelFactory().createModel(parentProject);
        if (model.getGroupId().equals(basicPomInfo.getGroupId()) && model.getArtifactId().equals(basicPomInfo.getArtifactId())) {
            return parentProject;
        }
        FileObject mavenDir = findMvnDir(model, basicPomInfo, model.getGroupId());
        if (mavenDir != null) {
View Full Code Here


        assert tokens.length >= 2;
        return new BasicPomInfo(tokens[0], tokens[1]);
    }
   
    private static FileObject findMvnDir(Model model, BasicPomInfo basicPomInfo, String groupId)throws MvnModelInputException {
        MvnModelFactory factory = new MvnModelFactory();
        for (String module : model.getModules()) {
            FileObject moduleFile = FileUtil.toFileObject(new File(model.getProjectDirectory(), module));
            Model m = factory.createModel(moduleFile);
            String tmpGroupId = m.getGroupId() == null ? groupId : m.getGroupId();
            if (tmpGroupId.equals(basicPomInfo.getGroupId()) && m.getArtifactId().equals(basicPomInfo.getArtifactId())) {
                return moduleFile;
            } else {
                FileObject o = findMvnDir(m, basicPomInfo, tmpGroupId);
View Full Code Here

        }
        return false;
    }

    public static String toResource(Project project) throws MvnModelInputException {
        Model model = new MvnModelFactory().createModel(project);
        return model.getGroupId()+":"+model.getArtifactId();
    }
View Full Code Here

TOP

Related Classes of qubexplorer.MvnModelFactory

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.