code: 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())) {
                  if (!"test".equals(dep.getScope()) && dep.getSystemPath() == null) {
                      module.addDependency(new ModuleIdentifier(
                          CeylonUtil.ceylonModuleBaseName(dep.getGroupId(), dep.getArtifactId()), dep.getVersion(), 
                              dep.isOptional(), false)
                      ); 
                  }
              } else {
                  throw new MojoExecutionException(
                      "Dependency version for " + dep + " in project " + proj 
                      + "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("?");
              }
              
              builder.append("=").append(depMod.getVersion());
              builder.append(System.lineSeparator());
          }
          return builder.toString();
      }
docs: Determines dependencies from the Maven project model.
  
  @param proj The Maven project
  @return String of dependency lines
  @throws MojoExecutionException In case the dependency version could not be determined