diff --git a/build.gradle b/build.gradle
index 049c72fc88..524fb2f2fc 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,6 +1,7 @@
subprojects {
apply plugin: 'java'
+ apply plugin: 'eclipse'
sourceSets {
main {
@@ -16,64 +17,74 @@ subprojects {
}
}
- dependencies {
- compile fileTree(dir: libsDir, include: '*.jar')
+ dependencies {
+ compile fileTree(dir: 'war/WEB-INF/lib', include: '*.jar')
}
compileJava.doFirst {
- if (areLibsUnpacked(file(libsDir)) == false) {
- tasks.unpackLibs.execute()
+ if (file('war/WEB-INF').exists() == false) {
+ tasks.expandWar.execute()
}
}
- task cleanLibs << {
+ task cleanWar << {
ant.delete {
- ant.fileset(dir: libsDir, includes: '*.jar')
+ ant.fileset(dir: 'war', excludes: '*.war')
}
}
- task refreshLibs (dependsOn: ['cleanLibs', 'unpackLibs'])
+ task refreshWar (dependsOn: ['cleanWar', 'expandWar'])
- task unpackLibs << {
+ task expandWar << {
if (file(warFile).exists()) {
- println 'Unpacking libs from ' + warFileName + ' WAR'
-
- // unpack the jars from the war file
- ant.unzip(src: warFile, dest: libsDir) {
- ant.patternset {
- ant.include(name: '**/*.jar')
- }
- ant.mapper(type: 'flatten')
- }
+ println 'Expanding ' + warFileName + ' WAR'
+ ant.unzip(src: warFile, dest: 'war')
}
else {
- // TODO eventually we will be able to retrieve the war file if we don't have it
println 'The ' + warFile + ' was not found.'
}
}
-// task amp << {
-//
-// ant.zip(destfile: 'build/dist/blar.amp', update: 'true') {
-//
-// ant.zipfileset(file: '../module.properties')
-// ant.zipfileset(file: 'build/libs/rm.jar', prefix: 'lib')
-// ant.zipfileset(dir: '/config', prefix: 'config') {
-// ant.exclude(name: '**/module.properties')
-// }
-// }
-// }
+ task amp << {}
+ assemble.doLast {
+ tasks.amp.execute()
+ }
}
+
+
+void assembleAmp(amp, module, jar, config, web){
-Boolean areLibsUnpacked(dir){
-
- result = false;
- dir.eachFileMatch(~/.*\.jar/) {
- result = true;
- }
- return result;
+ ant.zip(destfile: amp, update: 'true') {
+
+ def moduleProperties = module + '/module.properties'
+ def fileMapping = module + '/file-mapping.properties'
+
+ if (file(moduleProperties).exists() == true) {
+ ant.zipfileset(file: moduleProperties)
+ }
+
+ if (file(fileMapping).exists() == true) {
+ ant.zipfileset(file: fileMapping)
+ }
+
+ if (jar != null) {
+ ant.zipfileset(file: jar, prefix: 'lib')
+ }
+
+ if (config != null) {
+ ant.zipfileset(dir: config, prefix: 'config') {
+ ant.exclude(name: '**/module.properties')
+ ant.exclude(name: '**/file-mapping.properties')
+ }
+ }
+
+ if (web != null) {
+ ant.zipfileset(file: web, prefix: 'web')
+ }
+ }
}
+
diff --git a/rm-server/.classpath b/rm-server/.classpath
index e191c98be8..54f363bd54 100644
--- a/rm-server/.classpath
+++ b/rm-server/.classpath
@@ -1,17 +1,282 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/rm-server/.project b/rm-server/.project
index ec8bf86f5d..47a2d689a4 100644
--- a/rm-server/.project
+++ b/rm-server/.project
@@ -1,17 +1,16 @@
- Records Management
-
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
+ rm-server
+
+
org.eclipse.jdt.core.javanature
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
diff --git a/rm-server/.settings/org.eclipse.jdt.core.prefs b/rm-server/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..1d946df44c
--- /dev/null
+++ b/rm-server/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,12 @@
+#Fri Mar 23 15:41:37 EST 2012
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/rm-server/libs/test/spring-webscripts-1.0.0-tests.jar b/rm-server/libs/test/spring-webscripts-1.0.0-tests.jar
deleted file mode 100644
index 1b386b0743..0000000000
Binary files a/rm-server/libs/test/spring-webscripts-1.0.0-tests.jar and /dev/null differ
diff --git a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/capability/RMEntryVoter.java b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/capability/RMEntryVoter.java
index 473d87ce3c..30b66d7db8 100644
--- a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/capability/RMEntryVoter.java
+++ b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/capability/RMEntryVoter.java
@@ -230,7 +230,8 @@ public class RMEntryVoter extends RMSecurityCommon
return Collections.unmodifiableSet(protectedAspects);
}
- public int vote(Authentication authentication, Object object, ConfigAttributeDefinition config)
+ @SuppressWarnings("unchecked")
+ public int vote(Authentication authentication, Object object, ConfigAttributeDefinition config)
{
if (logger.isDebugEnabled())
{
@@ -365,7 +366,8 @@ public class RMEntryVoter extends RMSecurityCommon
}
- private static QName getType(NodeService nodeService, MethodInvocation invocation, Class[] params, int position, boolean parent)
+ @SuppressWarnings("unchecked")
+ private static QName getType(NodeService nodeService, MethodInvocation invocation, Class[] params, int position, boolean parent)
{
if (QName.class.isAssignableFrom(params[position]))
{
@@ -387,7 +389,8 @@ public class RMEntryVoter extends RMSecurityCommon
return null;
}
- private static QName getQName(MethodInvocation invocation, Class[] params, int position)
+ @SuppressWarnings("unchecked")
+ private static QName getQName(MethodInvocation invocation, Class[] params, int position)
{
if (QName.class.isAssignableFrom(params[position]))
{
@@ -400,7 +403,8 @@ public class RMEntryVoter extends RMSecurityCommon
throw new ACLEntryVoterException("Unknown type");
}
- private static Serializable getProperty(MethodInvocation invocation, Class[] params, int position)
+ @SuppressWarnings("unchecked")
+ private static Serializable getProperty(MethodInvocation invocation, Class[] params, int position)
{
if (invocation.getArguments()[position] == null)
{