<target name="hotdeploy-unix" if="osfamily-unix">
<exec executable="mvn" failonerror="true">
<arg value="properties:read-project-properties" />
- <arg value="cargo:undeploy" />
- <arg value="cargo:deploy" />
+ <arg value="cargo:deployer-undeploy" />
+ <arg value="cargo:deployer-deploy" />
<arg value="-Dmaven.test.skip=true" />
<arg value="-f" />
<arg value="${basedir}/pom.xml" />
<arg value="/c" />
<arg value="mvn.bat" />
<arg value="properties:read-project-properties" />
- <arg value="cargo:undeploy" />
- <arg value="cargo:deploy" />
+ <arg value="cargo:deployer-undeploy" />
+ <arg value="cargo:deployer-deploy" />
<arg value="-Dmaven.test.skip=true" />
<arg value="-f" />
<arg value="${basedir}/pom.xml" />
<?xml version="1.0" encoding="UTF-8"?>\r
<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">\r
- \r
+\r
<parent>\r
<artifactId>org.collectionspace.services.main</artifactId>\r
<groupId>org.collectionspace.services</groupId>\r
<version>1.0</version>\r
</parent>\r
\r
- \r
+\r
<modelVersion>4.0.0</modelVersion>\r
<groupId>org.collectionspace.services</groupId>\r
<artifactId>org.collectionspace.services.jaxrs.provider</artifactId>\r
<packaging>war</packaging>\r
<version>1.0</version>\r
<name>services.jaxrs.provider</name>\r
-\r
-\r
+ <properties>\r
+ <spring.version>3.0.0.RELEASE</spring.version>\r
+ <spring.security.version>3.0.2.CI-SNAPSHOT</spring.security.version>\r
+ </properties>\r
<dependencies>\r
<dependency>\r
<groupId>org.collectionspace.services</groupId>\r
<version>1.5.2</version>\r
</dependency>\r
\r
+ <!-- dependencies on spring security & framework are runtime deps only -->\r
+ <!-- the following list is kept to make sure domain has these packages -->\r
+ <!-- in the cspace/lib directory -->\r
+ <dependency>\r
+ <groupId>org.springframework.security</groupId>\r
+ <artifactId>spring-security-core</artifactId>\r
+ <version>${spring.security.version}</version>\r
+ <scope>provided</scope>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.springframework.security</groupId>\r
+ <artifactId>spring-security-config</artifactId>\r
+ <version>${spring.security.version}</version>\r
+ <scope>provided</scope>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.springframework.security</groupId>\r
+ <artifactId>spring-security-web</artifactId>\r
+ <version>${spring.security.version}</version>\r
+ <scope>provided</scope>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.springframework.security</groupId>\r
+ <artifactId>spring-security-acl</artifactId>\r
+ <version>${spring.security.version}</version>\r
+ <scope>provided</scope>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.springframework</groupId>\r
+ <artifactId>spring-context</artifactId>\r
+ <version>${spring.version}</version>\r
+ <scope>provided</scope>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.springframework</groupId>\r
+ <artifactId>spring-web</artifactId>\r
+ <version>${spring.version}</version>\r
+ <scope>provided</scope>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.springframework</groupId>\r
+ <artifactId>spring-webmvc</artifactId>\r
+ <version>${spring.version}</version>\r
+ <scope>provided</scope>\r
+ </dependency>\r
+ <dependency>\r
+ <groupId>org.springframework</groupId>\r
+ <artifactId>spring-aop</artifactId>\r
+ <version>${spring.version}</version>\r
+ <scope>provided</scope>\r
+ </dependency>\r
<!-- javax -->\r
\r
<!-- jboss -->\r
<plugin>\r
<groupId>org.codehaus.cargo</groupId>\r
<artifactId>cargo-maven2-plugin</artifactId>\r
+ <version>0.3-SNAPSHOT</version>\r
<!-- Container configuration -->\r
<configuration>\r
<container>\r
- <containerId>jboss42x</containerId>\r
+ <containerId>jboss4x</containerId>\r
<home>${jboss.dir}</home>\r
<type>remote</type>\r
</container>\r
--- /dev/null
+<!--
+ Document : applicationContext-security.xml
+ Created on :
+ Author :
+ Copyright 2010 University of California at Berkeley
+ Description:
+ spring security namespace for CS service layer
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:s="http://www.springframework.org/schema/security"
+ 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-3.0.xsd
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">
+ <s:http use-expressions="true">
+ <s:intercept-url pattern="/**" access="permitAll" />
+ <s:http-basic />
+ <s:logout />
+ </s:http>
+
+ <s:authentication-manager>
+ <s:authentication-provider ref="jaasAuthenticationProvider" user-service-ref="userDetailsService"/>
+ </s:authentication-manager>
+
+ <bean id="jaasAuthenticationProvider"
+ class="org.springframework.security.authentication.jaas.JaasAuthenticationProvider">
+ <property name="loginContextName">
+ <value>cspace</value> <!-- value should be same as in application-policy in JBoss login-config.xml -->
+ </property>
+ <property name="loginConfig">
+ <value>/WEB-INF/login.conf</value> <!-- filler, not used at runtime -->
+ </property>
+ <property name="callbackHandlers">
+ <list>
+ <bean class="org.springframework.security.authentication.jaas.JaasNameCallbackHandler"/>
+ <bean class="org.springframework.security.authentication.jaas.JaasPasswordCallbackHandler"/>
+ </list>
+ </property>
+ <property name="authorityGranters">
+ <list>
+ <bean class="org.collectionspace.authentication.spring.CSpaceAuthorityGranter"/>
+ </list>
+ </property>
+ </bean>
+
+ <bean id="userDetailsService" class="org.collectionspace.authentication.spring.CSpaceUserDetailsService">
+ </bean>
+</beans>
<param-value>/</param-value>
</context-param>
+ <!--
+ - Location of the XML file that defines the root application context
+ - Applied by ContextLoaderListener.
+ -->
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>
+ /WEB-INF/applicationContext-security.xml
+ </param-value>
+ </context-param>
+
+ <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>
+
<!-- Listeners -->
+
+ <!--
+ - Loads the root application context of this web app at startup.
+ - The application context is then available via
+ - WebApplicationContextUtils.getWebApplicationContext(servletContext).
+ -->
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+
+ <!--
+ - Publishes events for session creation and destruction through the application
+ - context. Optional unless concurrent session control is being used.
+ -->
+ <listener>
+ <listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
+ </listener>
+
+ <listener>
+ <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
+ </listener>
+
<listener>
<listener-class>
org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
<description>\r
collectionspace authentication service\r
</description>\r
- <!-- set global properties for this build -->\r
+ <!-- set global properties for this build -->\r
<property name="services.trunk" value="../../.."/>\r
<!-- enviornment should be declared before reading build.properties -->\r
<property environment="env" />\r
</condition>\r
\r
<target name="init">\r
- <!-- Create the time stamp -->\r
+ <!-- Create the time stamp -->\r
<tstamp/>\r
</target>\r
\r
\r
<target name="package" depends="package-unix,package-windows"\r
- description="Package CollectionSpace Services" />\r
+ description="Package CollectionSpace Services" />\r
<target name="package-unix" if="osfamily-unix">\r
<exec executable="mvn" failonerror="true">\r
<arg value="package" />\r
</target>\r
\r
<target name="install" depends="package,install-unix,install-windows"\r
- description="Install" />\r
+ description="Install" />\r
<target name="install-unix" if="osfamily-unix">\r
<exec executable="mvn" failonerror="true">\r
<arg value="install" />\r
<arg value="${mvn.opts}" />\r
</exec>\r
</target>\r
- \r
+\r
<target name="clean" depends="clean-unix,clean-windows"\r
- description="Delete target directories" >\r
+ description="Delete target directories" >\r
<delete dir="${build}"/>\r
</target>\r
<target name="clean-unix" if="osfamily-unix">\r
</target>\r
\r
<target name="deploy" depends="install"\r
- description="deploy authentication service in ${jboss.server.cspace}">\r
+ description="deploy authentication service in ${jboss.server.cspace}">\r
<copy file="${basedir}/target/${authentication.jar}" todir="${jboss.server.cspace}/lib"/>\r
<copy todir="${jboss.server.cspace}/cspace/services">\r
<fileset dir="${src}/main/resources/"/>\r
</target>\r
\r
<target name="undeploy"\r
- description="undeploy authentication service from ${jboss.server.cspace}">\r
+ description="undeploy authentication service from ${jboss.server.cspace}">\r
<delete file="${jboss.server.cspace}/lib/${authentication.jar}"/>\r
<echo message="Remove authentication-policy cspace from ${jboss.server.cspace}/conf/login-config.xml"/>\r
- <echo message="See Authentication Service Configuration Guide on wiki.collectionspace.org for more details"/>\r
+ <echo message="See Authentication Service Configuration Guide on wiki.collectionspace.org for more details"/>\r
</target>\r
\r
<target name="dist"\r
- description="generate distribution for authentication service" depends="package">\r
+ description="generate distribution for authentication service" depends="package">\r
<copy todir="${services.trunk}/${dist.lib.cspace}">\r
<fileset file="${basedir}/target/${authentication.jar}"/>\r
</copy>\r
<jboss.version>4.2.3.GA</jboss.version>
<jboss.ejb.version>3.0</jboss.ejb.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <spring.security.version>3.0.2.CI-SNAPSHOT</spring.security.version>
</properties>
<dependencies>
<artifactId>jbosssx</artifactId>
<version>4.2.3.GA</version>
</dependency>
+
+ <dependency>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-core</artifactId>
+ <version>${spring.security.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
</dependencies>
<build>
* See the License for the specific language governing permissions and\r
* limitations under the License.\r
*/\r
-package org.collectionspace.authentication;\r
+package org.collectionspace.authentication.jaas;\r
\r
import java.security.acl.Group;\r
import java.util.ArrayList;\r
import javax.security.auth.Subject;\r
import javax.security.auth.callback.CallbackHandler;\r
import javax.security.auth.login.LoginException;\r
+import org.collectionspace.authentication.realm.CSpaceDbRealm;\r
import org.jboss.security.auth.spi.UsernamePasswordLoginModule;\r
\r
/**\r
*/\r
public class CSpaceJBossDBLoginModule extends UsernamePasswordLoginModule {\r
\r
- private DatabaseRealm realm;\r
+ private CSpaceDbRealm realm;\r
\r
/**\r
* Initialize CSpaceDBLoginModule\r
public void initialize(Subject subject, CallbackHandler callbackHandler,\r
Map sharedState, Map options) {\r
super.initialize(subject, callbackHandler, sharedState, options);\r
- realm = new DatabaseRealm(options);\r
+ realm = new CSpaceDbRealm(options);\r
}\r
//disabled due to classloading problem\r
// private Logger logger = LoggerFactory.getLogger(CSpaceDBLoginModule.class);\r
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
-package org.collectionspace.authentication;
+package org.collectionspace.authentication.realm;
import java.lang.reflect.Constructor;
import java.security.Principal;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.collectionspace.authentication.CSpaceTenant;
/**
- * DatabaseRealm provides access to user, password, role, tenant database
+ * CSpaceDbRealm provides access to user, password, role, tenant database
* @author
*/
-public class DatabaseRealm {
+public class CSpaceDbRealm implements CSpaceRealm {
- private static Log log = LogFactory.getLog(DatabaseRealm.class);
+ private static Log log = LogFactory.getLog(CSpaceDbRealm.class);
private String datasourceName;
private String principalsQuery;
private String rolesQuery;
private boolean suspendResume;
/**
- * create DatabaseRelam
+ * CSpace Database Realm
* @param datasourceName datasource name
*/
- public DatabaseRealm(Map options) {
+ public CSpaceDbRealm(Map options) {
datasourceName = (String) options.get("dsJndiName");
if (datasourceName == null) {
datasourceName = "java:/DefaultDS";
}
- String getUsersPassword(String username) throws LoginException {
+ @Override
+ public String getUsersPassword(String username) throws LoginException {
String password = null;
Connection conn = null;
* the authenticated user.
* @return collection containing the roles
*/
- Collection<Group> getRoles(String username, String principalClassName, String groupClassName) throws LoginException {
+ @Override
+ public Collection<Group> getRoles(String username, String principalClassName, String groupClassName) throws LoginException {
if (log.isDebugEnabled()) {
log.debug("getRoleSets using rolesQuery: " + rolesQuery + ", username: " + username);
* the authenticated user.
* @return collection containing the roles
*/
- Collection<Group> getTenants(String username, String groupClassName) throws LoginException {
+ @Override
+ public Collection<Group> getTenants(String username, String groupClassName) throws LoginException {
if (log.isDebugEnabled()) {
log.debug("getTenants using tenantsQuery: " + tenantsQuery + ", username: " + username);
--- /dev/null
+/**
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+
+ * Copyright 2009 University of California at Berkeley
+
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+
+ * You may obtain a copy of the ECL 2.0 License at
+
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.collectionspace.authentication.realm;
+
+import java.security.acl.Group;
+import java.util.Collection;
+import javax.security.auth.login.LoginException;
+
+/**
+ * CSpaceRealm defines interface for CollectionSpace Realm
+ */
+public interface CSpaceRealm {
+
+ /**
+ * Obtain password for the given user
+ * @param username
+ * @return
+ * @throws LoginException
+ */
+ public String getUsersPassword(String username) throws LoginException;
+
+ /**
+ * Obtain the roles for the authenticated user.
+ * @return collection containing the roles
+ */
+ public Collection<Group> getRoles(String username, String principalClassName, String groupClassName) throws LoginException;
+
+ /**
+ * Obtain the tenants for the authenticated user.
+ * @return collection containing the roles
+ */
+ public Collection<Group> getTenants(String username, String groupClassName) throws LoginException;
+
+}
--- /dev/null
+/**
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+
+ * Copyright 2009 University of California at Berkeley
+
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+
+ * You may obtain a copy of the ECL 2.0 License at
+
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *//**
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+
+ * Copyright 2009 University of California at Berkeley
+
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+
+ * You may obtain a copy of the ECL 2.0 License at
+
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.collectionspace.authentication.spring;
+import java.security.Principal;
+import java.util.HashSet;
+import java.util.Set;
+import org.springframework.security.authentication.jaas.AuthorityGranter;
+
+/**
+ *
+ * @author
+ */
+public class CSpaceAuthorityGranter implements AuthorityGranter {
+
+ public Set<String> grant(Principal principal) {
+ Set<String> rtnSet = new HashSet<String>();
+
+
+ return rtnSet;
+ }
+}
--- /dev/null
+/**
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+
+ * Copyright 2009 University of California at Berkeley
+
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+
+ * You may obtain a copy of the ECL 2.0 License at
+
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *//**
+ * This document is a part of the source code and related artifacts
+ * for CollectionSpace, an open source collections management system
+ * for museums and related institutions:
+
+ * http://www.collectionspace.org
+ * http://wiki.collectionspace.org
+
+ * Copyright 2009 University of California at Berkeley
+
+ * Licensed under the Educational Community License (ECL), Version 2.0.
+ * You may not use this file except in compliance with this License.
+
+ * You may obtain a copy of the ECL 2.0 License at
+
+ * https://source.collectionspace.org/collection-space/LICENSE.txt
+
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package org.collectionspace.authentication.spring;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.dao.DataAccessException;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.authority.AuthorityUtils;
+import org.springframework.security.core.userdetails.User;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
+
+/**
+ * A CollectionSpace UserDetailsService for spring
+ */
+//FIXME remove test/mockup code
+public class CSpaceUserDetailsService implements UserDetailsService {
+
+ private Map<String, User> users = new HashMap<String, User>();
+ private List<GrantedAuthority> auths = AuthorityUtils.createAuthorityList("ROLE_USER");
+
+ public CSpaceUserDetailsService() {
+ users.put("test", new User("test", "", true, true, true, true, auths));
+ users.put("valid", new User("valid", "", true, true, true, true, auths));
+ users.put("locked", new User("locked", "", true, true, true, false, auths));
+ users.put("disabled", new User("disabled", "", false, true, true, true, auths));
+ users.put("credentialsExpired", new User("credentialsExpired", "", true, true, false, true, auths));
+ users.put("expired", new User("expired", "", true, false, true, true, auths));
+ }
+
+ public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException {
+ if (users.get(username) == null) {
+ throw new UsernameNotFoundException("User not found: " + username);
+ }
+
+ return users.get(username);
+ }
+}
<application-policy name="cspace">
<authentication>
- <login-module code="org.collectionspace.authentication.CSpaceJBossDBLoginModule"
+ <login-module code="org.collectionspace.authentication.jaas.CSpaceJBossDBLoginModule"
flag="required">
<module-option name="dsJndiName">CspaceDS</module-option>
<module-option name="hashAlgorithm">SHA-256</module-option>
<description>
collectionspace services common
</description>
- <!-- set global properties for this build -->
+ <!-- set global properties for this build -->
<property name="services.trunk" value="../.."/>
<!-- enviornment should be declared before reading build.properties -->
<property environment="env" />
</condition>
<target name="init" >
- <!-- Create the time stamp -->
+ <!-- Create the time stamp -->
<tstamp/>
</target>
<target name="package" depends="package-unix,package-windows"
- description="Package CollectionSpace Services" />
+ description="Package CollectionSpace Services" />
<target name="package-unix" if="osfamily-unix">
<exec executable="mvn" failonerror="true">
<arg value="package" />
</target>
<target name="install" depends="package,install-unix,install-windows"
- description="Install" />
+ description="Install" />
<target name="install-unix" if="osfamily-unix">
<exec executable="mvn" failonerror="true">
<arg value="install" />
<arg value="${mvn.opts}" />
</exec>
</target>
-
+
<target name="clean" depends="clean-unix,clean-windows"
- description="Delete target directories" >
+ description="Delete target directories" >
<delete dir="${build}"/>
</target>
<target name="clean-unix" if="osfamily-unix">
</exec>
</target>
- <target name="jpa"
- description="one time upgrade jpa binaries in ${jboss.server.cspace}">
- <move todir="${jboss.server.cspace}/jpa-upgrade/lib">
+ <target name="deploy_jpa"
+ description="deploy jpa binaries in ${jboss.server.cspace}">
+ <move todir="${jboss.server.cspace}/jpa-upgrade/lib" overwrite="false">
<filelist dir="${jboss.server.cspace}/lib">
<file name="hibernate-annotations.jar"/>
<file name="hibernate-entitymanager.jar"/>
</copy>
</target>
+ <target name="deploy_spring"
+ description="deploy spring binaries in ${jboss.server.cspace}">
+ <copy todir="${jboss.server.cspace}/lib">
+ <fileset dir="${basedir}/lib/spring"/>
+ </copy>
+ </target>
+
<target name="deploy" depends="install"
- description="deploy common elements in ${jboss.server.cspace}">
+ description="deploy common elements in ${jboss.server.cspace}">
+ <antcall target="deploy_jpa" />
+ <antcall target="deploy_spring" />
<copy todir="${jboss.server.cspace}/cspace/config/services">
<fileset dir="${basedir}/src/main/config"/>
</copy>
</target>
<target name="undeploy"
- description="undeploy common elements from ${jboss.server.cspace}">
+ description="undeploy common elements from ${jboss.server.cspace}">
<delete failonerror="false" dir="${jboss.server.cspace}/cspace/config/services"/>
</target>
+ <target name="dist_jpa"
+ description="dist jpa binaries in ${dist.server.cspace}">
+ <copy todir="${services.trunk}/${dist.server.cspace}/lib">
+ <fileset dir="${basedir}/lib/jpa-upgrade"/>
+ </copy>
+ </target>
+
+ <target name="dist_spring"
+ description="dist spring binaries in ${dist.server.cspace}">
+ <copy todir="${services.trunk}/${dist.server.cspace}/lib">
+ <fileset dir="${basedir}/lib/spring"/>
+ </copy>
+ </target>
+
<target name="dist"
- description="generate distribution for common elements" depends="package">
+ description="generate distribution for common elements" depends="package">
+ <antcall target="dist_jpa" />
+ <antcall target="dist_spring" />
<copy todir="${services.trunk}/${dist.server.cspace}/cspace/config/services">
<fileset dir="${basedir}/src/main/config"/>
</copy>
This lib directory contains binaries required to run the common layer
-in JBoss container. Corresponding binaries (if present) in JBoss domain are
+in JBoss container. Corresponding binaries (if present) in JBoss cspace domain are
either upgraded/replaced with a one-time execution task.
For jpa upgrade in mercury 0.4, the task is 'ant jpa' executed at
-service/common level.
+service/common level. From 0.5 the following tasks are added.
+
+ant deploy_jpa (replaces jpa task, deploys jpa jars to JBoss cspace domain)
+ant dist_jpa (copies required jpa jars to dist)
+ant deploy_spring (deploys spring framework and spring security jars to JBoss cspace domain)
+ant dist_spring (copies required spring framework and security jars to dist)