Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MSHARED-800] Remove Maven version from pom.properties #5

Merged
merged 1 commit into from
Feb 17, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions src/main/java/org/apache/maven/archiver/PomPropertiesUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,9 @@

/**
* This class is responsible for creating the pom.properties file.
*
* @version $Id$
*/
public class PomPropertiesUtil
{
private static final String CREATED_BY_MAVEN = "Created by Apache Maven";

private Properties loadPropertiesFile( File file )
throws IOException
{
Expand Down Expand Up @@ -90,22 +86,11 @@ private void createPropertiesFile( MavenSession session, Properties properties,
PrintWriter pw = new PrintWriter( outputFile, "ISO-8859-1" );
try
{
String createdBy = CREATED_BY_MAVEN;
if ( session != null ) // can be null due to API backwards compatibility
{
String mavenVersion = session.getSystemProperties().getProperty( "maven.version" );
if ( mavenVersion != null )
{
createdBy += " " + mavenVersion;
}
}

StringWriter sw = new StringWriter();
properties.store( sw, null );

BufferedReader r = new BufferedReader( new StringReader( sw.toString() ) );

pw.println( "#" + createdBy );
String line;
while ( ( line = r.readLine() ) != null )
{
Expand Down