Can we move this out of here and do in some other part of the
configuration processing? I would like to try and remove this
signature from Plexus for 1.0, it was added specifically for Maven and
I think we can process it when we process the configuration elsewhere.
On 14-May-09, at 5:02 PM, bentm...@apache.org wrote:
Author: bentmann
Date: Thu May 14 21:02:10 2009
New Revision: 774925
URL: http://svn.apache.org/viewvc?rev=774925&view=rev
Log:
o Restored basedir alignment
Modified:
maven/components/branches/MNG-2766/maven-core/src/main/java/org/
apache/maven/plugin/PluginParameterExpressionEvaluator.java
Modified: maven/components/branches/MNG-2766/maven-core/src/main/
java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
URL:
http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java?rev=774925&r1=774924&r2=774925&view=diff
=
=
=
=
=
=
=
=
======================================================================
--- maven/components/branches/MNG-2766/maven-core/src/main/java/org/
apache/maven/plugin/PluginParameterExpressionEvaluator.java (original)
+++ maven/components/branches/MNG-2766/maven-core/src/main/java/org/
apache/maven/plugin/PluginParameterExpressionEvaluator.java Thu May
14 21:02:10 2009
@@ -344,6 +344,26 @@
public File alignToBaseDirectory( File file )
{
+ // TODO: Copied from the DefaultInterpolator. We likely
want to resurrect the PathTranslator or at least a
+ // similar component for re-usage
+ if ( file != null )
+ {
+ if ( file.isAbsolute() )
+ {
+ // path was already absolute, just normalize file
separator and we're done
+ }
+ else if ( file.getPath().startsWith( File.separator ) )
+ {
+ // drive-relative Windows path, don't align with
project directory but with drive root
+ file = file.getAbsoluteFile();
+ }
+ else
+ {
+ // an ordinary relative path, align with project
directory
+ file = new File( new File( basedir,
file.getPath() ).toURI().normalize() ).getAbsoluteFile();
+ }
+ }
return file;
}
+
}
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)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org