You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by bw...@apache.org on 2003/04/25 11:05:38 UTC
cvs commit: maven-new/src/aspect/org/apache/maven PomInheritanceAspect.java PomInterpolationAspect.java
bwalding 2003/04/25 02:05:38
Modified: src/aspect/org/apache/maven PomInheritanceAspect.java
PomInterpolationAspect.java
Log:
Stop interpolation / inheritance on id / groupId / artifactId
Revision Changes Path
1.5 +67 -2 maven-new/src/aspect/org/apache/maven/PomInheritanceAspect.java
Index: PomInheritanceAspect.java
===================================================================
RCS file: /home/cvs/maven-new/src/aspect/org/apache/maven/PomInheritanceAspect.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- PomInheritanceAspect.java 25 Apr 2003 05:57:38 -0000 1.4
+++ PomInheritanceAspect.java 25 Apr 2003 09:05:38 -0000 1.5
@@ -1,8 +1,71 @@
package org.apache.maven;
+/* ====================================================================
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 2003 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ * if any, must include the following acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Apache" and "Apache Software Foundation" and
+ * "Apache Maven" must not be used to endorse or promote products
+ * derived from this software without prior written permission. For
+ * written permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * "Apache Maven", nor may "Apache" appear in their name, without
+ * prior written permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ * ====================================================================
+ */
+
import org.apache.maven.project.Project;
/**
+ *
+ * There is no inheritance on getId, getGroupId, getArtifactId.
+ * I couldn't be bothered filling a use case that probably doesn't
+ * exist and would convolute the code unnecessarily. XXX I could be
+ * wrong about removing inheritance on getGroupId, we'll tackle
+ * that later.
+ *
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
*
* @version $Id$
@@ -11,7 +74,9 @@
{
pointcut projectGetters(Project p): call( * Project.get*( .. ) )
&& !call( * Project.getParent( .. ) )
- //&& !call( void Project.getArtifacts() )
+ && !call( void Project.getId() )
+ && !call( void Project.getGroupId() )
+ && !call( void Project.getArtifactId() )
&& target(p);
Object around(Project p ): projectGetters(p)
1.3 +13 -1 maven-new/src/aspect/org/apache/maven/PomInterpolationAspect.java
Index: PomInterpolationAspect.java
===================================================================
RCS file: /home/cvs/maven-new/src/aspect/org/apache/maven/PomInterpolationAspect.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- PomInterpolationAspect.java 24 Apr 2003 13:50:27 -0000 1.2
+++ PomInterpolationAspect.java 25 Apr 2003 09:05:38 -0000 1.3
@@ -6,6 +6,10 @@
/** An aspect that intercepts all public getters in the project
* and interpolates values into the result before being return
* to the client code.
+ * <p/>
+ * There is no interpolation on getId, getGroupId, getArtifactId.
+ * I couldn't be bothered filling a use case that probably doesn't
+ * exist and would convolute the code unnecessarily.
*
* @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
*
@@ -17,12 +21,20 @@
aspect PomInterpolationAspect
{
pointcut projectGetters(Project p): call( String Project.get*( .. ) )
+ && !call( void Project.getId() )
+ && !call( void Project.getGroupId() )
+ && !call( void Project.getArtifactId() )
&& target(p);
String around(Project p): projectGetters(p)
{
// Let's grab the value that would normally be returned.
String s = proceed(p);
+
+ //XXX Not 100% sure if this is right or wrong
+ if (s == null) {
+ return null;
+ }
// Let's see if we need to do any value interpolation.
if ( s.indexOf( "${pom" ) >= 0 )
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: cvs commit: maven-new/src/aspect/org/apache/maven PomInheritanceAspect.java
PomInterpolationAspect.java
Posted by Rafal Krzewski <Ra...@caltha.pl>.
dion@multitask.com.au wrote:
> Is there a reason to not allow inheritance of groupId??
I think groupId inheritance is a must.
R.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: cvs commit: maven-new/src/aspect/org/apache/maven PomInheritanceAspect.java
PomInterpolationAspect.java
Posted by Ben Walding <de...@walding.com>.
You're about a bazillion years behind :)
I think I've reenabled it in my later changes. It will be supported
eventually...
dion@multitask.com.au wrote:
>Is there a reason to not allow inheritance of groupId??
>
>This would be a regression against b9 and I know of quite a few projects
>that use this feature.
>
>--
>dIon Gillard, Multitask Consulting
>Blog: http://www.freeroller.net/page/dion/Weblog
>Work: http://www.multitask.com.au
>
>
>bwalding@apache.org wrote on 25/04/2003 07:05:38 PM:
>
>
>
>>bwalding 2003/04/25 02:05:38
>>
>> Modified: src/aspect/org/apache/maven PomInheritanceAspect.java
>> PomInterpolationAspect.java
>> Log:
>> Stop interpolation / inheritance on id / groupId / artifactId
>>
>> Revision Changes Path
>> 1.5 +67 -2 maven-
>>new/src/aspect/org/apache/maven/PomInheritanceAspect.java
>>
>> Index: PomInheritanceAspect.java
>> ===================================================================
>> RCS file: /home/cvs/maven-
>>new/src/aspect/org/apache/maven/PomInheritanceAspect.java,v
>> retrieving revision 1.4
>> retrieving revision 1.5
>> diff -u -r1.4 -r1.5
>> --- PomInheritanceAspect.java 25 Apr 2003 05:57:38 -0000 1.4
>> +++ PomInheritanceAspect.java 25 Apr 2003 09:05:38 -0000 1.5
>> @@ -1,8 +1,71 @@
>> package org.apache.maven;
>>
>> +/*
>>
>>
>====================================================================
>
>
>> + * The Apache Software License, Version 1.1
>> + *
>> + * Copyright (c) 2003 The Apache Software Foundation. All rights
>> + * reserved.
>> + *
>> + * Redistribution and use in source and binary forms, with or without
>> + * modification, are permitted provided that the following conditions
>> + * are met:
>> + *
>> + * 1. Redistributions of source code must retain the above copyright
>> + * notice, this list of conditions and the following disclaimer.
>> + *
>> + * 2. Redistributions in binary form must reproduce the above
>>
>>
>copyright
>
>
>> + * notice, this list of conditions and the following disclaimer in
>> + * the documentation and/or other materials provided with the
>> + * distribution.
>> + *
>> + * 3. The end-user documentation included with the redistribution,
>> + * if any, must include the following acknowledgment:
>> + * "This product includes software developed by the
>> + * Apache Software Foundation (http://www.apache.org/)."
>> + * Alternately, this acknowledgment may appear in the software
>>
>>
>itself,
>
>
>> + * if and wherever such third-party acknowledgments normally
>>
>>
>appear.
>
>
>> + *
>> + * 4. The names "Apache" and "Apache Software Foundation" and
>> + * "Apache Maven" must not be used to endorse or promote products
>> + * derived from this software without prior written permission.
>>
>>
>For
>
>
>> + * written permission, please contact apache@apache.org.
>> + *
>> + * 5. Products derived from this software may not be called "Apache",
>> + * "Apache Maven", nor may "Apache" appear in their name, without
>> + * prior written permission of the Apache Software Foundation.
>> + *
>> + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
>> + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
>> + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
>> + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
>> + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
>> + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
>> + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
>> + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
>>
>>
>AND
>
>
>> + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
>> + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
>> + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
>> + * SUCH DAMAGE.
>> + *
>>
>>
>====================================================================
>
>
>> + *
>> + * This software consists of voluntary contributions made by many
>> + * individuals on behalf of the Apache Software Foundation. For more
>> + * information on the Apache Software Foundation, please see
>> + * <http://www.apache.org/>.
>> + *
>> + *
>>
>>
>====================================================================
>
>
>> + */
>> +
>> import org.apache.maven.project.Project;
>>
>> /**
>> + *
>> + * There is no inheritance on getId, getGroupId, getArtifactId.
>> + * I couldn't be bothered filling a use case that probably doesn't
>> + * exist and would convolute the code unnecessarily. XXX I could be
>>
>>
>
>
>
>> + * wrong about removing inheritance on getGroupId, we'll tackle
>> + * that later.
>> + *
>> * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
>> *
>> * @version $Id$
>> @@ -11,7 +74,9 @@
>> {
>> pointcut projectGetters(Project p): call( * Project.get*( .. ) )
>>
>>
>
>
>
>> && !call( * Project.
>>getParent( .. ) )
>> - //&& !call( void Project.
>>getArtifacts() )
>> + && !call( void
>>
>>
>Project.getId() )
>
>
>> + && !call( void
>>
>>
>Project.getGroupId() )
>
>
>> + && !call( void Project.
>>getArtifactId() )
>> && target(p);
>>
>> Object around(Project p ): projectGetters(p)
>>
>>
>>
>> 1.3 +13 -1 maven-
>>new/src/aspect/org/apache/maven/PomInterpolationAspect.java
>>
>> Index: PomInterpolationAspect.java
>> ===================================================================
>> RCS file: /home/cvs/maven-
>>new/src/aspect/org/apache/maven/PomInterpolationAspect.java,v
>> retrieving revision 1.2
>> retrieving revision 1.3
>> diff -u -r1.2 -r1.3
>> --- PomInterpolationAspect.java 24 Apr 2003 13:50:27 -0000 1.2
>> +++ PomInterpolationAspect.java 25 Apr 2003 09:05:38 -0000 1.3
>> @@ -6,6 +6,10 @@
>> /** An aspect that intercepts all public getters in the project
>> * and interpolates values into the result before being return
>> * to the client code.
>> + * <p/>
>> + * There is no interpolation on getId, getGroupId, getArtifactId.
>> + * I couldn't be bothered filling a use case that probably doesn't
>> + * exist and would convolute the code unnecessarily.
>> *
>> * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
>> *
>> @@ -17,12 +21,20 @@
>> aspect PomInterpolationAspect
>> {
>> pointcut projectGetters(Project p): call( String Project.get*( ..
>>
>>
>) )
>
>
>> + && !call( void
>>
>>
>Project.getId() )
>
>
>> + && !call( void
>>
>>
>Project.getGroupId() )
>
>
>> + && !call( void Project.
>>getArtifactId() )
>> && target(p);
>>
>> String around(Project p): projectGetters(p)
>> {
>> // Let's grab the value that would normally be returned.
>> String s = proceed(p);
>> +
>> + //XXX Not 100% sure if this is right or wrong
>> + if (s == null) {
>> + return null;
>> + }
>>
>> // Let's see if we need to do any value interpolation.
>> if ( s.indexOf( "${pom" ) >= 0 )
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>For additional commands, e-mail: dev-help@maven.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: cvs commit: maven-new/src/aspect/org/apache/maven
PomInheritanceAspect.java PomInterpolationAspect.java
Posted by di...@multitask.com.au.
Is there a reason to not allow inheritance of groupId??
This would be a regression against b9 and I know of quite a few projects
that use this feature.
--
dIon Gillard, Multitask Consulting
Blog: http://www.freeroller.net/page/dion/Weblog
Work: http://www.multitask.com.au
bwalding@apache.org wrote on 25/04/2003 07:05:38 PM:
> bwalding 2003/04/25 02:05:38
>
> Modified: src/aspect/org/apache/maven PomInheritanceAspect.java
> PomInterpolationAspect.java
> Log:
> Stop interpolation / inheritance on id / groupId / artifactId
>
> Revision Changes Path
> 1.5 +67 -2 maven-
> new/src/aspect/org/apache/maven/PomInheritanceAspect.java
>
> Index: PomInheritanceAspect.java
> ===================================================================
> RCS file: /home/cvs/maven-
> new/src/aspect/org/apache/maven/PomInheritanceAspect.java,v
> retrieving revision 1.4
> retrieving revision 1.5
> diff -u -r1.4 -r1.5
> --- PomInheritanceAspect.java 25 Apr 2003 05:57:38 -0000 1.4
> +++ PomInheritanceAspect.java 25 Apr 2003 09:05:38 -0000 1.5
> @@ -1,8 +1,71 @@
> package org.apache.maven;
>
> +/*
====================================================================
> + * The Apache Software License, Version 1.1
> + *
> + * Copyright (c) 2003 The Apache Software Foundation. All rights
> + * reserved.
> + *
> + * Redistribution and use in source and binary forms, with or without
> + * modification, are permitted provided that the following conditions
> + * are met:
> + *
> + * 1. Redistributions of source code must retain the above copyright
> + * notice, this list of conditions and the following disclaimer.
> + *
> + * 2. Redistributions in binary form must reproduce the above
copyright
> + * notice, this list of conditions and the following disclaimer in
> + * the documentation and/or other materials provided with the
> + * distribution.
> + *
> + * 3. The end-user documentation included with the redistribution,
> + * if any, must include the following acknowledgment:
> + * "This product includes software developed by the
> + * Apache Software Foundation (http://www.apache.org/)."
> + * Alternately, this acknowledgment may appear in the software
itself,
> + * if and wherever such third-party acknowledgments normally
appear.
> + *
> + * 4. The names "Apache" and "Apache Software Foundation" and
> + * "Apache Maven" must not be used to endorse or promote products
> + * derived from this software without prior written permission.
For
> + * written permission, please contact apache@apache.org.
> + *
> + * 5. Products derived from this software may not be called "Apache",
> + * "Apache Maven", nor may "Apache" appear in their name, without
> + * prior written permission of the Apache Software Foundation.
> + *
> + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
> + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
> + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
> + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
> + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
> + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
> + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND
> + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
> + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
> + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
> + * SUCH DAMAGE.
> + *
====================================================================
> + *
> + * This software consists of voluntary contributions made by many
> + * individuals on behalf of the Apache Software Foundation. For more
> + * information on the Apache Software Foundation, please see
> + * <http://www.apache.org/>.
> + *
> + *
====================================================================
> + */
> +
> import org.apache.maven.project.Project;
>
> /**
> + *
> + * There is no inheritance on getId, getGroupId, getArtifactId.
> + * I couldn't be bothered filling a use case that probably doesn't
> + * exist and would convolute the code unnecessarily. XXX I could be
> + * wrong about removing inheritance on getGroupId, we'll tackle
> + * that later.
> + *
> * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
> *
> * @version $Id$
> @@ -11,7 +74,9 @@
> {
> pointcut projectGetters(Project p): call( * Project.get*( .. ) )
> && !call( * Project.
> getParent( .. ) )
> - //&& !call( void Project.
> getArtifacts() )
> + && !call( void
Project.getId() )
> + && !call( void
Project.getGroupId() )
> + && !call( void Project.
> getArtifactId() )
> && target(p);
>
> Object around(Project p ): projectGetters(p)
>
>
>
> 1.3 +13 -1 maven-
> new/src/aspect/org/apache/maven/PomInterpolationAspect.java
>
> Index: PomInterpolationAspect.java
> ===================================================================
> RCS file: /home/cvs/maven-
> new/src/aspect/org/apache/maven/PomInterpolationAspect.java,v
> retrieving revision 1.2
> retrieving revision 1.3
> diff -u -r1.2 -r1.3
> --- PomInterpolationAspect.java 24 Apr 2003 13:50:27 -0000 1.2
> +++ PomInterpolationAspect.java 25 Apr 2003 09:05:38 -0000 1.3
> @@ -6,6 +6,10 @@
> /** An aspect that intercepts all public getters in the project
> * and interpolates values into the result before being return
> * to the client code.
> + * <p/>
> + * There is no interpolation on getId, getGroupId, getArtifactId.
> + * I couldn't be bothered filling a use case that probably doesn't
> + * exist and would convolute the code unnecessarily.
> *
> * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
> *
> @@ -17,12 +21,20 @@
> aspect PomInterpolationAspect
> {
> pointcut projectGetters(Project p): call( String Project.get*( ..
) )
> + && !call( void
Project.getId() )
> + && !call( void
Project.getGroupId() )
> + && !call( void Project.
> getArtifactId() )
> && target(p);
>
> String around(Project p): projectGetters(p)
> {
> // Let's grab the value that would normally be returned.
> String s = proceed(p);
> +
> + //XXX Not 100% sure if this is right or wrong
> + if (s == null) {
> + return null;
> + }
>
> // Let's see if we need to do any value interpolation.
> if ( s.indexOf( "${pom" ) >= 0 )
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org