Skip to content

Commit

Permalink
[maven-release-plugin] copy for branch STRUTS_2_3_15_X
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszlenart committed Oct 3, 2013
2 parents 2ede2ea + d82ebc3 commit 9a3d105
Show file tree
Hide file tree
Showing 60 changed files with 130 additions and 103 deletions.
2 changes: 1 addition & 1 deletion apps/blank/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
</parent>

<artifactId>struts2-blank</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion apps/jboss-blank/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
</parent>

<artifactId>struts2-jboss-blank</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion apps/mailreader/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
</parent>

<artifactId>struts2-mailreader</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion apps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion apps/portlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
</parent>

<artifactId>struts2-portlet</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions apps/rest-showcase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
</parent>

<artifactId>struts2-rest-showcase</artifactId>
<packaging>war</packaging>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
<name>Struts 2 Rest Showcase Example</name>
<description>Struts 2 Rest Showcase Example</description>

Expand Down
2 changes: 1 addition & 1 deletion apps/showcase/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-apps</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
</parent>

<artifactId>struts2-showcase</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion archetypes/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
</parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions archetypes/struts2-archetype-blank/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-blank</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Blank</name>

Expand Down
4 changes: 2 additions & 2 deletions archetypes/struts2-archetype-convention/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-convention</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Blank Convention</name>

Expand Down
4 changes: 2 additions & 2 deletions archetypes/struts2-archetype-dbportlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-dbportlet</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Database Portlet</name>

Expand Down
4 changes: 2 additions & 2 deletions archetypes/struts2-archetype-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-plugin</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Plugin</name>

Expand Down
4 changes: 2 additions & 2 deletions archetypes/struts2-archetype-portlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-portlet</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Portlet</name>

Expand Down
4 changes: 2 additions & 2 deletions archetypes/struts2-archetype-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-archetypes</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>struts2-archetype-starter</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Struts 2 Archetypes - Starter</name>

Expand Down
4 changes: 2 additions & 2 deletions assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
</parent>

<artifactId>struts2-assembly</artifactId>
Expand Down Expand Up @@ -143,7 +143,7 @@
<dependency>
<groupId>org.apache.cxf.site-export</groupId>
<artifactId>cxf-site-export</artifactId>
<version>1.0-20130702.031849-7</version>
<version>1.0-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>

Expand Down
2 changes: 1 addition & 1 deletion bundles/admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
</parent>

<artifactId>struts2-osgi-admin-bundle</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bundles/demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-osgi-bundles</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
</parent>

<artifactId>struts2-osgi-demo-bundle</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion bundles/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
</parent>

<artifactId>struts2-osgi-bundles</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<parent>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-parent</artifactId>
<version>2.3.15.2-SNAPSHOT</version>
<version>2.3.15.3-SNAPSHOT</version>
</parent>
<artifactId>struts2-core</artifactId>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* $Id$
* $Id$
*
* Licensed to the Apache Software Foundation (ASF) under one
Expand Down Expand Up @@ -33,6 +34,7 @@
import org.apache.struts2.RequestUtils;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.StrutsConstants;
import org.apache.struts2.dispatcher.ServletDispatcherResult;
import org.apache.struts2.util.PrefixTrie;

import javax.servlet.http.HttpServletRequest;
Expand Down Expand Up @@ -168,8 +170,9 @@ public class DefaultActionMapper implements ActionMapper {

protected static final String METHOD_PREFIX = "method:";
protected static final String ACTION_PREFIX = "action:";
private static final String STRUTS2_ACTION_PREFIX_PARSED = "_struts2_action_prefix_parsed";

protected boolean allowDynamicMethodCalls = true;
protected boolean allowDynamicMethodCalls = false;
protected boolean allowSlashesInActionNames = false;
protected boolean alwaysSelectFullNamespace = false;
protected PrefixTrie prefixTrie = null;
Expand All @@ -186,25 +189,33 @@ public DefaultActionMapper() {
prefixTrie = new PrefixTrie() {
{
put(METHOD_PREFIX, new ParameterAction() {
public void execute(String key, ActionMapping mapping) {
public void execute(String key, ActionMapping mapping, HttpServletRequest request) {
if (allowDynamicMethodCalls) {
mapping.setMethod(key.substring(METHOD_PREFIX.length()));
}
}
});

put(ACTION_PREFIX, new ParameterAction() {
public void execute(String key, ActionMapping mapping) {
String name = key.substring(ACTION_PREFIX.length());
if (allowDynamicMethodCalls) {
int bang = name.indexOf('!');
if (bang != -1) {
String method = name.substring(bang + 1);
mapping.setMethod(method);
name = name.substring(0, bang);
public void execute(final String key, ActionMapping mapping, HttpServletRequest request) {
if (request != null && request.getAttribute(STRUTS2_ACTION_PREFIX_PARSED) == null) {
request.setAttribute(STRUTS2_ACTION_PREFIX_PARSED, true);
String name = key.substring(ACTION_PREFIX.length());
if (allowDynamicMethodCalls) {
int bang = name.indexOf('!');
if (bang != -1) {
String method = name.substring(bang + 1);
mapping.setMethod(method);
name = name.substring(0, bang);
}
}
String actionName = cleanupActionName(name);
mapping.setName(actionName);
if (getDefaultExtension() != null) {
actionName = actionName + "." + getDefaultExtension();
}
mapping.setResult(new ServletDispatcherResult(actionName));
}
mapping.setName(cleanupActionName(name));
}
});

Expand All @@ -225,7 +236,7 @@ protected void addParameterAction(String prefix, ParameterAction parameterAction

@Inject(StrutsConstants.STRUTS_ENABLE_DYNAMIC_METHOD_INVOCATION)
public void setAllowDynamicMethodCalls(String allow) {
allowDynamicMethodCalls = "true".equals(allow);
allowDynamicMethodCalls = "true".equalsIgnoreCase(allow);
}

@Inject(StrutsConstants.STRUTS_ENABLE_SLASHES_IN_ACTION_NAMES)
Expand Down Expand Up @@ -335,7 +346,7 @@ public void handleSpecialParameters(HttpServletRequest request, ActionMapping ma
if (!uniqueParameters.contains(key)) {
ParameterAction parameterAction = (ParameterAction) prefixTrie.get(key);
if (parameterAction != null) {
parameterAction.execute(key, mapping);
parameterAction.execute(key, mapping, request);
uniqueParameters.add(key);
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

package org.apache.struts2.dispatcher.mapper;

import javax.servlet.http.HttpServletRequest;

/**
* Defines a parameter action prefix. This is executed when the configured prefix key is matched in a parameter
* name, allowing the implementation to manipulate the action mapping accordingly. For example, if the "action:foo"
Expand All @@ -30,5 +32,5 @@
* @since 2.1.0
*/
public interface ParameterAction {
void execute(String key, ActionMapping mapping);
void execute(String key, ActionMapping mapping, HttpServletRequest request);
}
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ struts.serve.static.browserCache=true
### like method:bar (but not action:foo).
### An alternative to implicit dynamic method invocation is to use wildcard
### mappings, such as <action name="*/*" method="{2}" class="actions.{1}">
struts.enable.DynamicMethodInvocation = true
struts.enable.DynamicMethodInvocation = false

### Set this to true if you wish to allow slashes in your action names. If false,
### Actions names cannot have slashes, and will be accessible via any directory
Expand Down
Loading

0 comments on commit 9a3d105

Please sign in to comment.