org.kuali.common.util.project
Class ProjectUtils

java.lang.Object
  extended by org.kuali.common.util.project.ProjectUtils

public class ProjectUtils
extends Object


Constructor Summary
ProjectUtils()
           
 
Method Summary
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(String groupId, String artifactId)
          Return a resource friendly prefix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectUtils

public ProjectUtils()
Method Detail

getProject

public static Project getProject(Properties properties)
Get a Project from a Properties


getIdentifier

public static ProjectIdentifier getIdentifier(String projectId)
Convert a project id into a ProjectIdentifier's Example project id:
   org.kuali.common:kuali-util
 


getIdentifiers

public static List<ProjectIdentifier> getIdentifiers(List<String> projectIds)
Convert a list of project ids into a list of ProjectIdentifier's Example project id:
   org.kuali.common:kuali-util
 


getBuild

public static Build getBuild(Project project)
Get a build object with local file system directories filled in. The typical directory structure looks like this:
  kuali-util/
  kuali-util/target
  kuali-util/target/classes
 


getBuildDirectory

public static File getBuildDirectory(Project project)
Convenience method for extracting the value of the property project.build.directory


getBasedir

public static File getBasedir(Project project)
Convenience method for extracting the value of the property project.basedir


getBuildOutputDirectory

public static File getBuildOutputDirectory(Project project)
Convenience method for extracting the value of the property project.build.outputDirectory


getEncoding

public static String getEncoding(Project project)
Convenience method for extracting the value of the property project.encoding


getResourceDirectory

public static File getResourceDirectory(File directory,
                                        String groupId,
                                        String artifactId)
Return a resource directory relative to directory
   /tmp/x/y/z + org.kuali.common:kuali-util  ->  /tmp/x/y/z/org/kuali/common/kuali-util
 


getResourcePath

public static String getResourcePath(String groupId,
                                     String artifactId)
Return a resource friendly prefix.
   org.kuali.common:kuali-util  ->  org/kuali/common/kuali-util
 


getClassPathPrefix

@Deprecated
public static String getClassPathPrefix(String groupId,
                                                   String artifactId)
Deprecated. 

Use getClasspathPrefix() instead. (lowercase "p" in the word classpath)


getClasspathPrefix

public static String getClasspathPrefix(String groupId,
                                        String artifactId)
Return a classpath prefix.
   org.kuali.common:kuali-util  ->  classpath:org/kuali/common/kuali-util
 


getClasspathPrefix

public static String getClasspathPrefix(ProjectIdentifier project)
Return a classpath prefix.
   org.kuali.common:kuali-util  ->  classpath:org/kuali/common/kuali-util
 


getClasspathPrefix

public static String getClasspathPrefix(String groupId)
Return a classpath prefix.
   org.kuali.common  ->  classpath:org/kuali/common
 


getClasspathPrefix

@Deprecated
public static String getClasspathPrefix(FeatureIdentifier feature)
Deprecated. 

Return a classpath prefix.
   org.kuali.common:kuali-util:metainf  ->  classpath:org/kuali/common/kuali-util/metainf
 


getClasspathResource

public static String getClasspathResource(ProjectIdentifier project,
                                          String filename)
   classpath:org/kuali/common/kuali-util/myfile.txt
 


getPath

public static String getPath(ProjectResource resource)
   [prefix]org/kuali/common/kuali-util/[path]
 



Copyright © 2010–2014 The Kuali Foundation. All rights reserved.