/** * Create a {@code ProjectResource} with the prefix set to {@code classpath:} or {@code classpath:META-INF/} */ public static ProjectResource classpath(ProjectIdentifier project, String path, boolean metainf) { return builder(project, path).classpathPrefix(metainf).build(); }
public static ImmutableProject copyOf(Project project) { if (project instanceof ImmutableProject) { return (ImmutableProject) project; } else { return new ImmutableProject(project.getGroupId(), project.getArtifactId(), project.getVersion(), project.getProperties()); } }
@Override public String getGroupId() { return identifier.getGroupId(); }
@Override public Properties configOverrideProperties() { Properties overrides = project.getProperties(); return overrides; }
/** * Create a {@code ProjectResource} with the prefix set to {@code directory} and optionally further prefixed with {@code META-INF} */ public static ProjectResource directory(File directory, ProjectIdentifier project, String path, boolean metainf) { return builder(project, path).directoryPrefix(directory, metainf).build(); }
@Override public String getArtifactId() { return identifier.getArtifactId(); }
public ProjectResource build() { ProjectResource instance = new ProjectResource(this); validate(instance); return instance; }
/** * {@code classpath:} or {@code classpath:META-INF/} */ public Builder classpathPrefix(boolean metainf) { if (metainf) { return prefix(ResourceUtils.CLASSPATH_URL_PREFIX + MetaInfUtils.METAINF_DIRECTORY_NAME + "/"); } else { return classpathPrefix(); } }
/** * Create a {@code ProjectResource} with the prefix set to {@code classpath:} */ public static ProjectResource classpath(ProjectIdentifier project, String path) { return classpath(project, path, false); }
/** * Create a {@code ProjectResource} with the prefix set to {@code directory} */ public static ProjectResource directory(File directory, ProjectIdentifier project, String path) { return directory(directory, project, path, false); }
/** * {@code classpath:} */ public Builder classpathPrefix() { return prefix(ResourceUtils.CLASSPATH_URL_PREFIX); }
/** * {@code /tmp/} */ public Builder directoryPrefix(File directory) { return directoryPrefix(directory, false); }
@Override public String getGroupId() { return identifier.getGroupId(); }
@Override public String getArtifactId() { return identifier.getArtifactId(); }
@Override public String getGroupId() { return identifier.getGroupId(); }
@Override public String getArtifactId() { return identifier.getArtifactId(); }
@Override public String getGroupId() { return identifier.getGroupId(); }
@Override public String getArtifactId() { return identifier.getArtifactId(); }