On Tue, 19 Apr 2016 21:40:04 +0200, Karl Heinz Marbaise
<[email protected]> wrote:
Hi Robert,
On 4/19/16 9:27 PM, Robert Scholte wrote:
Hi,
Not sure if this is the right moment,
why not? 3.0.0 is a good moment or may be exactly the right time for
such change....
> but I'd like to make finalName
readonly for all packaging plugins.
Ok...have created an appropriate issue for...MJAR-217
The reason: for some new features I probably need to know the name of
the generated (main) artifact, preferably without having to analyze
plugin configuration. Instead, users should use the
project.build.finalName to set its value.
Can you give more details about those features ?
To keep it short: MavenProject.getClasspathElements() should be considered
a hack. Classpath is Java specific and a MavenProject should not be aware
of language specific features. With the first releases of jigsaw with its
modules it seemed like we had a serious issue here. This made me aware
that it would be much better if the name of the generated artifact was
always ${project.build.finalName}.
Same counts for example for the outputDirectories or the compiler plugin.
This way other plugins can simply build the classpath and or modulepath or
whatever purely based on the pom, not on how plugins manipulate the
MavenProject.
Hopefully this explains it a bit.
Robert
thanks,
Robert
On Tue, 19 Apr 2016 20:46:12 +0200, <[email protected]> wrote:
Author: khmarbaise
Date: Tue Apr 19 18:46:11 2016
New Revision: 1739979
URL: http://svn.apache.org/viewvc?rev=1739979&view=rev
Log:
[MJAR-209] Remove param properties that doesn't make sense for CLI
usage
o Removed the following properties:
- maven.jar.finalName
- maven.jar.skipIfEmpty
- maven.jar.classifier
- maven.jar.testClassifier
Modified:
maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java
maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/JarMojo.java
maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/TestJarMojo.java
Modified:
maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java?rev=1739979&r1=1739978&r2=1739979&view=diff
==============================================================================
---
maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java
(original)
+++
maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java
Tue Apr 19 18:46:11 2016
@@ -72,7 +72,7 @@ public abstract class AbstractJarMojo
* Starting with <b>3.0.0</b> the property has been renamed from
<code>jar.finalName</code> to
* <code>maven.jar.finalName</code>.
*/
- @Parameter( property = "maven.jar.finalName", defaultValue =
"${project.build.finalName}" )
+ @Parameter( defaultValue = "${project.build.finalName}" )
private String finalName;
/**
@@ -135,7 +135,7 @@ public abstract class AbstractJarMojo
* Starting with <b>3.0.0</b> the property has been renamed from
<code>jar.skipIfEmpty</code> to
* <code>maven.jar.skipIfEmpty</code>.
*/
- @Parameter( property = "maven.jar.skipIfEmpty", defaultValue =
"false" )
+ @Parameter( defaultValue = "false" )
private boolean skipIfEmpty;
/**
Modified:
maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/JarMojo.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/JarMojo.java?rev=1739979&r1=1739978&r2=1739979&view=diff
==============================================================================
---
maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/JarMojo.java
(original)
+++
maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/JarMojo.java
Tue Apr 19 18:46:11 2016
@@ -49,7 +49,7 @@ public class JarMojo
* If not given this will create the main artifact which is the
default behavior.
* If you try to do that a second time without using a classifier
the build will fail.
*/
- @Parameter( property = "maven.jar.classifier" )
+ @Parameter
private String classifier;
protected String getClassifier()
Modified:
maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/TestJarMojo.java
URL:
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/TestJarMojo.java?rev=1739979&r1=1739978&r2=1739979&view=diff
==============================================================================
---
maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/TestJarMojo.java
(original)
+++
maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/TestJarMojo.java
Tue Apr 19 18:46:11 2016
@@ -55,7 +55,7 @@ public class TestJarMojo
/**
* Classifier to used for {@code test-jar}.
*/
- @Parameter( property = "maven.jar.testClassifier", defaultValue =
"tests" )
+ @Parameter( defaultValue = "tests" )
private String classifier;
protected String getClassifier()
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]