Package com.dgwave.car.common

Examples of com.dgwave.car.common.Module


     * @return String of dependency lines
     * @throws MojoExecutionException In case the dependency version could not be determined
     */
    String calculateDependencies(final MavenProject proj) throws MojoExecutionException {
       
        Module module = new Module(
            new ModuleIdentifier(CeylonUtil.ceylonModuleBaseName(proj.getGroupId(), proj.getArtifactId()),
                proj.getVersion(), false, false));
       
        for (Dependency dep : proj.getDependencies()) {
            if (dep.getVersion() != null && !"".equals(dep.getVersion())) {
                module.addDependency(new ModuleIdentifier(
                    CeylonUtil.ceylonModuleBaseName(dep.getGroupId(), dep.getArtifactId()), dep.getVersion(),
                        dep.isOptional(), false)
                );
            } else {
                throw new MojoExecutionException(
                    "Dependency version could not be determined from the POM. Aborting.");
            }
        }
       
        StringBuilder builder = new StringBuilder(CeylonUtil.STRING_BUILDER_SIZE);
        for (ModuleIdentifier depMod : module.getDependencies()) {
            builder.append(depMod.getName());
            if (depMod.isOptional()) {
                builder.append("?");
            }
           
View Full Code Here

TOP

Related Classes of com.dgwave.car.common.Module

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.