public String createArtifacts(final JavaPackage topLevelPackage, final String nullableProjectName, final String javaVersion, final GAV parentPom, final String module, final ProjectOperations projectOperations) { // Already created by the creator addon return projectOperations.getPathResolver().getIdentifier( LogicalPath.getInstance(Path.ROOT, ""), "pom.xml"); }
/** * Returns this module as a Dependency with the given scope * * @param scope the DependencyScope to use * @return a non-<code>null</code> instance */ public Dependency asDependency(final DependencyScope scope) { return new Dependency(gav, DependencyType.valueOfTypeCode(packaging), scope); }
/** * Indicates whether this path contains Java source code * * @return see above */ public boolean isSource() { return logicalPath.getPath().isJavaSource(); }
public String getFocusedIdentifier(final Path path, final String relativePath) { return getIdentifier( LogicalPath.getInstance(path, pomManagementService.getFocusedModuleName()), relativePath); }
public String getProjectRoot() { return pathResolver.getRoot(Path.ROOT.getModulePathId(pomManagementService .getFocusedModuleName())); }
public void removeRepository(@CliOption(key = "id", mandatory = true, help = "The ID of the repository") final String id, @CliOption(key = "url", mandatory = true, help = "The URL of the repository") final String url) { getMavenOperations().removeRepository(getMavenOperations().getFocusedModuleName(), new Repository(id, null, url)); }
public void addRepository(@CliOption(key = "id", mandatory = true, help = "The ID of the repository") final String id, @CliOption(key = "name", mandatory = false, help = "The name of the repository") final String name, @CliOption( key = "url", mandatory = true, help = "The URL of the repository") final String url) { getMavenOperations().addRepository(getMavenOperations().getFocusedModuleName(), new Repository(id, name, url)); }
private File getPath(final LogicalPath logicalPath) { final Pom pom = pomManagementService.getPomFromModuleName(logicalPath.getModule()); final File moduleRoot = getModuleRoot(logicalPath.getModule(), pom); final String pathRelativeToPom = logicalPath.getPathRelativeToPom(pom); return new File(moduleRoot, pathRelativeToPom); }
public LogicalPath getPath(final String identifier) { final PhysicalPath parent = getApplicablePhysicalPath(identifier); if (parent == null) { return null; } return parent.getLogicalPath(); }
public Pom getFocusedModule() { final ProjectMetadata focusedProjectMetadata = getFocusedProjectMetadata(); if (focusedProjectMetadata == null) { return null; } return focusedProjectMetadata.getPom(); }
public final Pom getPomFromModuleName(final String moduleName) { final ProjectMetadata projectMetadata = getProjectMetadata(moduleName); return projectMetadata == null ? null : projectMetadata.getPom(); }
private void monitorProjectPaths() { for (final LogicalPath logicalPath : pathResolver.getPaths()) { if (requiresMonitoring(logicalPath)) { monitorPathIfExists(logicalPath); } } }
public String getFocusedCanonicalPath(final Path path, final JavaType javaType) { return getCanonicalPath(pomManagementService.getFocusedModuleName(), path, javaType); }
public String getCanonicalPath(final String moduleName, final Path path, final JavaType javaType) { return getStrategy().getCanonicalPath(moduleName, path, javaType); }
public String getFocusedIdentifier(final Path path, final String relativePath) { return getStrategy().getFocusedIdentifier(path, relativePath); }
public String getFocusedRoot(final Path path) { return getStrategy().getFocusedRoot(path); }
public String getFriendlyName(final String identifier) { return getStrategy().getFriendlyName(identifier); }
public LogicalPath getPath(final String moduleName, final Path path) { return getStrategy().getPath(moduleName, path); }