Skip to content
Commits on Source (8)
language: java
jdk:
- oraclejdk7
- openjdk7
- oraclejdk8
script: "mvn --show-version --errors --batch-mode -Prun-its clean verify"
......@@ -14,3 +14,4 @@ branches:
notifications:
email:
- olamy@apache.org
- kama@soebes.de
......@@ -2,6 +2,15 @@ Plexus-Interpolation
===============
[![Build Status](https://travis-ci.org/codehaus-plexus/plexus-interpolation.svg?branch=master)](https://travis-ci.org/codehaus-plexus/plexus-interpolation)
[![Maven Central](https://img.shields.io/maven-central/v/org.codehaus.plexus/plexus-interpolation.svg?label=Maven%20Central)](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.codehaus.plexus%22%20a%3A%plexus-interpolation%22)
The current master is now at https://github.com/codehaus-plexus/plexus-interpolation
Components for interpolating `${}` strings and the like.
For publishing [the site](https://codehaus-plexus.github.io/plexus-io/) do the following:
```
mvn -Preporting verify site-deploy
```
plexus-interpolation (1.25-1) unstable; urgency=medium
* Team upload.
* New upstream release
- Set the JAVA_HOME variable when running the tests
* Standards-Version updated to 4.1.5
* Switch to debhelper level 11
* Use salsa.debian.org Vcs-* URLs
-- Emmanuel Bourg <ebourg@apache.org> Mon, 30 Jul 2018 15:23:06 +0200
plexus-interpolation (1.24-1) unstable; urgency=medium
* Team upload.
......
......@@ -2,13 +2,20 @@ Source: plexus-interpolation
Section: java
Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org>
Uploaders: Torsten Werner <twerner@debian.org>,
Uploaders:
Torsten Werner <twerner@debian.org>,
Ludovic Claude <ludovic.claude@laposte.net>
Build-Depends: debhelper (>= 10), default-jdk, maven-debian-helper (>= 2.2~)
Build-Depends-Indep: default-jdk-doc, libmaven-javadoc-plugin-java, libmaven-bundle-plugin-java, junit4
Standards-Version: 3.9.8
Vcs-Git: https://anonscm.debian.org/git/pkg-java/plexus-interpolation.git
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-java/plexus-interpolation.git
Build-Depends:
debhelper (>= 11~),
default-jdk,
default-jdk-doc,
junit4,
libmaven-bundle-plugin-java,
libmaven-javadoc-plugin-java,
maven-debian-helper (>= 2.2~)
Standards-Version: 4.1.5
Vcs-Git: https://salsa.debian.org/java-team/plexus-interpolation.git
Vcs-Browser: https://salsa.debian.org/java-team/plexus-interpolation
Homepage: https://github.com/codehaus-plexus/plexus-interpolation
Package: libplexus-interpolation-java
......
......@@ -108,4 +108,3 @@ License:
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.
target/apidocs/* usr/share/doc/libplexus-interpolation-java/api
# Maven clean ignore rules - ignore some Maven dependencies and plugins
# during the clean phase of a Maven build
# Format of this file is:
# [group] [artifact] [type] [version] [classifier] [scope]
# where each element can be either
# - the exact string, for example org.apache for the group, or 3.1
# for the version. In this case, the element is simply matched
# and left as it is
# - * (the star character, alone). In this case, anything will
# match and be left as it is. For example, using * on the
# position of the artifact field will match any artifact id
# All elements much match before a rule can be applied
# Example rule: match jar with groupid= junit, artifactid= junit
# and version starting with 3., this dependency is then removed
# from the POM before mvn clean is called
# junit junit jar s/3\\..*/3.x/
# Maven published rules - additional rules to publish, to help
# the packaging work of Debian maintainers using mh_make
# Format of this file is:
# [group] [artifact] [type] [version] [classifier] [scope]
# where each element can be either
# - the exact string, for example org.apache for the group, or 3.1
# for the version. In this case, the element is simply matched
# and left as it is
# - * (the star character, alone). In this case, anything will
# match and be left as it is. For example, using * on the
# position of the artifact field will match any artifact id
# - a regular expression of the form s/match/replace/
# in this case, elements that match are transformed using
# the regex rule.
# All elements much match before a rule can be applied
# Example rule: match jar with groupid= junit, artifactid= junit
# and version starting with 3., replacing the version with 3.x
# junit junit jar s/3\\..*/3.x/
......@@ -3,5 +3,6 @@
%:
dh $@
get-orig-source:
uscan --download-current-version --force-download --rename
override_dh_auto_test:
# EnvarBasedValueSourceTest requires JAVA_HOME to be set
JAVA_HOME=/usr/lib/jvm/default-java dh_auto_test
......@@ -4,11 +4,11 @@
<parent>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus</artifactId>
<version>4.0</version>
<version>5.1</version>
</parent>
<artifactId>plexus-interpolation</artifactId>
<version>1.24</version>
<version>1.25</version>
<packaging>bundle</packaging>
<name>Plexus Interpolation API</name>
......@@ -16,8 +16,8 @@
<scm>
<connection>scm:git:git@github.com:codehaus-plexus/plexus-interpolation.git</connection>
<developerConnection>scm:git:git@github.com:codehaus-plexus/plexus-interpolation.git</developerConnection>
<url>http://github.com/codehaus-plexus/plexus-interpolation</url>
<tag>plexus-interpolation-1.24</tag>
<url>http://github.com/codehaus-plexus/plexus-interpolation/tree/${project.scm.tag}/</url>
<tag>plexus-interpolation-1.25</tag>
</scm>
<issueManagement>
......
......@@ -24,11 +24,9 @@ package org.codehaus.plexus.interpolation;
* {@link AbstractFunctionValueSourceWrapper#executeFunction(String, Object)}
* together. The result of this is returned as the resolved value for the second
* expression.
* <br/>
* This allows the first expression to be a function name that modifies the
* <p>This allows the first expression to be a function name that modifies the
* value of the second expression, which is resolved from the wrapped value
* source.
* @version $Id$
* source.</p>
*/
public abstract class AbstractFunctionValueSourceWrapper
implements ValueSource
......@@ -74,6 +72,7 @@ public abstract class AbstractFunctionValueSourceWrapper
/**
* Retrieve the embedded value source.
* @return {@link ValueSource}
*/
protected ValueSource getValueSource()
{
......
......@@ -24,29 +24,33 @@ public interface BasicInterpolator
{
/**
* See {@link org.codehaus.plexus.interpolation.Interpolator#interpolate(String, String, org.codehaus.plexus.interpolation.RecursionInterceptor)}.
* <br/>
* <p>
* This method triggers the use of a {@link org.codehaus.plexus.interpolation.SimpleRecursionInterceptor}
* instance for protection against expression cycles. It also leaves empty the
* expression prefix which would otherwise be trimmed from expressions. The
* result is that any detected expression will be resolved as-is.
* result is that any detected expression will be resolved as-is.</p>
*
* @param input The input string to interpolate
* @return the interpolated string.
* @throws InterpolationException in case of an error.
*/
String interpolate( String input )
throws InterpolationException;
/**
* See {@link org.codehaus.plexus.interpolation.Interpolator#interpolate(String, String, org.codehaus.plexus.interpolation.RecursionInterceptor)}.
* <br/>
* <p>
* This method leaves empty the expression prefix which would otherwise be
* trimmed from expressions. The result is that any detected expression will
* be resolved as-is.
* be resolved as-is.</p>
*
* @param input The input string to interpolate
*
* @param recursionInterceptor Used to protect the interpolation process
* from expression cycles, and throw an
* exception if one is detected.
* @return the interpolated string.
* @throws InterpolationException in case of an error.
*/
String interpolate( String input, RecursionInterceptor recursionInterceptor )
throws InterpolationException;
......
......@@ -26,8 +26,6 @@ import java.util.Properties;
* available from the underlying operating system (and possibly, the shell environment
* that created the present Java process). If the expression starts with 'env.',
* this prefix is trimmed before resolving the rest as an environment variable name.
*
* @version $Id$
*/
public class EnvarBasedValueSource
extends AbstractValueSource
......@@ -43,7 +41,7 @@ public class EnvarBasedValueSource
* Create a new value source for interpolation based on shell environment variables. In this
* case, envar keys ARE CASE SENSITIVE.
*
* @throws IOException
* @throws IOException in case of an error.
*/
public EnvarBasedValueSource() throws IOException
{
......@@ -55,7 +53,7 @@ public class EnvarBasedValueSource
*
* @param caseSensitive Whether the environment variable key should be treated in a
* case-sensitive manner for lookups
* @throws IOException
* @throws IOException in case of an error.
*/
public EnvarBasedValueSource( boolean caseSensitive ) throws IOException
{
......@@ -111,4 +109,13 @@ public class EnvarBasedValueSource
return envars.getProperty( expr );
}
/**
* reset static variables acting as a cache for testing purposes only
*/
static void resetStatics()
{
envarsCaseSensitive = null;
envarsCaseInsensitive = null;
}
}
......@@ -22,7 +22,6 @@ package org.codehaus.plexus.interpolation;
* about what may have gone wrong while resolving the value for an expression.
*
* @author jdcasey
* @version $Id$
*
* @deprecated Rolled into {@link ValueSource} now.
*/
......
......@@ -25,7 +25,6 @@ package org.codehaus.plexus.interpolation;
* being thrown. Instead, they should be reported in the feedback from the {@link ValueSource},
* which is propagated out through {@link Interpolator#getFeedback()}.
*
* @version $Id$
*/
public class InterpolationException
extends Exception
......
......@@ -19,7 +19,6 @@ package org.codehaus.plexus.interpolation;
/**
* Used to allow full recursion of value interpolation before applying some rule
* to the result.
* @version $Id$
*/
public interface InterpolationPostProcessor
{
......
......@@ -22,7 +22,6 @@ import java.util.List;
* Interpolator interface. Based on existing RegexBasedInterpolator interface.
*
* @author cstamas
* @version $Id$
*/
public interface Interpolator
extends BasicInterpolator
......@@ -31,36 +30,42 @@ public interface Interpolator
/**
* Add a new {@link ValueSource} to the stack used to resolve expressions
* in this interpolator instance.
* @param valueSource {@link ValueSource}.
*/
void addValueSource( ValueSource valueSource );
/**
* Remove the specified {@link ValueSource} from the stack used to resolve
* expressions in this interpolator instance.
* @param valueSource {@link ValueSource}.
*/
void removeValuesSource( ValueSource valueSource );
/**
* Add a new post-processor to handle final processing after
* recursively-interpolated value is determined.
* @param postProcessor {@link InterpolationPostProcessor}.
*/
void addPostProcessor( InterpolationPostProcessor postProcessor );
/**
* Remove the given post-processor.
* @param postProcessor {@link InterpolationPostProcessor}.
*/
void removePostProcessor( InterpolationPostProcessor postProcessor );
/**
* See {@link Interpolator#interpolate(String, String, RecursionInterceptor)}.
* <br/>
* <p>
* This method triggers the use of a {@link SimpleRecursionInterceptor}
* instance for protection against expression cycles.
* instance for protection against expression cycles.</p>
*
* @param input The input string to interpolate
*
* @param thisPrefixPattern An optional pattern that should be trimmed from
* the start of any expressions found in the input.
* @return interpolated string.
* @throws InterpolationException in case of an error.
*/
String interpolate( String input,
String thisPrefixPattern )
......@@ -81,6 +86,8 @@ public interface Interpolator
* @param recursionInterceptor Used to protect the interpolation process
* from expression cycles, and throw an
* exception if one is detected.
* @return interpolated string.
* @throws InterpolationException in case of an error.
*/
String interpolate( String input,
String thisPrefixPattern,
......@@ -103,8 +110,14 @@ public interface Interpolator
*/
void clearFeedback();
/**
* @return state of the cacheAnswers
*/
boolean isCacheAnswers();
/**
* @param cacheAnswers true/false.
*/
void setCacheAnswers( boolean cacheAnswers );
void clearAnswers();
......
......@@ -63,7 +63,6 @@ import java.io.Reader;
* implementation. This implementation is heavily based on org.codehaus.plexus.util.InterpolationFilterReader.
*
* @author cstamas
* @version $Id$
*/
public class InterpolatorFilterReader
extends FilterReader
......
......@@ -21,7 +21,6 @@ import java.util.Map;
/**
* Wraps a Map, and looks up the whole expression as a single key, returning the
* value mapped to it.
* @version $Id$
*/
public class MapBasedValueSource
extends AbstractValueSource
......@@ -31,6 +30,7 @@ public class MapBasedValueSource
/**
* Construct a new value source to wrap the supplied map.
* @param values key,value of mapping.
*/
public MapBasedValueSource( Map values )
{
......