From: Mathieu Baudier Date: Tue, 7 Jul 2009 09:26:49 +0000 (+0000) Subject: Simplify minimal configs for execution X-Git-Tag: argeo-slc-2.1.7~1678 X-Git-Url: http://git.argeo.org/?a=commitdiff_plain;h=8861e83b49d18125979d916418b1e378c6450378;p=gpl%2Fargeo-slc.git Simplify minimal configs for execution git-svn-id: https://svn.argeo.org/slc/trunk@2705 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- diff --git a/demo/pom.xml b/demo/pom.xml index 71be268c1..389311602 100644 --- a/demo/pom.xml +++ b/demo/pom.xml @@ -162,6 +162,43 @@ + + standalone + + + + org.argeo.maven.plugins + maven-argeo-osgi-plugin + + target/exec/agent + + + org.springframework.osgi.extender, + org.argeo.slc.support.equinox, + org.argeo.slc.agent + + + ${basedir}/site;in=*;ex=pom.xml;ex=target, + ${basedir}/../modules/agent;in=*;ex=pom.xml;ex=target + + + + + + + + + org.argeo.slc.dep + org.argeo.slc.dep.agent + ${project.version} + + + org.argeo.slc.runtime + org.argeo.slc.support.ant + ${project.version} + + + server_mysql diff --git a/demo/site/org.argeo.slc.demo.ant/META-INF/MANIFEST.MF b/demo/site/org.argeo.slc.demo.ant/META-INF/MANIFEST.MF index 27a4ecff4..ebedc4ac4 100644 --- a/demo/site/org.argeo.slc.demo.ant/META-INF/MANIFEST.MF +++ b/demo/site/org.argeo.slc.demo.ant/META-INF/MANIFEST.MF @@ -4,18 +4,12 @@ Bundle-Name: SLC Demo Ant Bundle-Description: Demonstrate Ant support Spring-Context: conf/*,conf/testCases/* Bundle-SymbolicName: org.argeo.slc.demo.ant -Import-Package: net.sf.cglib.core, - net.sf.cglib.proxy, - net.sf.cglib.reflect, +Import-Package: org.aopalliance.aop, - org.apache.commons.logging, org.argeo.slc.ant, org.argeo.slc.core.execution, - org.argeo.slc.core.execution.tasks, org.argeo.slc.execution, org.argeo.slc.osgi, - org.argeo.slc.osgi.execution, - org.argeo.slc.structure, org.springframework.aop, org.springframework.aop.framework, org.springframework.aop.scope, diff --git a/demo/site/org.argeo.slc.demo.ant/conf/ant.xml b/demo/site/org.argeo.slc.demo.ant/conf/ant.xml index 7985043dd..3cff3b49f 100644 --- a/demo/site/org.argeo.slc.demo.ant/conf/ant.xml +++ b/demo/site/org.argeo.slc.demo.ant/conf/ant.xml @@ -7,7 +7,7 @@ http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"> - + diff --git a/demo/site/org.argeo.slc.demo.ant/conf/imports.xml b/demo/site/org.argeo.slc.demo.ant/conf/imports.xml index c5f6e3ace..3428e8b85 100644 --- a/demo/site/org.argeo.slc.demo.ant/conf/imports.xml +++ b/demo/site/org.argeo.slc.demo.ant/conf/imports.xml @@ -4,5 +4,5 @@ xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> - + \ No newline at end of file diff --git a/demo/site/org.argeo.slc.demo.ant/conf/osgi.xml b/demo/site/org.argeo.slc.demo.ant/conf/osgi.xml index 74b537da9..f50522973 100644 --- a/demo/site/org.argeo.slc.demo.ant/conf/osgi.xml +++ b/demo/site/org.argeo.slc.demo.ant/conf/osgi.xml @@ -6,5 +6,5 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> - + \ No newline at end of file diff --git a/demo/site/org.argeo.slc.demo.basic/META-INF/MANIFEST.MF b/demo/site/org.argeo.slc.demo.basic/META-INF/MANIFEST.MF index f26a85e8d..4a06bbe51 100644 --- a/demo/site/org.argeo.slc.demo.basic/META-INF/MANIFEST.MF +++ b/demo/site/org.argeo.slc.demo.basic/META-INF/MANIFEST.MF @@ -15,13 +15,11 @@ Import-Package: org.argeo.slc.test, org.argeo.slc.execution, org.argeo.slc.osgi, - org.argeo.slc.osgi.execution, org.argeo.slc.structure, net.sf.cglib.core, net.sf.cglib.proxy, net.sf.cglib.reflect, org.aopalliance.aop, - org.apache.commons.logging, org.springframework.aop, org.springframework.aop.framework, org.springframework.aop.scope, diff --git a/demo/site/org.argeo.slc.demo.basic/conf/osgi.xml b/demo/site/org.argeo.slc.demo.basic/conf/osgi.xml index a6f9740ef..8cc7a3862 100644 --- a/demo/site/org.argeo.slc.demo.basic/conf/osgi.xml +++ b/demo/site/org.argeo.slc.demo.basic/conf/osgi.xml @@ -6,9 +6,10 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> - + - + \ No newline at end of file diff --git a/demo/site/org.argeo.slc.demo.minimal/META-INF/MANIFEST.MF b/demo/site/org.argeo.slc.demo.minimal/META-INF/MANIFEST.MF index ba406292b..adce16a32 100644 --- a/demo/site/org.argeo.slc.demo.minimal/META-INF/MANIFEST.MF +++ b/demo/site/org.argeo.slc.demo.minimal/META-INF/MANIFEST.MF @@ -5,19 +5,12 @@ Bundle-Name: SLC Demo Minimal Module Bundle-Description: Minimal functioning execution module Spring-Context: slc/* Import-Package: - net.sf.cglib.core, - net.sf.cglib.proxy, - net.sf.cglib.reflect, org.aopalliance.aop, - org.apache.commons.logging, org.argeo.slc.core.execution, org.argeo.slc.core.execution.tasks, org.argeo.slc.execution, org.argeo.slc.osgi, - org.argeo.slc.osgi.execution, - org.argeo.slc.structure, org.springframework.aop, org.springframework.aop.framework, org.springframework.aop.scope, - org.springframework.beans.factory.config, - org.springframework.core.io + org.springframework.beans.factory.config diff --git a/demo/site/org.argeo.slc.demo.minimal/slc/imports.xml b/demo/site/org.argeo.slc.demo.minimal/slc/imports.xml index c5f6e3ace..a7ace36c1 100644 --- a/demo/site/org.argeo.slc.demo.minimal/slc/imports.xml +++ b/demo/site/org.argeo.slc.demo.minimal/slc/imports.xml @@ -1,8 +1,20 @@ + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd + http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"> + + + + + + + + + - \ No newline at end of file diff --git a/demo/site/org.argeo.slc.demo.minimal/slc/main.xml b/demo/site/org.argeo.slc.demo.minimal/slc/main.xml index 59024bfb6..e0e35d072 100644 --- a/demo/site/org.argeo.slc.demo.minimal/slc/main.xml +++ b/demo/site/org.argeo.slc.demo.minimal/slc/main.xml @@ -4,13 +4,12 @@ xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd - http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"> - + - + diff --git a/demo/site/org.argeo.slc.demo.minimal/slc/osgi.xml b/demo/site/org.argeo.slc.demo.minimal/slc/osgi.xml index 74b537da9..f50522973 100644 --- a/demo/site/org.argeo.slc.demo.minimal/slc/osgi.xml +++ b/demo/site/org.argeo.slc.demo.minimal/slc/osgi.xml @@ -6,5 +6,5 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> - + \ No newline at end of file diff --git a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/AbstractExecutionFlowGenerator.java b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/AbstractExecutionFlowGenerator.java index 772d445d0..19861151a 100644 --- a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/AbstractExecutionFlowGenerator.java +++ b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/AbstractExecutionFlowGenerator.java @@ -18,8 +18,7 @@ import org.springframework.core.PriorityOrdered; public abstract class AbstractExecutionFlowGenerator implements BeanFactoryPostProcessor, PriorityOrdered { - private final static Log log = LogFactory - .getLog(AbstractExecutionFlowGenerator.class); + private final Log log = LogFactory.getLog(getClass()); protected abstract Map createExecutionFlowDefinitions( ConfigurableListableBeanFactory beanFactory); @@ -34,7 +33,7 @@ public abstract class AbstractExecutionFlowGenerator implements Map definitions = createExecutionFlowDefinitions(beanFactory); for (String beanName : definitions.keySet()) { - if (log.isDebugEnabled()) + if (log.isTraceEnabled()) log.debug("Registering execution flow " + beanName); ((BeanDefinitionRegistry) beanFactory).registerBeanDefinition( beanName, definitions.get(beanName)); diff --git a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlow.java b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlow.java index 7fd07fe77..a25034e34 100644 --- a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlow.java +++ b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/DefaultExecutionFlow.java @@ -18,7 +18,7 @@ import org.springframework.beans.factory.InitializingBean; import org.springframework.validation.MapBindingResult; public class DefaultExecutionFlow implements ExecutionFlow, InitializingBean, - BeanNameAware, StructureAware { + BeanNameAware { private final ExecutionSpec executionSpec; private String name = null; @@ -95,6 +95,11 @@ public class DefaultExecutionFlow implements ExecutionFlow, InitializingBean, if (executable instanceof StructureAware) { ((StructureAware) executable).notifyCurrentPath( registry, new TreeSPath(path)); + } else if (executable instanceof DefaultExecutionFlow) { + // so we don't need to have DefaultExecutionFlow + // implementing StructureAware + DefaultExecutionFlow flow = (DefaultExecutionFlow) executable; + flow.setPath(path + '/' + flow.getName()); } } } @@ -168,11 +173,4 @@ public class DefaultExecutionFlow implements ExecutionFlow, InitializingBean, this.registry = registry; } - public void notifyCurrentPath(StructureRegistry registry, - TreeSPath path) { - if (this.path == null) { - this.path = path.toString(); - } - } - } diff --git a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/tasks/Echo.java b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/tasks/Echo.java index 07ec879aa..52195903c 100644 --- a/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/tasks/Echo.java +++ b/runtime/org.argeo.slc.core/src/main/java/org/argeo/slc/core/execution/tasks/Echo.java @@ -31,14 +31,10 @@ public class Echo implements Runnable { } } - protected Log log() { + private Log log() { return log != null ? log : defaultLog; } - public void setLog(Log log) { - this.log = log; - } - public void setMessage(String message) { this.message = message; } diff --git a/runtime/org.argeo.slc.core/src/main/resources/org/argeo/slc/core/execution/defaults.xml b/runtime/org.argeo.slc.core/src/main/resources/org/argeo/slc/core/execution/defaults.xml index c6c3c64b3..f63903c56 100644 --- a/runtime/org.argeo.slc.core/src/main/resources/org/argeo/slc/core/execution/defaults.xml +++ b/runtime/org.argeo.slc.core/src/main/resources/org/argeo/slc/core/execution/defaults.xml @@ -8,7 +8,7 @@ - + diff --git a/runtime/org.argeo.slc.core/src/main/resources/org/argeo/slc/core/execution/runtime.xml b/runtime/org.argeo.slc.core/src/main/resources/org/argeo/slc/core/execution/runtime.xml index dba01b962..4399b8d89 100644 --- a/runtime/org.argeo.slc.core/src/main/resources/org/argeo/slc/core/execution/runtime.xml +++ b/runtime/org.argeo.slc.core/src/main/resources/org/argeo/slc/core/execution/runtime.xml @@ -21,7 +21,7 @@ - + diff --git a/runtime/org.argeo.slc.core/src/main/resources/org/argeo/slc/core/execution/simple.xml b/runtime/org.argeo.slc.core/src/main/resources/org/argeo/slc/core/execution/simple.xml new file mode 100644 index 000000000..a6887e3d9 --- /dev/null +++ b/runtime/org.argeo.slc.core/src/main/resources/org/argeo/slc/core/execution/simple.xml @@ -0,0 +1,31 @@ + + + + Default Capabilities + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/runtime/org.argeo.slc.core/src/main/resources/org/argeo/slc/core/execution/spring.xml b/runtime/org.argeo.slc.core/src/main/resources/org/argeo/slc/core/execution/spring.xml index 3188e58fd..f17edcfeb 100644 --- a/runtime/org.argeo.slc.core/src/main/resources/org/argeo/slc/core/execution/spring.xml +++ b/runtime/org.argeo.slc.core/src/main/resources/org/argeo/slc/core/execution/spring.xml @@ -10,27 +10,12 @@ Default Capabilities + + - - - - - - - - - - - - - \ No newline at end of file diff --git a/runtime/org.argeo.slc.support.osgi/src/main/resources/org/argeo/slc/osgi/execution.xml b/runtime/org.argeo.slc.support.osgi/src/main/resources/org/argeo/slc/osgi/execution.xml new file mode 100644 index 000000000..f64b0abfb --- /dev/null +++ b/runtime/org.argeo.slc.support.osgi/src/main/resources/org/argeo/slc/osgi/execution.xml @@ -0,0 +1,22 @@ + + + + + + + + + + org.argeo.slc.execution.ExecutionFlow + + + + + \ No newline at end of file diff --git a/runtime/org.argeo.slc.support.osgi/src/main/resources/org/argeo/slc/osgi/execution/spring.xml b/runtime/org.argeo.slc.support.osgi/src/main/resources/org/argeo/slc/osgi/execution/spring.xml deleted file mode 100644 index f64b0abfb..000000000 --- a/runtime/org.argeo.slc.support.osgi/src/main/resources/org/argeo/slc/osgi/execution/spring.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - org.argeo.slc.execution.ExecutionFlow - - - - - \ No newline at end of file