001    package org.codehaus.mojo.properties;
002    
003    import java.util.Properties;
004    
005    import org.apache.maven.project.MavenProject;
006    
007    public class MavenUtils {
008    
009            /**
010             * Return properties Maven uses internally
011             */
012            public static final Properties getInternalMavenProperties(MavenProject project) {
013                    Properties properties = new Properties();
014                    properties.setProperty("project.groupId", project.getGroupId());
015                    properties.setProperty("project.artifactId", project.getArtifactId());
016                    properties.setProperty("project.version", project.getVersion());
017                    properties.setProperty("project.basedir", project.getBasedir().getAbsolutePath());
018                    properties.setProperty("project.build.directory", project.getBuild().getDirectory());
019                    return properties;
020            }
021    
022    }