<SLC-ExecutionModule>default</SLC-ExecutionModule>
<!-- Minimal imports + some optional convenience imports -->
<Import-Package>
- net.sf.cglib.core,
- net.sf.cglib.proxy,
- net.sf.cglib.reflect,
org.aopalliance.aop,
org.argeo.slc.core.execution,
org.argeo.slc.core.execution.tasks,
<relativePath>..</relativePath>
</parent>
<artifactId>org.argeo.slc.dep.backend</artifactId>
- <name>SLC Backend Dependencies</name>
- <description>Shared by RAP and pure server</description>
+ <name>SLC Backend</name>
<build>
<plugins>
<plugin>
+++ /dev/null
-properties.1.name=org.eclipse.equinox.p2.type.category
-properties.1.value=true
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?><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.slc</groupId>
- <artifactId>dep</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>org.argeo.slc.dep.detached</artifactId>
- <packaging>jar</packaging>
- <name>SLC Detached Dependencies</name>
- <dependencies>
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.detached</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.support.jemmy</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.argeo.slc</groupId>
- <artifactId>org.argeo.slc.ext.castor</artifactId>
- <version>2.1.1-SNAPSHOT</version>
- </dependency>
- <!-- For JDK 1.4 -->
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>mx4j</artifactId>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
<relativePath>..</relativePath>
</parent>
<artifactId>org.argeo.slc.dep.eclipse</artifactId>
- <name>SLC Eclipse Dependencies</name>
+ <name>SLC Eclipse</name>
<build>
<plugins>
<plugin>
<relativePath>..</relativePath>
</parent>
<artifactId>org.argeo.slc.dep.minimal</artifactId>
- <name>SLC Minimal Dependencies</name>
- <description>The minimal set of dependencies required to run an SLC execution</description>
+ <name>SLC Minimal</name>
<build>
<plugins>
<plugin>
<relativePath>..</relativePath>
</parent>
<artifactId>org.argeo.slc.dep.rap</artifactId>
- <name>SLC Eclipse RAP Dependencies</name>
+ <name>SLC Eclipse RAP</name>
<build>
<plugins>
<plugin>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>>>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Bundle-SymbolicName: org.argeo.slc.client.rap;singleton=true
Bundle-ActivationPolicy: lazy
-
Bundle-Activator: org.argeo.slc.client.rap.SlcRapPlugin
+Require-Bundle: org.eclipse.ui;resolution:=optional,\
+org.eclipse.core.runtime,\
+org.eclipse.rap.ui;resolution:=optional,\
+org.eclipse.rap.ui.workbench;resolution:=optional
+
Import-Package: javax.jcr.nodetype,\
javax.servlet,\
javax.servlet.http,\
<entrypoint\r
id="org.argeo.slc.client.rap.slcSecureRap"\r
class="org.argeo.slc.client.rap.SlcSecureRap"\r
- parameter="slc">\r
+ path="slc">\r
</entrypoint>\r
</extension>\r
\r
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>>>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Bundle-SymbolicName: org.argeo.slc.client.ui.distp;singleton=true
Bundle-ActivationPolicy: lazy
-Require-Bundle: org.eclipse.ui;resolution:=optional
+Require-Bundle: org.eclipse.ui;resolution:=optional,\
+org.eclipse.core.runtime,\
+org.eclipse.rap.ui;resolution:=optional,\
+org.eclipse.rap.ui.workbench;resolution:=optional
Bundle-Activator: org.argeo.slc.client.ui.dist.DistPlugin
Import-Package: org.argeo.eclipse.spring,\
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>>>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
Bundle-SymbolicName: org.argeo.slc.client.ui;singleton=true
Bundle-ActivationPolicy: lazy
-Require-Bundle: org.eclipse.ui;resolution:=optional
+Require-Bundle: org.eclipse.ui;resolution:=optional,\
+org.eclipse.core.runtime,\
+org.eclipse.rap.ui;resolution:=optional,\
+org.eclipse.rap.ui.workbench;resolution:=optional
Bundle-Activator: org.argeo.slc.client.ui.ClientUiPlugin
Import-Package: org.argeo.eclipse.spring,\
org.argeo.security.ui,\
+org.eclipse.core.runtime,\
*
+Import-Package: org.springframework.core,\
+*
\ No newline at end of file
<artifactId>org.argeo.slc.core</artifactId>
<version>2.1.1-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.argeo.slc</groupId>
+ <artifactId>org.argeo.slc.support</artifactId>
+ <version>2.1.1-SNAPSHOT</version>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
--- /dev/null
+/*\r
+ * Copyright (C) 2007-2012 Argeo GmbH\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.unit.db;\r
+\r
+import java.sql.SQLException;\r
+\r
+import org.apache.commons.logging.Log;\r
+import org.apache.commons.logging.LogFactory;\r
+import org.argeo.slc.SlcException;\r
+import org.argeo.slc.UnsupportedException;\r
+import org.argeo.slc.build.Distribution;\r
+import org.argeo.slc.deploy.DeployedSystem;\r
+import org.argeo.slc.deploy.Deployment;\r
+import org.argeo.slc.deploy.DeploymentData;\r
+import org.argeo.slc.deploy.TargetData;\r
+import org.argeo.slc.support.deploy.db.DbModel;\r
+import org.argeo.slc.support.deploy.db.JdbcAware;\r
+import org.dbunit.DataSourceDatabaseTester;\r
+import org.dbunit.DatabaseUnitException;\r
+import org.dbunit.IDatabaseTester;\r
+import org.dbunit.database.IDatabaseConnection;\r
+import org.dbunit.dataset.IDataSet;\r
+import org.dbunit.operation.DatabaseOperation;\r
+\r
+public class DbUnitDeployment implements Deployment {\r
+ private static Log log = LogFactory.getLog(DbUnitDeployment.class);\r
+\r
+ private JdbcAware jdbcAware;\r
+ private DbUnitDeploymentData deploymentData;\r
+ private DbModel dbModel;\r
+\r
+ public void run() {\r
+ try {\r
+ IDatabaseTester databaseTester = new DataSourceDatabaseTester(\r
+ jdbcAware.getDataSource());\r
+ databaseTester.setSetUpOperation(new DatabaseOperation() {\r
+\r
+ @Override\r
+ public void execute(IDatabaseConnection connection,\r
+ IDataSet dataSet) throws DatabaseUnitException,\r
+ SQLException {\r
+ if (dbModel != null) {\r
+ dbModel.createSchema(connection.getConnection());\r
+ DatabaseOperation.INSERT.execute(connection, dataSet);\r
+ } else {\r
+ DatabaseOperation.UPDATE.execute(connection, dataSet);\r
+ }\r
+ }\r
+\r
+ });\r
+ databaseTester.setDataSet(deploymentData.createDataSet());\r
+ databaseTester.onSetup();\r
+ databaseTester.onTearDown();\r
+\r
+ log.info("Database deployed.");\r
+ } catch (Exception e) {\r
+ throw new SlcException("Could not initialize the database", e);\r
+ }\r
+ }\r
+\r
+ public DeployedSystem getDeployedSystem() {\r
+ throw new UnsupportedOperationException();\r
+ }\r
+\r
+ public void setDbModel(DbModel dbModel) {\r
+ this.dbModel = dbModel;\r
+ }\r
+\r
+ public void setDeploymentData(DeploymentData deploymentData) {\r
+ this.deploymentData = (DbUnitDeploymentData) deploymentData;\r
+ }\r
+\r
+ public void setTargetData(TargetData targetData) {\r
+ this.jdbcAware = (JdbcAware) targetData;\r
+\r
+ }\r
+\r
+ public void setDistribution(Distribution distribution) {\r
+ throw new UnsupportedException("Method not supported");\r
+ }\r
+\r
+}\r
--- /dev/null
+/*\r
+ * Copyright (C) 2007-2012 Argeo GmbH\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+package org.argeo.slc.unit.db;\r
+\r
+import java.io.InputStream;\r
+\r
+import org.argeo.slc.SlcException;\r
+import org.argeo.slc.deploy.DeploymentData;\r
+import org.dbunit.dataset.IDataSet;\r
+import org.dbunit.dataset.xml.FlatXmlDataSet;\r
+import org.springframework.core.io.Resource;\r
+\r
+public class DbUnitDeploymentData implements DeploymentData {\r
+ private Resource dataSetLocation;\r
+\r
+ public IDataSet createDataSet() {\r
+ try {\r
+ InputStream in = dataSetLocation.getInputStream();\r
+ IDataSet dataSet = new FlatXmlDataSet(in);\r
+ in.close();\r
+ return dataSet;\r
+ } catch (Exception e) {\r
+ throw new SlcException("Cannot create data set", e);\r
+ }\r
+\r
+ }\r
+\r
+ public void setDataSetLocation(Resource dataSetLocation) {\r
+ this.dataSetLocation = dataSetLocation;\r
+ }\r
+\r
+}\r