-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for generating POM properties.
Projects with javaRelease specified automatically set the maven compiler properties in their POM at generation.
- Loading branch information
Showing
9 changed files
with
295 additions
and
10 deletions.
There are no files selected for viewing
Submodule core
updated
40 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* | ||
* Copyright 2001-2024 Geert Bevin (gbevin[remove] at uwyn dot com) | ||
* Licensed under the Apache License, Version 2.0 (the "License") | ||
*/ | ||
package rife.bld.publish; | ||
|
||
import java.util.*; | ||
|
||
/** | ||
* Provides the properties information for publication. | ||
* | ||
* @author Geert Bevin (gbevin[remove] at uwyn dot com) | ||
* @since 1.9.2 | ||
*/ | ||
public class PublishProperties extends LinkedHashMap<String, String> { | ||
private static final String MAVEN_COMPILER_SOURCE = "maven.compiler.source"; | ||
private static final String MAVEN_COMPILER_TARGET = "maven.compiler.target"; | ||
|
||
/** | ||
* Sets the value of the 'maven.compiler.source' property. | ||
* | ||
* @param value the value to be set for the 'maven.compiler.source' property | ||
* @return this {@code PomProperties} instance | ||
* @since 1.9.2 | ||
*/ | ||
public PublishProperties mavenCompilerSource(Integer value) { | ||
if (value == null) { | ||
remove(MAVEN_COMPILER_SOURCE); | ||
} | ||
else { | ||
put(MAVEN_COMPILER_SOURCE, String.valueOf(value)); | ||
} | ||
return this; | ||
} | ||
|
||
/** | ||
* Retrieves the value of the 'maven.compiler.source' property. | ||
* | ||
* @return the value of the 'maven.compiler.source' property | ||
* @since 1.9.2 | ||
*/ | ||
public Integer mavenCompilerSource() { | ||
var value = get(MAVEN_COMPILER_SOURCE); | ||
if (value == null) { | ||
return null; | ||
} | ||
return Integer.parseInt(value); | ||
} | ||
|
||
/** | ||
* Sets the value of the 'maven.compiler.target' property. | ||
* | ||
* @param value the value to be set for the 'maven.compiler.target' property | ||
* @return this {@code PomProperties} instance | ||
* @since 1.9.2 | ||
*/ | ||
public PublishProperties mavenCompilerTarget(Integer value) { | ||
if (value == null) { | ||
remove(MAVEN_COMPILER_TARGET); | ||
} | ||
else { | ||
put(MAVEN_COMPILER_TARGET, String.valueOf(value)); | ||
} | ||
return this; | ||
} | ||
|
||
/** | ||
* Retrieves the value of the 'maven.compiler.target' property. | ||
* | ||
* @return the value of the 'maven.compiler.target' property | ||
* @since 1.9.2 | ||
*/ | ||
public Integer mavenCompilerTarget() { | ||
var value = get(MAVEN_COMPILER_TARGET); | ||
if (value == null) { | ||
return null; | ||
} | ||
return Integer.parseInt(value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.