You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2009/06/02 20:53:28 UTC

svn commit: r781123 - in /maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation: BuildTimestampValueSource.java PathTranslatingPostProcessor.java

Author: bentmann
Date: Tue Jun  2 18:53:27 2009
New Revision: 781123

URL: http://svn.apache.org/viewvc?rev=781123&view=rev
Log:
o Removed utility classes from public API

Modified:
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/BuildTimestampValueSource.java
    maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/PathTranslatingPostProcessor.java

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/BuildTimestampValueSource.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/BuildTimestampValueSource.java?rev=781123&r1=781122&r2=781123&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/BuildTimestampValueSource.java (original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/BuildTimestampValueSource.java Tue Jun  2 18:53:27 2009
@@ -28,7 +28,7 @@
  *
  * @version $Id$
  */
-public class BuildTimestampValueSource
+class BuildTimestampValueSource
     extends AbstractValueSource
 {
 

Modified: maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/PathTranslatingPostProcessor.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/PathTranslatingPostProcessor.java?rev=781123&r1=781122&r2=781123&view=diff
==============================================================================
--- maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/PathTranslatingPostProcessor.java (original)
+++ maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/PathTranslatingPostProcessor.java Tue Jun  2 18:53:27 2009
@@ -30,7 +30,7 @@
  * 
  * @version $Id$
  */
-public class PathTranslatingPostProcessor
+class PathTranslatingPostProcessor
     implements InterpolationPostProcessor
 {
 



Re: svn commit: r781123 - in /maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation: BuildTimestampValueSource.java PathTranslatingPostProcessor.java

Posted by Jason van Zyl <jv...@sonatype.com>.
On 11-Jun-09, at 6:47 PM, Benjamin Bentmann wrote:

> Jason van Zyl wrote:
>
>> I just did this to the request before processing:
>>            request.getProperties().put( "${build.timestamp}", new  
>> SimpleDateFormat( "yyyyMMdd- 
>> hhmm" ).format( request.getStartTime() ) );
>
> The problem with this approach is that the format should be  
> customizable  by a project property.
>

You missed the second part of my message. I agree with you.

"some declarative way to insert properties without having to create  
new classes would be nice"

>
> Benjamin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/SonatypeNexus
http://twitter.com/SonatypeM2E
----------------------------------------------------------

A man enjoys his work when he understands the whole and when he
is responsible for the quality of the whole

  -- Christopher Alexander, A Pattern Language


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: svn commit: r781123 - in /maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation: BuildTimestampValueSource.java PathTranslatingPostProcessor.java

Posted by Benjamin Bentmann <be...@udo.edu>.
Jason van Zyl wrote:

> I just did this to the request before processing:
> 
>             request.getProperties().put( "${build.timestamp}", new 
> SimpleDateFormat( "yyyyMMdd-hhmm" ).format( request.getStartTime() ) );

The problem with this approach is that the format should be customizable 
  by a project property.


Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: svn commit: r781123 - in /maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation: BuildTimestampValueSource.java PathTranslatingPostProcessor.java

Posted by Jason van Zyl <jv...@sonatype.com>.
I don't think we want to be making classes for individual properties  
like this. I just injected a property in the Maven component for this  
particular case, but some declarative way to insert properties without  
having to create new classes would be nice. I just did this to the  
request before processing:

             request.getProperties().put( "${build.timestamp}", new  
SimpleDateFormat( "yyyyMMdd-hhmm" ).format( request.getStartTime() ) );

On 2-Jun-09, at 11:53 AM, bentmann@apache.org wrote:

> Author: bentmann
> Date: Tue Jun  2 18:53:27 2009
> New Revision: 781123
>
> URL: http://svn.apache.org/viewvc?rev=781123&view=rev
> Log:
> o Removed utility classes from public API
>
> Modified:
>    maven/components/trunk/maven-model-builder/src/main/java/org/ 
> apache/maven/model/interpolation/BuildTimestampValueSource.java
>    maven/components/trunk/maven-model-builder/src/main/java/org/ 
> apache/maven/model/interpolation/PathTranslatingPostProcessor.java
>
> Modified: maven/components/trunk/maven-model-builder/src/main/java/ 
> org/apache/maven/model/interpolation/BuildTimestampValueSource.java
> URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/BuildTimestampValueSource.java?rev=781123&r1=781122&r2=781123&view=diff
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- maven/components/trunk/maven-model-builder/src/main/java/org/ 
> apache/maven/model/interpolation/BuildTimestampValueSource.java  
> (original)
> +++ maven/components/trunk/maven-model-builder/src/main/java/org/ 
> apache/maven/model/interpolation/BuildTimestampValueSource.java Tue  
> Jun  2 18:53:27 2009
> @@ -28,7 +28,7 @@
>  *
>  * @version $Id$
>  */
> -public class BuildTimestampValueSource
> +class BuildTimestampValueSource
>     extends AbstractValueSource
> {
>
>
> Modified: maven/components/trunk/maven-model-builder/src/main/java/ 
> org/apache/maven/model/interpolation/PathTranslatingPostProcessor.java
> URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/PathTranslatingPostProcessor.java?rev=781123&r1=781122&r2=781123&view=diff
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- maven/components/trunk/maven-model-builder/src/main/java/org/ 
> apache/maven/model/interpolation/PathTranslatingPostProcessor.java  
> (original)
> +++ maven/components/trunk/maven-model-builder/src/main/java/org/ 
> apache/maven/model/interpolation/PathTranslatingPostProcessor.java  
> Tue Jun  2 18:53:27 2009
> @@ -30,7 +30,7 @@
>  *
>  * @version $Id$
>  */
> -public class PathTranslatingPostProcessor
> +class PathTranslatingPostProcessor
>     implements InterpolationPostProcessor
> {
>
>
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/SonatypeNexus
http://twitter.com/SonatypeM2E
----------------------------------------------------------

First, the taking in of scattered particulars under one Idea,
so that everyone understands what is being talked about ... Second,
the separation of the Idea into parts, by dividing it at the joints,
as nature directs, not breaking any limb in half as a bad carver might.

   -- Plato, Phaedrus (Notes on the Synthesis of Form by C. Alexander)