public class ProjectUtils extends Object
| Constructor and Description |
|---|
ProjectUtils() |
| Modifier and Type | Method and Description |
|---|---|
static File |
getBasedir(Project project)
Convenience method for extracting the value of the property
project.basedir |
static Build |
getBuild(Project project)
Get a build object with local file system directories filled in.
|
static File |
getBuildDirectory(Project project)
Convenience method for extracting the value of the property
project.build.directory |
static File |
getBuildOutputDirectory(Project project)
Convenience method for extracting the value of the property
project.build.outputDirectory |
static String |
getClasspathPrefix(FeatureIdentifier feature)
Deprecated.
|
static String |
getClasspathPrefix(ProjectIdentifier project)
Return a classpath prefix.
|
static String |
getClasspathPrefix(String groupId)
Return a classpath prefix.
|
static String |
getClasspathPrefix(String groupId,
String artifactId)
Return a classpath prefix.
|
static String |
getClassPathPrefix(String groupId,
String artifactId)
Deprecated.
|
static String |
getClasspathResource(ProjectIdentifier project,
String filename)
classpath:org/kuali/common/kuali-util/myfile.txt
|
static String |
getEncoding(Project project)
Convenience method for extracting the value of the property
project.encoding |
static ProjectIdentifier |
getIdentifier(String projectId)
Convert a project id into a
ProjectIdentifier's
Example project id: |
static List<ProjectIdentifier> |
getIdentifiers(List<String> projectIds)
Convert a list of project ids into a list of
ProjectIdentifier's
Example project id: |
static String |
getPath(ProjectResource resource)
[prefix]org/kuali/common/kuali-util/[path]
|
static Project |
getProject(Properties properties)
Get a
Project from a Properties |
static File |
getResourceDirectory(File directory,
String groupId,
String artifactId)
Return a resource directory relative to
directory |
static String |
getResourcePath(ProjectIdentifier pid)
Return a resource friendly prefix.
|
static String |
getResourcePath(String groupId,
String artifactId)
Return a resource friendly prefix.
|
public ProjectUtils()
public static Project getProject(Properties properties)
Project from a Propertiespublic static ProjectIdentifier getIdentifier(String projectId)
ProjectIdentifier's
Example project id:
org.kuali.common:kuali-util
public static List<ProjectIdentifier> getIdentifiers(List<String> projectIds)
ProjectIdentifier's
Example project id:
org.kuali.common:kuali-util
public static Build getBuild(Project project)
kuali-util/ kuali-util/target kuali-util/target/classes
public static File getBuildDirectory(Project project)
project.build.directorypublic static File getBasedir(Project project)
project.basedirpublic static File getBuildOutputDirectory(Project project)
project.build.outputDirectorypublic static String getEncoding(Project project)
project.encodingpublic static File getResourceDirectory(File directory, String groupId, String artifactId)
directory
/tmp/x/y/z + org.kuali.common:kuali-util -> /tmp/x/y/z/org/kuali/common/kuali-util
public static String getResourcePath(String groupId, String artifactId)
org.kuali.common:kuali-util -> org/kuali/common/kuali-util
public static String getResourcePath(ProjectIdentifier pid)
org.kuali.common:kuali-util -> org/kuali/common/kuali-util
@Deprecated public static String getClassPathPrefix(String groupId, String artifactId)
getClasspathPrefix() instead. (lowercase "p" in the word classpath)public static String getClasspathPrefix(String groupId, String artifactId)
org.kuali.common:kuali-util -> classpath:org/kuali/common/kuali-util
public static String getClasspathPrefix(ProjectIdentifier project)
org.kuali.common:kuali-util -> classpath:org/kuali/common/kuali-util
public static String getClasspathPrefix(String groupId)
org.kuali.common -> classpath:org/kuali/common
@Deprecated public static String getClasspathPrefix(FeatureIdentifier feature)
org.kuali.common:kuali-util:metainf -> classpath:org/kuali/common/kuali-util/metainf
public static String getClasspathResource(ProjectIdentifier project, String filename)
classpath:org/kuali/common/kuali-util/myfile.txt
public static String getPath(ProjectResource resource)
[prefix]org/kuali/common/kuali-util/[path]
Copyright © 2010–2014 The Kuali Foundation. All rights reserved.