Properly package Security RIA
authorMathieu Baudier <mbaudier@argeo.org>
Thu, 17 Sep 2009 10:09:16 +0000 (10:09 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Thu, 17 Sep 2009 10:09:16 +0000 (10:09 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@2947 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

security/runtime/org.argeo.security.ria/assembly/ria-security.xml [new file with mode: 0644]
security/runtime/org.argeo.security.ria/pom.xml
security/runtime/org.argeo.security.ria/src/WEB-INF/applicationContext.xml [new file with mode: 0644]
security/runtime/org.argeo.security.ria/src/WEB-INF/security.xml [new file with mode: 0644]
security/runtime/org.argeo.security.ria/src/WEB-INF/web.xml [new file with mode: 0644]
security/runtime/org.argeo.security.ria/src/index.jsp [new file with mode: 0644]
security/runtime/pom.xml

diff --git a/security/runtime/org.argeo.security.ria/assembly/ria-security.xml b/security/runtime/org.argeo.security.ria/assembly/ria-security.xml
new file mode 100644 (file)
index 0000000..8fc4497
--- /dev/null
@@ -0,0 +1,17 @@
+<assembly xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/assembly-1.1.0-SNAPSHOT.xsd">
+       <id>ria-security</id>
+       <includeBaseDirectory>false</includeBaseDirectory>
+       <formats>
+               <format>zip</format>
+       </formats>
+       <fileSets>
+               <fileSet>
+                       <directory>src/argeo-ria-lib/security</directory>
+                       <outputDirectory></outputDirectory>
+                       <includes>
+                               <include>*/**</include>
+                       </includes>
+               </fileSet>
+       </fileSets>
+</assembly>
\ No newline at end of file
index e76d3c5545e7b326a48c8ccb5ea357465baa69c3..95aee7c06c950c0fc2836153d978530a38b2064b 100644 (file)
@@ -1,4 +1,5 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <parent>
                <groupId>org.argeo.commons.security</groupId>
        <groupId>org.argeo.commons.security</groupId>
        <artifactId>org.argeo.security.ria</artifactId>
        <packaging>jar</packaging>
-       <name>Argeo Security Management</name>
+       <name>Commons Security RIA</name>
        <build>
                <resources>
                        <resource>
                                <directory>src</directory>
-                               <!--
                                <includes>
                                        <include>index.jsp</include>
                                        <include>WEB-INF/*</include>
                                </includes>
-                               -->
                        </resource>
                </resources>
                <plugins>
                                                        org.springframework.web.filter,
                                                        org.springframework.security.context
                                                </Import-Package>
-                                               <Web-ContextPath>org.argeo.slc.ria</Web-ContextPath>
+                                               <Web-ContextPath>org.argeo.security.ria</Web-ContextPath>
                                        </instructions>
                                </configuration>
                                <executions>
                                <artifactId>maven-assembly-plugin</artifactId>
                                <executions>
                                        <execution>
-                                               <id>assembly-ria-slc</id>
+                                               <id>assembly-ria</id>
                                                <phase>package</phase>
                                                <goals>
                                                        <goal>single</goal>
                                                </goals>
                                                <configuration>
                                                        <descriptors>
-                                                               <descriptor>assembly/ria-slc.xml</descriptor>
+                                                               <descriptor>assembly/ria-security.xml</descriptor>
                                                        </descriptors>
                                                </configuration>
                                        </execution>
                        </plugin>
                </plugins>
        </build>
+       <dependencyManagement>
+               <dependencies>
+                       <dependency>
+                               <groupId>org.argeo.ria</groupId>
+                               <artifactId>org.argeo.ria.core</artifactId>
+                               <version>${version.argeo-ria}</version>
+                       </dependency>
+               </dependencies>
+       </dependencyManagement>
 </project>
\ No newline at end of file
diff --git a/security/runtime/org.argeo.security.ria/src/WEB-INF/applicationContext.xml b/security/runtime/org.argeo.security.ria/src/WEB-INF/applicationContext.xml
new file mode 100644 (file)
index 0000000..415bdc3
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
+       xmlns:tx="http://www.springframework.org/schema/tx"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
+       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
+       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
+
+       <import resource="security.xml" />
+
+</beans>
\ No newline at end of file
diff --git a/security/runtime/org.argeo.security.ria/src/WEB-INF/security.xml b/security/runtime/org.argeo.security.ria/src/WEB-INF/security.xml
new file mode 100644 (file)
index 0000000..ed0f29b
--- /dev/null
@@ -0,0 +1,17 @@
+<beans:beans xmlns="http://www.springframework.org/schema/security"
+       xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+              http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.4.xsd">
+
+       <http realm="User Interface">
+               <intercept-url pattern="/**" access="ROLE_ANONYMOUS" />
+               <http-basic />
+       </http>
+       <authentication-provider>
+               <user-service>
+                       <user name="test" password="test" authorities="ROLE_USER" />
+                       <user name="demo" password="demo" authorities="ROLE_USER" />
+               </user-service>
+       </authentication-provider>
+
+</beans:beans>
diff --git a/security/runtime/org.argeo.security.ria/src/WEB-INF/web.xml b/security/runtime/org.argeo.security.ria/src/WEB-INF/web.xml
new file mode 100644 (file)
index 0000000..d4675d5
--- /dev/null
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+       version="2.5">
+
+       <display-name>Argeo Security UI</display-name>
+
+       <!-- General -->
+       <context-param>
+               <param-name>contextConfigLocation</param-name>
+               <param-value>/WEB-INF/applicationContext.xml</param-value>
+       </context-param>
+
+       <listener>
+               <display-name>Spring Context</display-name>
+               <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+       </listener>
+       <context-param>
+               <param-name>contextClass</param-name>
+               <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
+       </context-param>
+
+       <!--  Security -->
+       <filter>
+               <filter-name>springSecurityFilterChain</filter-name>
+               <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+       </filter>
+
+       <filter-mapping>
+               <filter-name>springSecurityFilterChain</filter-name>
+               <url-pattern>/*</url-pattern>
+       </filter-mapping>
+
+
+</web-app>
diff --git a/security/runtime/org.argeo.security.ria/src/index.jsp b/security/runtime/org.argeo.security.ria/src/index.jsp
new file mode 100644 (file)
index 0000000..ef8da03
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<%@ page language="java" contentType="text/html"%>\r
+<%\r
+response.sendRedirect("argeo-ria/index.html");\r
+%>\r
index ca24e5b3a51281ac3e087e5dc1ab97d0af6d7a66..ccecd4c06d1e28f865aeb1234b8fbb701808e163 100644 (file)
@@ -15,5 +15,6 @@
        <modules>
                <module>org.argeo.security.core</module>
                <module>org.argeo.security.mvc</module>
+               <module>org.argeo.security.ria</module>
        </modules>
 </project>
\ No newline at end of file