Seam SVN: r10887 - examples/trunk/servlet-permalink.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-11 22:42:04 -0400 (Mon, 11 May 2009)
New Revision: 10887
Modified:
examples/trunk/servlet-permalink/pom.xml
Log:
disable javascript validator
Modified: examples/trunk/servlet-permalink/pom.xml
===================================================================
--- examples/trunk/servlet-permalink/pom.xml 2009-05-12 02:41:55 UTC (rev 10886)
+++ examples/trunk/servlet-permalink/pom.xml 2009-05-12 02:42:04 UTC (rev 10887)
@@ -181,9 +181,11 @@
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<additionalBuildcommands>
+ <!-- annoyingly creates a bin directory
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
</buildCommand>
+ -->
<buildCommand>
<name>org.jboss.tools.common.verification.verifybuilder</name>
</buildCommand>
15 years, 6 months
Seam SVN: r10886 - examples/trunk/servlet-permalink.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-11 22:41:55 -0400 (Mon, 11 May 2009)
New Revision: 10886
Modified:
examples/trunk/servlet-permalink/readme.txt
Log:
update
Modified: examples/trunk/servlet-permalink/readme.txt
===================================================================
--- examples/trunk/servlet-permalink/readme.txt 2009-05-12 02:26:40 UTC (rev 10885)
+++ examples/trunk/servlet-permalink/readme.txt 2009-05-12 02:41:55 UTC (rev 10886)
@@ -79,20 +79,20 @@
= Importing the project into Eclipse
-The recommendate way to setup a Seam example in Eclipse is to use the m2eclipse
+The recommended way to setup a Seam example in Eclipse is to use the m2eclipse
plugin. This plugin derives the build classpath from the dependencies listed in
the pom.xml file. It also has direct integration with Maven build commands.
-To get started with Eclipse, you first need to hook Eclipse to your Maven
-repository. That can be done using this command:
+To get started open Eclipse and import the project by selecting "Maven
+Projects" and browsing to the project folder. You can now develop the project
+in Eclipse just like any other project.
- mvn eclipse:configure-workspace
+You could also prepare the Eclipse project before hand, then import the project
+into Eclipse. First, transform the pom.xml into an m2eclipse Eclipse project
+using this command:
-You can then transform the pom.xml into an m2eclipse Eclipse project using the
-following command:
-
mvn eclipse:m2eclipse
-Now go into Eclipse an import the project by selecting "Existing projects from
-workspace". You can also simply import the project using the native m2eclipse
-Maven project importer. However, that will miss activating the WTP features.
+Now go into Eclipse an import the project by selecting "Existing projects into
+workspace" and selecting the project folder. Both approaches use the Eclipse
+project configuration defined in the pom.xml file.
15 years, 6 months
Seam SVN: r10885 - examples/trunk/servlet-permalink.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-11 22:26:40 -0400 (Mon, 11 May 2009)
New Revision: 10885
Modified:
examples/trunk/servlet-permalink/
Log:
ignore Eclipse project files (as they can be generated)
Property changes on: examples/trunk/servlet-permalink
___________________________________________________________________
Name: svn:ignore
- target
+ .classpath
.project
.settings
target
15 years, 6 months
Seam SVN: r10884 - examples/trunk.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-11 22:25:54 -0400 (Mon, 11 May 2009)
New Revision: 10884
Modified:
examples/trunk/pom.xml
Log:
reorg
add configuration for eclipse project files
Modified: examples/trunk/pom.xml
===================================================================
--- examples/trunk/pom.xml 2009-05-12 02:25:31 UTC (rev 10883)
+++ examples/trunk/pom.xml 2009-05-12 02:25:54 UTC (rev 10884)
@@ -80,38 +80,10 @@
</modules>
<build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-sources</id>
- <phase>verify</phase>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-release-plugin</artifactId>
- <version>2.0-beta-8</version>
- <configuration>
- <tagBase>https://svn.jboss.org/repos/seam/examples/tags</tagBase>
- <autoVersionSubmodules>true</autoVersionSubmodules>
- </configuration>
- </plugin>
- </plugins>
<defaultGoal>package</defaultGoal>
-
<pluginManagement>
<plugins>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
@@ -120,8 +92,19 @@
<target>1.5</target>
</configuration>
</plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <configuration>
+ <classpathContainers>
+ <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5</classpathContainer>
+ </classpathContainers>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
@@ -136,6 +119,7 @@
</archive>
</configuration>
</plugin>
+
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>emma-maven-plugin</artifactId>
@@ -145,24 +129,51 @@
<outputDirectory>${project.build.directory}/generated-classes</outputDirectory>
</configuration>
</plugin>
+
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <!--
- <configuration>
- <warSourceDirectory>${basedir}/WebContent</warSourceDirectory>
- </configuration>
- -->
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<configuration>
<ejbVersion>3.0</ejbVersion>
</configuration>
</plugin>
+
</plugins>
+
</pluginManagement>
+ <plugins>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-release-plugin</artifactId>
+ <version>2.0-beta-8</version>
+ <configuration>
+ <tagBase>https://svn.jboss.org/repos/seam/examples/tags</tagBase>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
+ </configuration>
+ </plugin>
+
+ </plugins>
+
</build>
<profiles>
@@ -182,6 +193,28 @@
</profile>
</profiles>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <configuration>
+ <formats>
+ <format>html</format>
+ <format>xml</format>
+ </formats>
+ <!--
+ <instrumentation>
+ <ignores>
+ <ignore>org.jboss.seam.*</ignore>
+ </ignores>
+ </instrumentation>
+ -->
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
<ciManagement>
<system>Hudson</system>
@@ -223,26 +256,4 @@
</snapshotRepository>
</distributionManagement>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>cobertura-maven-plugin</artifactId>
- <configuration>
- <formats>
- <format>html</format>
- <format>xml</format>
- </formats>
- <!--
- <instrumentation>
- <ignores>
- <ignore>org.jboss.seam.*</ignore>
- </ignores>
- </instrumentation>
- -->
- </configuration>
- </plugin>
- </plugins>
- </reporting>
-
</project>
15 years, 6 months
Seam SVN: r10883 - examples/trunk/servlet-permalink.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-11 22:25:31 -0400 (Mon, 11 May 2009)
New Revision: 10883
Modified:
examples/trunk/servlet-permalink/readme.txt
Log:
notes about generating eclipse files
Modified: examples/trunk/servlet-permalink/readme.txt
===================================================================
--- examples/trunk/servlet-permalink/readme.txt 2009-05-12 02:25:22 UTC (rev 10882)
+++ examples/trunk/servlet-permalink/readme.txt 2009-05-12 02:25:31 UTC (rev 10883)
@@ -77,3 +77,22 @@
mvn war:exploded tomcat:redeploy
mvn compile war:exploded tomcat:redeploy
+= Importing the project into Eclipse
+
+The recommendate way to setup a Seam example in Eclipse is to use the m2eclipse
+plugin. This plugin derives the build classpath from the dependencies listed in
+the pom.xml file. It also has direct integration with Maven build commands.
+
+To get started with Eclipse, you first need to hook Eclipse to your Maven
+repository. That can be done using this command:
+
+ mvn eclipse:configure-workspace
+
+You can then transform the pom.xml into an m2eclipse Eclipse project using the
+following command:
+
+ mvn eclipse:m2eclipse
+
+Now go into Eclipse an import the project by selecting "Existing projects from
+workspace". You can also simply import the project using the native m2eclipse
+Maven project importer. However, that will miss activating the WTP features.
15 years, 6 months
Seam SVN: r10882 - examples/trunk/servlet-permalink.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2009-05-11 22:25:22 -0400 (Mon, 11 May 2009)
New Revision: 10882
Modified:
examples/trunk/servlet-permalink/pom.xml
Log:
add eclipse project generation config
Modified: examples/trunk/servlet-permalink/pom.xml
===================================================================
--- examples/trunk/servlet-permalink/pom.xml 2009-05-12 01:09:20 UTC (rev 10881)
+++ examples/trunk/servlet-permalink/pom.xml 2009-05-12 02:25:22 UTC (rev 10882)
@@ -73,6 +73,13 @@
</dependency>
<dependency>
+ <!-- needed for reference by maven-eclipse-plugin -->
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
</dependency>
@@ -171,6 +178,43 @@
</plugin>
<plugin>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <configuration>
+ <additionalBuildcommands>
+ <buildCommand>
+ <name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.common.verification.verifybuilder</name>
+ </buildCommand>
+ </additionalBuildcommands>
+ <additionalConfig>
+ <file>
+ <name>.settings/org.maven.ide.eclipse.prefs</name>
+ <content>activeProfiles=jdk5
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1</content>
+ </file>
+ </additionalConfig>
+ <additionalProjectFacets>
+ <jst.jsf>1.2</jst.jsf> <!-- 2.0 is not yet supported -->
+ </additionalProjectFacets>
+ <additionalProjectnatures>
+ <projectnature>org.eclipse.wst.jsdt.core.jsNature</projectnature>
+ <projectnature>org.jboss.tools.jsf.jsfnature</projectnature>
+ </additionalProjectnatures>
+ <workspace>${user.home}/.eclipse/workspace</workspace>
+ <wtpdefaultserver>JBoss</wtpdefaultserver>
+ <wtpversion>1.5</wtpversion>
+ </configuration>
+ </plugin>
+
+ <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
15 years, 6 months
Seam SVN: r10881 - in modules/trunk/security: src/main/java/org/jboss/seam/security and 1 other directory.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-05-11 21:09:20 -0400 (Mon, 11 May 2009)
New Revision: 10881
Modified:
modules/trunk/security/pom.xml
modules/trunk/security/src/main/java/org/jboss/seam/security/RememberMe.java
Log:
get the rememberme bean compiling
Modified: modules/trunk/security/pom.xml
===================================================================
--- modules/trunk/security/pom.xml 2009-05-12 00:52:25 UTC (rev 10880)
+++ modules/trunk/security/pom.xml 2009-05-12 01:09:20 UTC (rev 10881)
@@ -70,6 +70,11 @@
<groupId>${seam.groupId}</groupId>
<artifactId>seam-faces</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>${seam.groupId}</groupId>
+ <artifactId>seam-view</artifactId>
+ </dependency>
<!--
<dependency>
Modified: modules/trunk/security/src/main/java/org/jboss/seam/security/RememberMe.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/RememberMe.java 2009-05-12 00:52:25 UTC (rev 10880)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/RememberMe.java 2009-05-12 01:09:20 UTC (rev 10881)
@@ -9,18 +9,18 @@
import javax.annotation.Named;
import javax.context.SessionScoped;
import javax.event.Observes;
-//import javax.faces.context.FacesContext;
import javax.inject.Current;
import javax.inject.Initializer;
+import javax.inject.manager.Bean;
+import javax.inject.manager.Manager;
-//import org.jboss.seam.faces.Selector;
import org.jboss.seam.security.events.CredentialsInitializedEvent;
-import org.jboss.seam.security.events.CredentialsUpdatedEvent;
import org.jboss.seam.security.events.LoggedOutEvent;
import org.jboss.seam.security.events.PostAuthenticateEvent;
import org.jboss.seam.security.events.QuietLoginEvent;
import org.jboss.seam.security.management.IdentityManager;
import org.jboss.seam.security.util.Base64;
+import org.jboss.seam.view.Selector;
/**
* Remember-me functionality is provided by this class, in two different flavours. The first mode
@@ -36,49 +36,8 @@
@SessionScoped
public class RememberMe implements Serializable
{
- /*
- class UsernameSelector extends Selector
- {
- @Override
- public String getCookieName()
- {
- return "org.jboss.seam.security.username";
- }
-
- @Override
- public void setDirty()
- {
- super.setDirty();
- }
-
- @Override
- public String getCookieValue()
- {
- return super.getCookieValue();
- }
-
- @Override
- public void clearCookieValue()
- {
- super.clearCookieValue();
- }
-
- @Override
- public void setCookieValueIfEnabled(String value)
- {
- super.setCookieValueIfEnabled(value);
- }
- }
-
- class TokenSelector extends UsernameSelector
- {
- @Override
- public String getCookieName()
- {
- return "org.jboss.seam.security.authtoken";
- }
- }
-
+ private static final long serialVersionUID = 2242379431576068199L;
+
private class DecodedToken
{
private String username;
@@ -112,13 +71,15 @@
}
}
- private UsernameSelector usernameSelector;
+ private Selector usernameSelector;
+ private Selector tokenSelector;
- private TokenSelector tokenSelector;
private TokenStore tokenStore;
- */
+
+ @Current Manager manager;
+
private boolean enabled;
-/*
+
private int cookieMaxAge = Selector.DEFAULT_MAX_AGE;
private boolean autoLoggedIn;
@@ -141,7 +102,7 @@
public void setMode(Mode mode)
{
this.mode = mode;
- }*/
+ }
public boolean isEnabled()
{
@@ -154,20 +115,18 @@
{
this.enabled = enabled;
// selector is null during component initialization (setup handled in @Create method)
-// if (usernameSelector != null && mode.equals(Mode.usernameOnly))
-// {
-// usernameSelector.setCookieEnabled(enabled);
-// usernameSelector.setDirty();
-// }
+ if (usernameSelector != null && mode.equals(Mode.usernameOnly))
+ {
+ usernameSelector.setCookieEnabled(enabled);
+ }
// selector is null during component initialization (setup handled in @Create method)
-// else if (tokenSelector != null && mode.equals(Mode.autoLogin))
-// {
-// tokenSelector.setCookieEnabled(enabled);
-// tokenSelector.setDirty();
-// }
+ else if (tokenSelector != null && mode.equals(Mode.autoLogin))
+ {
+ tokenSelector.setCookieEnabled(enabled);
+ }
}
}
-/*
+
public int getCookieMaxAge() {
return cookieMaxAge;
}
@@ -189,24 +148,28 @@
@Initializer
public void create()
{
+ Bean<Selector> selectorBean = manager.resolveByType(Selector.class).iterator().next();
+
if (mode.equals(Mode.usernameOnly))
{
- usernameSelector = new UsernameSelector();
+ usernameSelector = manager.getInstance(selectorBean);
+ usernameSelector.setCookieName("org.jboss.seam.security.username");
usernameSelector.setCookieEnabled(enabled);
}
else if (mode.equals(Mode.autoLogin))
{
- tokenSelector = new TokenSelector();
+ tokenSelector = manager.getInstance(selectorBean);
+ tokenSelector.setCookieName("org.jboss.seam.security.authtoken");
tokenSelector.setCookieEnabled(enabled);
-
+
// Default to JpaTokenStore
if (tokenStore == null)
{
- tokenStore = (TokenStore) Component.getInstance(JpaTokenStore.class, true);
+ tokenStore = manager.getInstanceByType(JpaTokenStore.class);
}
}
}
-
+
protected String generateTokenValue()
{
StringBuilder sb = new StringBuilder();
@@ -224,16 +187,12 @@
sb.append(value);
return Base64.encodeBytes(sb.toString().getBytes());
}
-
- public String getCookiePath()
- {
- FacesContext ctx = FacesContext.getCurrentInstance();
- return ctx != null ? ctx.getExternalContext().getRequestContextPath() : null;
- }
-
+
public void initCredentials(@Observes CredentialsInitializedEvent event)
{
- String cookiePath = getCookiePath();
+ // FIXME use the context path as the cookie path
+ // String cookiePath = getCookiePath();
+ String cookiePath = "/";
if (mode.equals(Mode.usernameOnly))
{
@@ -248,8 +207,6 @@
setEnabled(true);
event.getCredentials().setUsername(username);
}
-
- usernameSelector.setDirty();
}
else if (mode.equals(Mode.autoLogin))
{
@@ -287,7 +244,6 @@
boolean value;
}
- /*
public void quietLogin(@Observes QuietLoginEvent event)
{
if (mode.equals(Mode.autoLogin) && isEnabled())
@@ -347,10 +303,7 @@
public void postAuthenticate(@Observes PostAuthenticateEvent event)
{
if (mode.equals(Mode.usernameOnly))
- {
- // Password is set to null during authentication, so we set dirty
- usernameSelector.setDirty();
-
+ {
if ( !enabled )
{
usernameSelector.clearCookieValue();
@@ -362,9 +315,7 @@
}
}
else if (mode.equals(Mode.autoLogin))
- {
- tokenSelector.setDirty();
-
+ {
DecodedToken decoded = new DecodedToken(tokenSelector.getCookieValue());
// Invalidate the current token (if it exists) whether enabled or not
@@ -386,27 +337,15 @@
tokenSelector.setCookieValueIfEnabled(encodeToken(identity.getPrincipal().getName(), value));
}
}
- }
+ }
- public void credentialsUpdated(@Observes CredentialsUpdatedEvent event)
- {
- if (mode.equals(Mode.usernameOnly))
- {
- usernameSelector.setDirty();
- }
- }
- */
-
/**
* A flag that an application can use to protect sensitive operations if the user has been
* auto-authenticated.
- */
- /*
+ */
public boolean isAutoLoggedIn()
{
return autoLoggedIn;
}
- */
-
}
15 years, 6 months
Seam SVN: r10880 - modules/trunk/view/src/main/java/org/jboss/seam/view.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-05-11 20:52:25 -0400 (Mon, 11 May 2009)
New Revision: 10880
Modified:
modules/trunk/view/src/main/java/org/jboss/seam/view/Selector.java
Log:
make cookie name a base property
Modified: modules/trunk/view/src/main/java/org/jboss/seam/view/Selector.java
===================================================================
--- modules/trunk/view/src/main/java/org/jboss/seam/view/Selector.java 2009-05-12 00:22:42 UTC (rev 10879)
+++ modules/trunk/view/src/main/java/org/jboss/seam/view/Selector.java 2009-05-12 00:52:25 UTC (rev 10880)
@@ -35,6 +35,11 @@
private String cookiePath= "/";
/**
+ * The name of the cookie
+ */
+ private String cookieName;
+
+ /**
* Is the cookie enabled?
*
* @return false by default
@@ -94,11 +99,26 @@
}
/**
- * Override to define the cookie name
+ * Returns the name of the cookie.
+ *
+ * @return String The name of the cookie
*/
- protected abstract String getCookieName();
+ public String getCookieName()
+ {
+ return cookieName;
+ }
/**
+ * Sets the cookie name.
+ *
+ * @param cookieName String The name of the cookie
+ */
+ public void setCookieName(String cookieName)
+ {
+ this.cookieName = cookieName;
+ }
+
+ /**
* Get the value of the cookie, if this selector is enabled
*
* @return String The value of the cookie if this selector is enabled, otherwise null.
15 years, 6 months
Seam SVN: r10879 - modules/trunk/version-matrix.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-05-11 20:22:42 -0400 (Mon, 11 May 2009)
New Revision: 10879
Modified:
modules/trunk/version-matrix/pom.xml
Log:
add view module version
Modified: modules/trunk/version-matrix/pom.xml
===================================================================
--- modules/trunk/version-matrix/pom.xml 2009-05-12 00:20:17 UTC (rev 10878)
+++ modules/trunk/version-matrix/pom.xml 2009-05-12 00:22:42 UTC (rev 10879)
@@ -297,6 +297,12 @@
<artifactId>seam-security</artifactId>
<version>${seam.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>${seam.groupId}</groupId>
+ <artifactId>seam-view</artifactId>
+ <version>${seam.version}</version>
+ </dependency>
<dependency>
<groupId>${seam.groupId}</groupId>
15 years, 6 months
Seam SVN: r10878 - modules/trunk/parent.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-05-11 20:20:17 -0400 (Mon, 11 May 2009)
New Revision: 10878
Modified:
modules/trunk/parent/pom.xml
Log:
add view module to modules list
Modified: modules/trunk/parent/pom.xml
===================================================================
--- modules/trunk/parent/pom.xml 2009-05-12 00:19:35 UTC (rev 10877)
+++ modules/trunk/parent/pom.xml 2009-05-12 00:20:17 UTC (rev 10878)
@@ -99,6 +99,7 @@
<module>../faces</module>
<module>../drools</module>
<module>../security</module>
+ <module>../view</module>
</modules>
<build>
15 years, 6 months