JBoss Tools SVN: r30521 - in workspace/adietish: org.jboss.ide.eclipse.as7.deployment/META-INF and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-12 12:23:19 -0400 (Tue, 12 Apr 2011)
New Revision: 30521
Added:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/jboss-servlet-api_3.0_spec-1.0.0.Final.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-api-1.0.0-alpha-12-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-api-1.0.0-alpha-12.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-impl-base-1.0.0-alpha-12-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-impl-base-1.0.0-alpha-12.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-spi-1.0.0-alpha-12-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-spi-1.0.0-alpha-12.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/as/
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/as/demos/
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/as/demos/war/
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/as/demos/war/runner/
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/as/demos/war/runner/DeploymentUtilsIntegrationTest.java
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DeploymentUtils.java
Removed:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-api-1.0.0-alpha-12-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-api-1.0.0-alpha-12.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-impl-base-1.0.0-alpha-12-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-impl-base-1.0.0-alpha-12.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-spi-1.0.0-alpha-12-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-spi-1.0.0-alpha-12.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentUtils.java
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/.classpath
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/META-INF/MANIFEST.MF
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/build.properties
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeploymentIntegrationTest.java
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/META-INF/MANIFEST.MF
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties
Log:
implemented DeploymentUtilsIntegrationTest
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath 2011-04-12 14:46:47 UTC (rev 30520)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath 2011-04-12 16:23:19 UTC (rev 30521)
@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry exported="true" kind="lib" path="shrinkwrap-spi-1.0.0-alpha-12.jar"/>
- <classpathentry exported="true" kind="lib" path="shrinkwrap-api-1.0.0-alpha-12.jar"/>
- <classpathentry exported="true" kind="lib" path="shrinkwrap-impl-base-1.0.0-alpha-12.jar" sourcepath="shrinkwrap-impl-base-1.0.0-alpha-12-sources.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-marshalling-1.3.0.CR8.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-logging-3.0.0.Beta5.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-dmr-1.0.0.Beta5.jar"/>
@@ -20,8 +17,5 @@
<classpathentry kind="lib" path="jboss-as-controller-7.0.0.Beta3-SNAPSHOT-sources.jar"/>
<classpathentry kind="lib" path="jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT-sources.jar"/>
<classpathentry kind="lib" path="jboss-as-protocol-7.0.0.Beta3-SNAPSHOT-sources.jar"/>
- <classpathentry kind="lib" path="shrinkwrap-api-1.0.0-alpha-12-sources.jar"/>
- <classpathentry kind="lib" path="shrinkwrap-impl-base-1.0.0-alpha-12-sources.jar"/>
- <classpathentry kind="lib" path="shrinkwrap-spi-1.0.0-alpha-12-sources.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/META-INF/MANIFEST.MF
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/META-INF/MANIFEST.MF 2011-04-12 14:46:47 UTC (rev 30520)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/META-INF/MANIFEST.MF 2011-04-12 16:23:19 UTC (rev 30521)
@@ -16,9 +16,7 @@
jboss-logging-3.0.0.Beta5.jar,
jboss-marshalling-1.3.0.CR8.jar,
shrinkwrap-api-1.0.0-alpha-11.jar,
- shrinkwrap-impl-base-1.0.0-alpha-12.jar,
- shrinkwrap-api-1.0.0-alpha-12.jar,
- shrinkwrap-spi-1.0.0-alpha-12.jar
+ shrinkwrap-impl-base-1.0.0-alpha-12.jar
Export-Package: org.jboss.as.controller,
org.jboss.as.controller.client,
org.jboss.as.controller.client.helpers,
@@ -44,31 +42,6 @@
org.jboss.marshalling.cloner,
org.jboss.marshalling.reflect,
org.jboss.marshalling.util,
- org.jboss.shrinkwrap.api,
- org.jboss.shrinkwrap.api.asset,
- org.jboss.shrinkwrap.api.classloader,
- org.jboss.shrinkwrap.api.container,
- org.jboss.shrinkwrap.api.exporter,
- org.jboss.shrinkwrap.api.formatter,
- org.jboss.shrinkwrap.api.importer,
- org.jboss.shrinkwrap.api.serialization,
- org.jboss.shrinkwrap.api.spec,
- org.jboss.shrinkwrap.impl.base,
- org.jboss.shrinkwrap.impl.base.asset,
- org.jboss.shrinkwrap.impl.base.container,
- org.jboss.shrinkwrap.impl.base.exporter,
- org.jboss.shrinkwrap.impl.base.exporter.tar,
- org.jboss.shrinkwrap.impl.base.exporter.zip,
- org.jboss.shrinkwrap.impl.base.filter,
- org.jboss.shrinkwrap.impl.base.importer,
- org.jboss.shrinkwrap.impl.base.importer.tar,
- org.jboss.shrinkwrap.impl.base.importer.zip,
- org.jboss.shrinkwrap.impl.base.io,
- org.jboss.shrinkwrap.impl.base.io.tar,
- org.jboss.shrinkwrap.impl.base.path,
- org.jboss.shrinkwrap.impl.base.serialization,
- org.jboss.shrinkwrap.impl.base.spec,
- org.jboss.shrinkwrap.spi,
org.jboss.threads,
org.jboss.threads.management
Bundle-Vendor: JBoss by Red Hat
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties 2011-04-12 14:46:47 UTC (rev 30520)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties 2011-04-12 16:23:19 UTC (rev 30521)
@@ -9,8 +9,7 @@
jboss-dmr-1.0.0.Beta5.jar,\
jboss-logging-3.0.0.Beta5.jar,\
jboss-marshalling-1.3.0.CR8.jar,\
- shrinkwrap-impl-base-1.0.0-alpha-12.jar,\
- shrinkwrap-api-1.0.0-alpha-12.jar
+ shrinkwrap-impl-base-1.0.0-alpha-12.jar
src.includes = jboss-dmr-1.0.0.Beta5-sources.jar,\
jboss-dmr-1.0.0.Beta5.jar,\
jboss-marshalling-1.3.0.CR8-sources.jar,\
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-api-1.0.0-alpha-12-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-api-1.0.0-alpha-12.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-impl-base-1.0.0-alpha-12-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-impl-base-1.0.0-alpha-12.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-spi-1.0.0-alpha-12-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-spi-1.0.0-alpha-12.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentUtils.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentUtils.java 2011-04-12 14:46:47 UTC (rev 30520)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentUtils.java 2011-04-12 16:23:19 UTC (rev 30521)
@@ -1,345 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.ide.eclipse.as7.deployment;
-
-import static org.jboss.as.protocol.StreamUtils.safeClose;
-
-import java.io.Closeable;
-import java.io.File;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXServiceURL;
-
-import org.jboss.as.controller.client.ModelControllerClient;
-import org.jboss.as.controller.client.helpers.standalone.DeploymentPlan;
-import org.jboss.as.controller.client.helpers.standalone.DeploymentPlanBuilder;
-import org.jboss.as.controller.client.helpers.standalone.DuplicateDeploymentNameException;
-import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager;
-import org.jboss.shrinkwrap.api.Archive;
-import org.jboss.shrinkwrap.api.ArchivePath;
-import org.jboss.shrinkwrap.api.ArchivePaths;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.container.ResourceContainer;
-import org.jboss.shrinkwrap.api.exporter.ZipExporter;
-import org.jboss.shrinkwrap.api.spec.JavaArchive;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-
-/**
- * Used to deploy/undeploy deployments to a running <b>standalone</b> application server
- *
- * TODO Use the real deployment API once that is complete
- *
- * @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
- */
-public class DeploymentUtils implements Closeable {
-
- public static final long DEFAULT_TIMEOUT = 15000;
-
- private final List<AbstractDeployment> deployments = new ArrayList<AbstractDeployment>();
- private final ModelControllerClient client;
- private final ServerDeploymentManager manager;
- private long timeout = DEFAULT_TIMEOUT;
-
- public DeploymentUtils() throws UnknownHostException {
- client = ModelControllerClient.Factory.create(InetAddress.getByName("localhost"), 9999);
- manager = ServerDeploymentManager.Factory.create(client);
- }
-
- public DeploymentUtils(String archiveName, Package... pkg) throws UnknownHostException {
- this();
- addDeployment(archiveName, pkg);
- }
-
- public DeploymentUtils(Archive<?> archive) throws UnknownHostException {
- this();
- deployments.add(new ArbitraryDeployment(archive,false));
- }
-
- public DeploymentUtils(String archiveName, boolean show, Package... pkgs) throws UnknownHostException {
- this();
- addDeployment(archiveName, show, pkgs);
- }
-
- public synchronized void addDeployment(String archiveName, Package... pkgs) {
- addDeployment(archiveName, false, pkgs);
- }
-
- public synchronized void addDeployment(String archiveName, boolean show, Package... pkgs) {
- deployments.add(new Deployment(archiveName, pkgs, show));
- }
-
- public synchronized void addWarDeployment(String archiveName, Package... pkgs) {
- addWarDeployment(archiveName, false, pkgs);
- }
-
- public synchronized void addWarDeployment(String archiveName, boolean show, Package... pkgs) {
- deployments.add(new WarDeployment(archiveName, pkgs, show));
- }
-
- public synchronized void addWarFileDeployment(File file) {
- deployments.add(new WarFileDeployment(file));
- }
-
- public synchronized void deploy() throws DuplicateDeploymentNameException, IOException, ExecutionException, InterruptedException, TimeoutException {
- DeploymentPlanBuilder builder = manager.newDeploymentPlan().withRollback();
- for (AbstractDeployment deployment : deployments) {
- builder = deployment.addDeployment(manager, builder);
- }
-
- try {
- manager.execute(builder.build()).get(timeout, TimeUnit.MILLISECONDS);
- } finally {
- markDeploymentsDeployed();
- }
- }
-
- private void markDeploymentsDeployed() {
- for (AbstractDeployment deployment : deployments) {
- deployment.deployed = true;
- }
- }
-
- public synchronized void undeploy() throws ExecutionException, InterruptedException, TimeoutException {
- DeploymentPlanBuilder builder = manager.newDeploymentPlan();
- for (AbstractDeployment deployment : deployments) {
- builder = deployment.removeDeployment(builder);
- }
- DeploymentPlan plan = builder.build();
- if (plan.getDeploymentActions().size() > 0) {
- manager.execute(builder.build()).get(timeout, TimeUnit.MILLISECONDS);
- }
- }
-
- public MBeanServerConnection getConnection() throws Exception {
- return JMXConnectorFactory.connect(new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:1090/jmxrmi"),
- new HashMap<String, Object>()).getMBeanServerConnection();
- }
-
- public String showJndi() throws Exception {
- return (String)getConnection().invoke(new ObjectName("jboss:type=JNDIView"), "list", new Object[] {true}, new String[] {"boolean"});
- }
-
- public long getTimeout() {
- return timeout;
- }
-
- public void setTimeout(long timeout) {
- this.timeout = timeout;
- }
-
- @Override
- public void close() throws IOException {
- safeClose(client);
- }
-
- private abstract class AbstractDeployment{
-
- boolean deployed;
- String deployment;
-
- public synchronized DeploymentPlanBuilder addDeployment(ServerDeploymentManager manager, DeploymentPlanBuilder builder) throws DuplicateDeploymentNameException, IOException, ExecutionException, InterruptedException {
- deployment = getRealArchive().getName();
- System.out.println("Deploying " + deployment);
- return builder.add(deployment, getRealArchive()).deploy(deployment);
- }
-
- public synchronized DeploymentPlanBuilder removeDeployment(DeploymentPlanBuilder builder) {
- if (deployed) {
- System.out.println("Undeploying " + deployment);
- return builder.undeploy(deployment).remove(deployment);
- }
- else {
- return builder;
- }
- }
-
- protected void addFiles(ResourceContainer<?> archive, File dir, ArchivePath dest) {
- for (String name : dir.list()) {
- File file = new File(dir, name);
- if (file.isDirectory()) {
- addFiles(archive, file, ArchivePaths.create(dest, name));
- } else {
- archive.addAsResource(file, ArchivePaths.create(dest, name));
- }
- }
- }
-
- protected File getSourceMetaInfDir(String archiveName) {
- String name = "archives/" + archiveName + "/META-INF/MANIFEST.MF";
-
- URL url = Thread.currentThread().getContextClassLoader().getResource(name);
- if (url == null) {
- throw new IllegalArgumentException("No resource called " + name);
- }
- try {
- File file = new File(url.toURI());
- return file.getParentFile();
- } catch (URISyntaxException e) {
- throw new RuntimeException("Could not get file for " + url);
- }
- }
-
- protected File getSourceWebInfDir(String archiveName) {
- String name = "archives/" + archiveName + "/WEB-INF";
-
- URL url = Thread.currentThread().getContextClassLoader().getResource(name);
- if (url == null) {
- return null;
- }
- try {
- return new File(url.toURI());
- } catch (URISyntaxException e) {
- throw new RuntimeException("Could not get file for " + url);
- }
- }
-
- protected File getOutputDir() {
- File file = new File("target");
- if (!file.exists()) {
- throw new IllegalStateException("target/ does not exist");
- }
- if (!file.isDirectory()) {
- throw new IllegalStateException("target/ is not a directory");
- }
- file = new File(file, "archives");
- if (file.exists()) {
- if (!file.isDirectory()) {
- throw new IllegalStateException("target/archives/ already exists and is not a directory");
- }
- } else {
- file.mkdir();
- }
- return file.getAbsoluteFile();
- }
-
- protected File createArchive(Archive<?> archive) {
- File realArchive = new File(getOutputDir(), archive.getName());
- archive.as(ZipExporter.class).exportZip(realArchive, true);
- return realArchive;
- }
-
- protected abstract File getRealArchive();
- }
-
- private class Deployment extends AbstractDeployment {
- final File realArchive;
-
- public Deployment(String archiveName, Package[] pkgs, boolean show) {
-
- ArchivePath metaInf = ArchivePaths.create("META-INF");
-
- JavaArchive archive = ShrinkWrap.create(JavaArchive.class, archiveName);
- for(Package pkg : pkgs) {
- archive.addPackage(pkg);
- }
-
- File sourceMetaInf = getSourceMetaInfDir(archiveName);
- addFiles(archive, sourceMetaInf, metaInf);
-
- System.out.println(archive.toString(show));
- realArchive = createArchive(archive);
- }
-
- @Override
- protected File getRealArchive() {
- return realArchive;
- }
- }
-
-
- private class WarDeployment extends AbstractDeployment {
- final File realArchive;
-
- public WarDeployment(String archiveName, Package[] pkgs, boolean show) {
-
- ArchivePath metaInf = ArchivePaths.create("META-INF");
-
-
- WebArchive archive = ShrinkWrap.create(WebArchive.class, archiveName);
- for(Package pkg : pkgs) {
- archive.addPackage(pkg);
- }
-
- File sourceMetaInf = getSourceMetaInfDir(archiveName);
- addFiles(archive, sourceMetaInf, metaInf);
-
- File sourceWebInf = getSourceWebInfDir(archiveName);
- if (sourceWebInf != null) {
- addFiles(archive, sourceWebInf, ArchivePaths.create("WEB-INF"));
- }
-
- System.out.println(archive.toString(show));
- realArchive = createArchive(archive);
- }
-
- @Override
- protected File getRealArchive() {
- return realArchive;
- }
- }
-
- private class ArbitraryDeployment extends AbstractDeployment {
- final File realArchive;
-
- public ArbitraryDeployment(Archive archive, boolean show) {
-
- ArchivePath metaInf = ArchivePaths.create("META-INF");
-
- System.out.println(archive.toString(show));
- realArchive = createArchive(archive);
- }
-
- @Override
- protected File getRealArchive() {
- return realArchive;
- }
- }
-
- private class WarFileDeployment extends AbstractDeployment {
-
- private File file;
-
- public WarFileDeployment(File file) {
- this.file = file;
- }
-
- @Override
- protected File getRealArchive() {
- return file;
- }
-
- }
-}
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/.classpath
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/.classpath 2011-04-12 14:46:47 UTC (rev 30520)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/.classpath 2011-04-12 16:23:19 UTC (rev 30521)
@@ -1,7 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry exported="true" kind="lib" path="shrinkwrap-api-1.0.0-alpha-12-sources.jar"/>
+ <classpathentry exported="true" kind="lib" path="shrinkwrap-api-1.0.0-alpha-12.jar"/>
+ <classpathentry exported="true" kind="lib" path="shrinkwrap-impl-base-1.0.0-alpha-12-sources.jar"/>
+ <classpathentry exported="true" kind="lib" path="shrinkwrap-impl-base-1.0.0-alpha-12.jar"/>
+ <classpathentry exported="true" kind="lib" path="shrinkwrap-spi-1.0.0-alpha-12-sources.jar"/>
+ <classpathentry exported="true" kind="lib" path="shrinkwrap-spi-1.0.0-alpha-12.jar"/>
<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.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="wars"/>
+ <classpathentry kind="lib" path="jboss-servlet-api_3.0_spec-1.0.0.Final.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/META-INF/MANIFEST.MF
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/META-INF/MANIFEST.MF 2011-04-12 14:46:47 UTC (rev 30520)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/META-INF/MANIFEST.MF 2011-04-12 16:23:19 UTC (rev 30521)
@@ -7,5 +7,12 @@
Require-Bundle: org.junit;bundle-version="[4.8.1,5.0.0)",
org.eclipse.core.runtime;bundle-version="3.7.0",
org.jboss.ide.eclipse.as7.deployment;bundle-version="0.0.1"
-Bundle-ClassPath: wars/,
- .
+Bundle-ClassPath: .,
+ wars/,
+ shrinkwrap-api-1.0.0-alpha-12-sources.jar,
+ shrinkwrap-api-1.0.0-alpha-12.jar,
+ shrinkwrap-impl-base-1.0.0-alpha-12-sources.jar,
+ shrinkwrap-impl-base-1.0.0-alpha-12.jar,
+ shrinkwrap-spi-1.0.0-alpha-12-sources.jar,
+ shrinkwrap-spi-1.0.0-alpha-12.jar,
+ jboss-servlet-api_3.0_spec-1.0.0.Final.jar
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/build.properties
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/build.properties 2011-04-12 14:46:47 UTC (rev 30520)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/build.properties 2011-04-12 16:23:19 UTC (rev 30521)
@@ -2,4 +2,11 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
- wars/
+ wars/,\
+ shrinkwrap-api-1.0.0-alpha-12-sources.jar,\
+ shrinkwrap-api-1.0.0-alpha-12.jar,\
+ shrinkwrap-impl-base-1.0.0-alpha-12-sources.jar,\
+ shrinkwrap-impl-base-1.0.0-alpha-12.jar,\
+ shrinkwrap-spi-1.0.0-alpha-12-sources.jar,\
+ shrinkwrap-spi-1.0.0-alpha-12.jar,\
+ jboss-servlet-api_3.0_spec-1.0.0.Final.jar
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/jboss-servlet-api_3.0_spec-1.0.0.Final.jar
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/jboss-servlet-api_3.0_spec-1.0.0.Final.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Copied: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-api-1.0.0-alpha-12-sources.jar (from rev 30518, workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-api-1.0.0-alpha-12-sources.jar)
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-api-1.0.0-alpha-12-sources.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Copied: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-api-1.0.0-alpha-12.jar (from rev 30518, workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-api-1.0.0-alpha-12.jar)
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-api-1.0.0-alpha-12.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Copied: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-impl-base-1.0.0-alpha-12-sources.jar (from rev 30518, workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-impl-base-1.0.0-alpha-12-sources.jar)
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-impl-base-1.0.0-alpha-12-sources.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Copied: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-impl-base-1.0.0-alpha-12.jar (from rev 30518, workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-impl-base-1.0.0-alpha-12.jar)
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-impl-base-1.0.0-alpha-12.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Copied: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-spi-1.0.0-alpha-12-sources.jar (from rev 30518, workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-spi-1.0.0-alpha-12-sources.jar)
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-spi-1.0.0-alpha-12-sources.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Copied: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-spi-1.0.0-alpha-12.jar (from rev 30518, workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-spi-1.0.0-alpha-12.jar)
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-spi-1.0.0-alpha-12.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/as/demos/war/runner/DeploymentUtilsIntegrationTest.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/as/demos/war/runner/DeploymentUtilsIntegrationTest.java (rev 0)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/as/demos/war/runner/DeploymentUtilsIntegrationTest.java 2011-04-12 16:23:19 UTC (rev 30521)
@@ -0,0 +1,113 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.as.demos.war.runner;
+
+import static org.jboss.as.protocol.StreamUtils.safeClose;
+import static org.junit.Assert.assertTrue;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.net.HttpURLConnection;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.text.MessageFormat;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.ide.eclipse.as7.deployment.tests.DeploymentUtils;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+
+/**
+ *
+ * @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class DeploymentUtilsIntegrationTest {
+
+ private static final String WAR_FOLDER = "/wars/";
+ private static final String BUNDLE_ID = "org.jboss.ide.eclipse.as7.deployment.tests";
+
+ private static final int WEBAPP_RESPONSE_TIMEOUT = 10 * 1024;
+
+ private static final String HOST = "localhost";
+ private static final int WEB_PORT = 8080;
+
+ @Test
+ public void canDeployUsingDeploymentUtils() throws Exception {
+ DeploymentUtils utils = null;
+ try {
+ utils = new DeploymentUtils();
+// File warFile = nonOsgiGetWarFile("minimalistic.war");
+ File warFile = osgiGetWarFile("minimalistic.war");
+ utils.addWarFileDeployment(warFile);
+ utils.deploy();
+
+ String response = getServerResponse(new URL(
+ MessageFormat.format("http://{0}:{1}/{2}",
+ HOST,
+ String.valueOf(WEB_PORT),
+ "minimalistic")));
+ assertTrue(response.indexOf("minimalistic") >= 0);
+
+ } finally {
+ utils.undeploy();
+ safeClose(utils);
+ }
+ }
+
+ private File osgiGetWarFile(String name) throws URISyntaxException, IOException {
+ Bundle bundle = Platform.getBundle(BUNDLE_ID);
+ URL entryUrl = bundle.getEntry(WAR_FOLDER + name);
+ return new File(FileLocator.resolve(entryUrl).toURI());
+ }
+
+ private static File nonOsgiGetWarFile(String path) {
+ URL url = Thread.currentThread().getContextClassLoader().getResource(path);
+ return new File(url.getFile());
+ }
+
+ private String getServerResponse(URL url) throws IOException {
+ HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+ connection.setUseCaches(false);
+ connection.setDoInput(true);
+ connection.setAllowUserInteraction(false);
+ connection.setConnectTimeout(WEBAPP_RESPONSE_TIMEOUT);
+ connection.setInstanceFollowRedirects(true);
+ connection.setDoOutput(false);
+ BufferedInputStream in = new BufferedInputStream(connection.getInputStream());
+ return toString(in);
+ }
+
+ private String toString(BufferedInputStream in) throws IOException {
+ StringWriter writer = new StringWriter();
+ for (int data = -1; ((data = in.read()) != -1);) {
+ writer.write(data);
+ }
+ return writer.toString();
+ }
+
+
+}
+
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/as/demos/war/runner/DeploymentUtilsIntegrationTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DeploymentUtils.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DeploymentUtils.java (rev 0)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DeploymentUtils.java 2011-04-12 16:23:19 UTC (rev 30521)
@@ -0,0 +1,345 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ide.eclipse.as7.deployment.tests;
+
+import static org.jboss.as.protocol.StreamUtils.safeClose;
+
+import java.io.Closeable;
+import java.io.File;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+
+import org.jboss.as.controller.client.ModelControllerClient;
+import org.jboss.as.controller.client.helpers.standalone.DeploymentPlan;
+import org.jboss.as.controller.client.helpers.standalone.DeploymentPlanBuilder;
+import org.jboss.as.controller.client.helpers.standalone.DuplicateDeploymentNameException;
+import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ArchivePath;
+import org.jboss.shrinkwrap.api.ArchivePaths;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.container.ResourceContainer;
+import org.jboss.shrinkwrap.api.exporter.ZipExporter;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+
+/**
+ * Used to deploy/undeploy deployments to a running <b>standalone</b> application server
+ *
+ * TODO Use the real deployment API once that is complete
+ *
+ * @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class DeploymentUtils implements Closeable {
+
+ public static final long DEFAULT_TIMEOUT = 15000;
+
+ private final List<AbstractDeployment> deployments = new ArrayList<AbstractDeployment>();
+ private final ModelControllerClient client;
+ private final ServerDeploymentManager manager;
+ private long timeout = DEFAULT_TIMEOUT;
+
+ public DeploymentUtils() throws UnknownHostException {
+ client = ModelControllerClient.Factory.create(InetAddress.getByName("localhost"), 9999);
+ manager = ServerDeploymentManager.Factory.create(client);
+ }
+
+ public DeploymentUtils(String archiveName, Package... pkg) throws UnknownHostException {
+ this();
+ addDeployment(archiveName, pkg);
+ }
+
+ public DeploymentUtils(Archive<?> archive) throws UnknownHostException {
+ this();
+ deployments.add(new ArbitraryDeployment(archive,false));
+ }
+
+ public DeploymentUtils(String archiveName, boolean show, Package... pkgs) throws UnknownHostException {
+ this();
+ addDeployment(archiveName, show, pkgs);
+ }
+
+ public synchronized void addDeployment(String archiveName, Package... pkgs) {
+ addDeployment(archiveName, false, pkgs);
+ }
+
+ public synchronized void addDeployment(String archiveName, boolean show, Package... pkgs) {
+ deployments.add(new Deployment(archiveName, pkgs, show));
+ }
+
+ public synchronized void addWarDeployment(String archiveName, Package... pkgs) {
+ addWarDeployment(archiveName, false, pkgs);
+ }
+
+ public synchronized void addWarDeployment(String archiveName, boolean show, Package... pkgs) {
+ deployments.add(new WarDeployment(archiveName, pkgs, show));
+ }
+
+ public synchronized void addWarFileDeployment(File file) {
+ deployments.add(new WarFileDeployment(file));
+ }
+
+ public synchronized void deploy() throws DuplicateDeploymentNameException, IOException, ExecutionException, InterruptedException, TimeoutException {
+ DeploymentPlanBuilder builder = manager.newDeploymentPlan().withRollback();
+ for (AbstractDeployment deployment : deployments) {
+ builder = deployment.addDeployment(manager, builder);
+ }
+
+ try {
+ manager.execute(builder.build()).get(timeout, TimeUnit.MILLISECONDS);
+ } finally {
+ markDeploymentsDeployed();
+ }
+ }
+
+ private void markDeploymentsDeployed() {
+ for (AbstractDeployment deployment : deployments) {
+ deployment.deployed = true;
+ }
+ }
+
+ public synchronized void undeploy() throws ExecutionException, InterruptedException, TimeoutException {
+ DeploymentPlanBuilder builder = manager.newDeploymentPlan();
+ for (AbstractDeployment deployment : deployments) {
+ builder = deployment.removeDeployment(builder);
+ }
+ DeploymentPlan plan = builder.build();
+ if (plan.getDeploymentActions().size() > 0) {
+ manager.execute(builder.build()).get(timeout, TimeUnit.MILLISECONDS);
+ }
+ }
+
+ public MBeanServerConnection getConnection() throws Exception {
+ return JMXConnectorFactory.connect(new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:1090/jmxrmi"),
+ new HashMap<String, Object>()).getMBeanServerConnection();
+ }
+
+ public String showJndi() throws Exception {
+ return (String)getConnection().invoke(new ObjectName("jboss:type=JNDIView"), "list", new Object[] {true}, new String[] {"boolean"});
+ }
+
+ public long getTimeout() {
+ return timeout;
+ }
+
+ public void setTimeout(long timeout) {
+ this.timeout = timeout;
+ }
+
+ @Override
+ public void close() throws IOException {
+ safeClose(client);
+ }
+
+ private abstract class AbstractDeployment{
+
+ boolean deployed;
+ String deployment;
+
+ public synchronized DeploymentPlanBuilder addDeployment(ServerDeploymentManager manager, DeploymentPlanBuilder builder) throws DuplicateDeploymentNameException, IOException, ExecutionException, InterruptedException {
+ deployment = getRealArchive().getName();
+ System.out.println("Deploying " + deployment);
+ return builder.add(deployment, getRealArchive()).deploy(deployment);
+ }
+
+ public synchronized DeploymentPlanBuilder removeDeployment(DeploymentPlanBuilder builder) {
+ if (deployed) {
+ System.out.println("Undeploying " + deployment);
+ return builder.undeploy(deployment).remove(deployment);
+ }
+ else {
+ return builder;
+ }
+ }
+
+ protected void addFiles(ResourceContainer<?> archive, File dir, ArchivePath dest) {
+ for (String name : dir.list()) {
+ File file = new File(dir, name);
+ if (file.isDirectory()) {
+ addFiles(archive, file, ArchivePaths.create(dest, name));
+ } else {
+ archive.addAsResource(file, ArchivePaths.create(dest, name));
+ }
+ }
+ }
+
+ protected File getSourceMetaInfDir(String archiveName) {
+ String name = "archives/" + archiveName + "/META-INF/MANIFEST.MF";
+
+ URL url = Thread.currentThread().getContextClassLoader().getResource(name);
+ if (url == null) {
+ throw new IllegalArgumentException("No resource called " + name);
+ }
+ try {
+ File file = new File(url.toURI());
+ return file.getParentFile();
+ } catch (URISyntaxException e) {
+ throw new RuntimeException("Could not get file for " + url);
+ }
+ }
+
+ protected File getSourceWebInfDir(String archiveName) {
+ String name = "archives/" + archiveName + "/WEB-INF";
+
+ URL url = Thread.currentThread().getContextClassLoader().getResource(name);
+ if (url == null) {
+ return null;
+ }
+ try {
+ return new File(url.toURI());
+ } catch (URISyntaxException e) {
+ throw new RuntimeException("Could not get file for " + url);
+ }
+ }
+
+ protected File getOutputDir() {
+ File file = new File("target");
+ if (!file.exists()) {
+ throw new IllegalStateException("target/ does not exist");
+ }
+ if (!file.isDirectory()) {
+ throw new IllegalStateException("target/ is not a directory");
+ }
+ file = new File(file, "archives");
+ if (file.exists()) {
+ if (!file.isDirectory()) {
+ throw new IllegalStateException("target/archives/ already exists and is not a directory");
+ }
+ } else {
+ file.mkdir();
+ }
+ return file.getAbsoluteFile();
+ }
+
+ protected File createArchive(Archive<?> archive) {
+ File realArchive = new File(getOutputDir(), archive.getName());
+ archive.as(ZipExporter.class).exportZip(realArchive, true);
+ return realArchive;
+ }
+
+ protected abstract File getRealArchive();
+ }
+
+ private class Deployment extends AbstractDeployment {
+ final File realArchive;
+
+ public Deployment(String archiveName, Package[] pkgs, boolean show) {
+
+ ArchivePath metaInf = ArchivePaths.create("META-INF");
+
+ JavaArchive archive = ShrinkWrap.create(JavaArchive.class, archiveName);
+ for(Package pkg : pkgs) {
+ archive.addPackage(pkg);
+ }
+
+ File sourceMetaInf = getSourceMetaInfDir(archiveName);
+ addFiles(archive, sourceMetaInf, metaInf);
+
+ System.out.println(archive.toString(show));
+ realArchive = createArchive(archive);
+ }
+
+ @Override
+ protected File getRealArchive() {
+ return realArchive;
+ }
+ }
+
+
+ private class WarDeployment extends AbstractDeployment {
+ final File realArchive;
+
+ public WarDeployment(String archiveName, Package[] pkgs, boolean show) {
+
+ ArchivePath metaInf = ArchivePaths.create("META-INF");
+
+
+ WebArchive archive = ShrinkWrap.create(WebArchive.class, archiveName);
+ for(Package pkg : pkgs) {
+ archive.addPackage(pkg);
+ }
+
+ File sourceMetaInf = getSourceMetaInfDir(archiveName);
+ addFiles(archive, sourceMetaInf, metaInf);
+
+ File sourceWebInf = getSourceWebInfDir(archiveName);
+ if (sourceWebInf != null) {
+ addFiles(archive, sourceWebInf, ArchivePaths.create("WEB-INF"));
+ }
+
+ System.out.println(archive.toString(show));
+ realArchive = createArchive(archive);
+ }
+
+ @Override
+ protected File getRealArchive() {
+ return realArchive;
+ }
+ }
+
+ private class ArbitraryDeployment extends AbstractDeployment {
+ final File realArchive;
+
+ public ArbitraryDeployment(Archive archive, boolean show) {
+
+ ArchivePath metaInf = ArchivePaths.create("META-INF");
+
+ System.out.println(archive.toString(show));
+ realArchive = createArchive(archive);
+ }
+
+ @Override
+ protected File getRealArchive() {
+ return realArchive;
+ }
+ }
+
+ private class WarFileDeployment extends AbstractDeployment {
+
+ private File file;
+
+ public WarFileDeployment(File file) {
+ this.file = file;
+ }
+
+ @Override
+ protected File getRealArchive() {
+ return file;
+ }
+
+ }
+}
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DeploymentUtils.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeploymentIntegrationTest.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeploymentIntegrationTest.java 2011-04-12 14:46:47 UTC (rev 30520)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeploymentIntegrationTest.java 2011-04-12 16:23:19 UTC (rev 30521)
@@ -33,7 +33,6 @@
import org.eclipse.core.runtime.Platform;
import org.jboss.ide.eclipse.as7.deployment.Deployable;
import org.jboss.ide.eclipse.as7.deployment.DeploymentException;
-import org.jboss.ide.eclipse.as7.deployment.DeploymentUtils;
import org.jboss.ide.eclipse.as7.deployment.Session;
import org.junit.Before;
import org.junit.Ignore;
@@ -75,18 +74,6 @@
}
}
- @Test
- public void canDeployWithDemoUtils() throws URISyntaxException, IOException {
- DeploymentUtils utils = new DeploymentUtils();
- utils.addWarFileDeployment(getWarFile("minimalistic.war"));
- String response = getServerResponse(new URL(
- MessageFormat.format("http://{0}:{1}/{2}",
- HOST,
- String.valueOf(WEB_PORT),
- "test")));
- assertTrue(response.indexOf("minimalistic") >= 0);
- }
-
@Ignore
@Test
public void canDeploy() throws DeploymentException, URISyntaxException, IOException {
13 years, 7 months
JBoss Tools SVN: r30520 - workspace/adietish/org.jboss.ide.eclipse.as7.deployment.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-12 10:46:47 -0400 (Tue, 12 Apr 2011)
New Revision: 30520
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties
Log:
corrected build.properties
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties 2011-04-12 14:45:28 UTC (rev 30519)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties 2011-04-12 14:46:47 UTC (rev 30520)
@@ -10,8 +10,7 @@
jboss-logging-3.0.0.Beta5.jar,\
jboss-marshalling-1.3.0.CR8.jar,\
shrinkwrap-impl-base-1.0.0-alpha-12.jar,\
- shrinkwrap-api-1.0.0-alpha-12.jar,\
- shrinkwrap-spi-1.0.0-alpha-12.jar
+ shrinkwrap-api-1.0.0-alpha-12.jar
src.includes = jboss-dmr-1.0.0.Beta5-sources.jar,\
jboss-dmr-1.0.0.Beta5.jar,\
jboss-marshalling-1.3.0.CR8-sources.jar,\
13 years, 7 months
JBoss Tools SVN: r30519 - workspace/adietish/org.jboss.ide.eclipse.as7.deployment.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-12 10:45:28 -0400 (Tue, 12 Apr 2011)
New Revision: 30519
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties
Log:
corrected build.properties
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties 2011-04-12 14:26:33 UTC (rev 30518)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties 2011-04-12 14:45:28 UTC (rev 30519)
@@ -9,25 +9,15 @@
jboss-dmr-1.0.0.Beta5.jar,\
jboss-logging-3.0.0.Beta5.jar,\
jboss-marshalling-1.3.0.CR8.jar,\
- shrinkwrap-api-1.0.0-alpha-11.jar,\
shrinkwrap-impl-base-1.0.0-alpha-12.jar,\
shrinkwrap-api-1.0.0-alpha-12.jar,\
shrinkwrap-spi-1.0.0-alpha-12.jar
-src.includes = jboss-as-controller-client-7.0.0.Beta2-sources.jar,\
- jboss-as-controller-client-7.0.0.Beta2.jar,\
- jboss-as-logging-7.0.0.Beta2-sources.jar,\
- jboss-as-logging-7.0.0.Beta2.jar,\
- jboss-as-protocol-7.0.0.Beta2-sources.jar,\
- jboss-as-protocol-7.0.0.Beta2.jar,\
- jboss-dmr-1.0.0.Beta5-sources.jar,\
+src.includes = jboss-dmr-1.0.0.Beta5-sources.jar,\
jboss-dmr-1.0.0.Beta5.jar,\
jboss-marshalling-1.3.0.CR8-sources.jar,\
jboss-marshalling-1.3.0.CR8.jar,\
jboss-threads-2.0.0.CR8-sources.jar,\
jboss-threads-2.0.0.CR8.jar,\
- shrinkwrap-api-1.0.0-alpha-11.jar,\
- jboss-as-controller-7.0.0.Beta2.jar,\
- jboss-as-controller-7.0.0.Beta2-sources.jar,\
jboss-logging-3.0.0.Beta5.jar,\
jboss-logging-3.0.0.Beta5-sources.jar,\
jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar,\
@@ -36,5 +26,4 @@
jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT-sources.jar,\
jboss-as-controller-7.0.0.Beta3-SNAPSHOT.jar,\
jboss-as-controller-7.0.0.Beta3-SNAPSHOT-sources.jar,\
- build.properties,\
REAME.txt
13 years, 7 months
JBoss Tools SVN: r30518 - in workspace/adietish: org.jboss.ide.eclipse.as7.deployment/META-INF and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-12 10:26:33 -0400 (Tue, 12 Apr 2011)
New Revision: 30518
Added:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeploymentIntegrationTest.java
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-7.0.0.Beta3-SNAPSHOT-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-7.0.0.Beta3-SNAPSHOT.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-protocol-7.0.0.Beta3-SNAPSHOT-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-api-1.0.0-alpha-12-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-api-1.0.0-alpha-12.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-impl-base-1.0.0-alpha-12-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-impl-base-1.0.0-alpha-12.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-spi-1.0.0-alpha-12-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-spi-1.0.0-alpha-12.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentUtils.java
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/StandaloneDeployment.java
Removed:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DeploymentBuilderIntegrationTest.java
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-7.0.0.Beta2-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-7.0.0.Beta2.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-client-7.0.0.Beta2-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-client-7.0.0.Beta2.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-logging-7.0.0.Beta2-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-logging-7.0.0.Beta2.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-protocol-7.0.0.Beta2-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-protocol-7.0.0.Beta2.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-threads-7.0.0.Beta2-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-threads-7.0.0.Beta2.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-api-1.0.0-alpha-11.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentBuilder.java
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/META-INF/MANIFEST.MF
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/META-INF/MANIFEST.MF
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/Session.java
Log:
* moved back to Beta3 in order to be able to catch up changes in the trunk since deployment currently doesn't work at all. * Added DeploymentUtils from as7 demo (it clearly shows that it does not work at all)
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath 2011-04-12 12:32:47 UTC (rev 30517)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath 2011-04-12 14:26:33 UTC (rev 30518)
@@ -1,26 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
+ <classpathentry exported="true" kind="lib" path="shrinkwrap-spi-1.0.0-alpha-12.jar"/>
+ <classpathentry exported="true" kind="lib" path="shrinkwrap-api-1.0.0-alpha-12.jar"/>
+ <classpathentry exported="true" kind="lib" path="shrinkwrap-impl-base-1.0.0-alpha-12.jar" sourcepath="shrinkwrap-impl-base-1.0.0-alpha-12-sources.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-marshalling-1.3.0.CR8.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-logging-3.0.0.Beta5.jar"/>
- <classpathentry exported="true" kind="lib" path="jboss-as-controller-7.0.0.Beta2.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-dmr-1.0.0.Beta5.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-threads-2.0.0.CR8.jar" sourcepath="jboss-threads-2.0.0.CR8-sources.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-as-controller-7.0.0.Beta3-SNAPSHOT.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar" sourcepath="jboss-as-controller-client-7.0.0.Beta2-sources.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar"/>
<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.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
- <classpathentry kind="lib" path="jboss-as-controller-client-7.0.0.Beta2-sources.jar"/>
- <classpathentry kind="lib" path="jboss-as-logging-7.0.0.Beta2-sources.jar"/>
- <classpathentry kind="lib" path="jboss-as-protocol-7.0.0.Beta2-sources.jar"/>
<classpathentry kind="lib" path="jboss-dmr-1.0.0.Beta5-sources.jar"/>
<classpathentry kind="lib" path="jboss-threads-2.0.0.CR8-sources.jar"/>
- <classpathentry kind="lib" path="jboss-as-controller-client-7.0.0.Beta2.jar" sourcepath="jboss-as-controller-client-7.0.0.Beta2-sources.jar"/>
- <classpathentry kind="lib" path="jboss-as-logging-7.0.0.Beta2.jar"/>
- <classpathentry kind="lib" path="jboss-as-protocol-7.0.0.Beta2.jar"/>
- <classpathentry kind="lib" path="jboss-dmr-1.0.0.Beta5.jar"/>
<classpathentry kind="lib" path="jboss-marshalling-1.3.0.CR8-sources.jar"/>
- <classpathentry kind="lib" path="jboss-marshalling-1.3.0.CR8.jar"/>
- <classpathentry kind="lib" path="jboss-threads-2.0.0.CR8.jar"/>
- <classpathentry kind="lib" path="shrinkwrap-api-1.0.0-alpha-11.jar"/>
- <classpathentry kind="lib" path="jboss-as-controller-7.0.0.Beta2-sources.jar"/>
- <classpathentry kind="lib" path="jboss-as-threads-7.0.0.Beta2-sources.jar"/>
- <classpathentry kind="lib" path="jboss-as-threads-7.0.0.Beta2.jar"/>
<classpathentry kind="lib" path="jboss-logging-3.0.0.Beta5-sources.jar"/>
+ <classpathentry kind="lib" path="jboss-as-controller-7.0.0.Beta3-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="lib" path="jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="lib" path="jboss-as-protocol-7.0.0.Beta3-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="lib" path="shrinkwrap-api-1.0.0-alpha-12-sources.jar"/>
+ <classpathentry kind="lib" path="shrinkwrap-impl-base-1.0.0-alpha-12-sources.jar"/>
+ <classpathentry kind="lib" path="shrinkwrap-spi-1.0.0-alpha-12-sources.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/META-INF/MANIFEST.MF
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/META-INF/MANIFEST.MF 2011-04-12 12:32:47 UTC (rev 30517)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/META-INF/MANIFEST.MF 2011-04-12 14:26:33 UTC (rev 30518)
@@ -8,16 +8,67 @@
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: .,
- jboss-as-logging-7.0.0.Beta2.jar,
- jboss-as-controller-client-7.0.0.Beta2.jar,
- jboss-as-protocol-7.0.0.Beta2.jar,
- jboss-as-threads-7.0.0.Beta2.jar,
+ jboss-as-controller-7.0.0.Beta3-SNAPSHOT.jar,
+ jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar,
+ jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar,
+ jboss-threads-2.0.0.CR8.jar,
jboss-dmr-1.0.0.Beta5.jar,
+ jboss-logging-3.0.0.Beta5.jar,
jboss-marshalling-1.3.0.CR8.jar,
shrinkwrap-api-1.0.0-alpha-11.jar,
- jboss-threads-2.0.0.CR8.jar,
- jboss-as-controller-7.0.0.Beta2.jar,
- jboss-as-threads-7.0.0.Beta2.jar,
- jboss-logging-3.0.0.Beta5.jar
-Export-Package: org.jboss.ide.eclipse.as7.deployment
+ shrinkwrap-impl-base-1.0.0-alpha-12.jar,
+ shrinkwrap-api-1.0.0-alpha-12.jar,
+ shrinkwrap-spi-1.0.0-alpha-12.jar
+Export-Package: org.jboss.as.controller,
+ org.jboss.as.controller.client,
+ org.jboss.as.controller.client.helpers,
+ org.jboss.as.controller.client.helpers.domain,
+ org.jboss.as.controller.client.helpers.domain.impl,
+ org.jboss.as.controller.client.helpers.standalone,
+ org.jboss.as.controller.client.helpers.standalone.impl,
+ org.jboss.as.controller.descriptions,
+ org.jboss.as.controller.descriptions.common,
+ org.jboss.as.controller.interfaces,
+ org.jboss.as.controller.operations.common,
+ org.jboss.as.controller.operations.global,
+ org.jboss.as.controller.operations.validation,
+ org.jboss.as.controller.parsing,
+ org.jboss.as.controller.persistence,
+ org.jboss.as.controller.registry,
+ org.jboss.as.controller.remote,
+ org.jboss.as.protocol,
+ org.jboss.as.protocol.mgmt,
+ org.jboss.ide.eclipse.as7.deployment,
+ org.jboss.logging,
+ org.jboss.marshalling,
+ org.jboss.marshalling.cloner,
+ org.jboss.marshalling.reflect,
+ org.jboss.marshalling.util,
+ org.jboss.shrinkwrap.api,
+ org.jboss.shrinkwrap.api.asset,
+ org.jboss.shrinkwrap.api.classloader,
+ org.jboss.shrinkwrap.api.container,
+ org.jboss.shrinkwrap.api.exporter,
+ org.jboss.shrinkwrap.api.formatter,
+ org.jboss.shrinkwrap.api.importer,
+ org.jboss.shrinkwrap.api.serialization,
+ org.jboss.shrinkwrap.api.spec,
+ org.jboss.shrinkwrap.impl.base,
+ org.jboss.shrinkwrap.impl.base.asset,
+ org.jboss.shrinkwrap.impl.base.container,
+ org.jboss.shrinkwrap.impl.base.exporter,
+ org.jboss.shrinkwrap.impl.base.exporter.tar,
+ org.jboss.shrinkwrap.impl.base.exporter.zip,
+ org.jboss.shrinkwrap.impl.base.filter,
+ org.jboss.shrinkwrap.impl.base.importer,
+ org.jboss.shrinkwrap.impl.base.importer.tar,
+ org.jboss.shrinkwrap.impl.base.importer.zip,
+ org.jboss.shrinkwrap.impl.base.io,
+ org.jboss.shrinkwrap.impl.base.io.tar,
+ org.jboss.shrinkwrap.impl.base.path,
+ org.jboss.shrinkwrap.impl.base.serialization,
+ org.jboss.shrinkwrap.impl.base.spec,
+ org.jboss.shrinkwrap.spi,
+ org.jboss.threads,
+ org.jboss.threads.management
Bundle-Vendor: JBoss by Red Hat
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties 2011-04-12 12:32:47 UTC (rev 30517)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties 2011-04-12 14:26:33 UTC (rev 30518)
@@ -2,15 +2,17 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
- jboss-as-controller-client-7.0.0.Beta2.jar,\
- jboss-as-logging-7.0.0.Beta2.jar,\
- jboss-as-protocol-7.0.0.Beta2.jar,\
+ jboss-as-controller-7.0.0.Beta3-SNAPSHOT.jar,\
+ jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar,\
+ jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar,\
+ jboss-threads-2.0.0.CR8.jar,\
jboss-dmr-1.0.0.Beta5.jar,\
+ jboss-logging-3.0.0.Beta5.jar,\
jboss-marshalling-1.3.0.CR8.jar,\
shrinkwrap-api-1.0.0-alpha-11.jar,\
- jboss-threads-2.0.0.CR8.jar,\
- jboss-as-controller-7.0.0.Beta2.jar,\
- jboss-logging-3.0.0.Beta5.jar
+ shrinkwrap-impl-base-1.0.0-alpha-12.jar,\
+ shrinkwrap-api-1.0.0-alpha-12.jar,\
+ shrinkwrap-spi-1.0.0-alpha-12.jar
src.includes = jboss-as-controller-client-7.0.0.Beta2-sources.jar,\
jboss-as-controller-client-7.0.0.Beta2.jar,\
jboss-as-logging-7.0.0.Beta2-sources.jar,\
@@ -25,4 +27,14 @@
jboss-threads-2.0.0.CR8.jar,\
shrinkwrap-api-1.0.0-alpha-11.jar,\
jboss-as-controller-7.0.0.Beta2.jar,\
- jboss-as-controller-7.0.0.Beta2-sources.jar
+ jboss-as-controller-7.0.0.Beta2-sources.jar,\
+ jboss-logging-3.0.0.Beta5.jar,\
+ jboss-logging-3.0.0.Beta5-sources.jar,\
+ jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar,\
+ jboss-as-protocol-7.0.0.Beta3-SNAPSHOT-sources.jar,\
+ jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar,\
+ jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT-sources.jar,\
+ jboss-as-controller-7.0.0.Beta3-SNAPSHOT.jar,\
+ jboss-as-controller-7.0.0.Beta3-SNAPSHOT-sources.jar,\
+ build.properties,\
+ REAME.txt
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-7.0.0.Beta2-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-7.0.0.Beta2.jar
===================================================================
(Binary files differ)
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-7.0.0.Beta3-SNAPSHOT-sources.jar
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-7.0.0.Beta3-SNAPSHOT-sources.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-7.0.0.Beta3-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-7.0.0.Beta3-SNAPSHOT.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-client-7.0.0.Beta2-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-client-7.0.0.Beta2.jar
===================================================================
(Binary files differ)
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT-sources.jar
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT-sources.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-logging-7.0.0.Beta2-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-logging-7.0.0.Beta2.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-protocol-7.0.0.Beta2-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-protocol-7.0.0.Beta2.jar
===================================================================
(Binary files differ)
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-protocol-7.0.0.Beta3-SNAPSHOT-sources.jar
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-protocol-7.0.0.Beta3-SNAPSHOT-sources.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-threads-7.0.0.Beta2-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-threads-7.0.0.Beta2.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-api-1.0.0-alpha-11.jar
===================================================================
(Binary files differ)
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-api-1.0.0-alpha-12-sources.jar
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-api-1.0.0-alpha-12-sources.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-api-1.0.0-alpha-12.jar
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-api-1.0.0-alpha-12.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-impl-base-1.0.0-alpha-12-sources.jar
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-impl-base-1.0.0-alpha-12-sources.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-impl-base-1.0.0-alpha-12.jar
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-impl-base-1.0.0-alpha-12.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-spi-1.0.0-alpha-12-sources.jar
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-spi-1.0.0-alpha-12-sources.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-spi-1.0.0-alpha-12.jar
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/shrinkwrap-spi-1.0.0-alpha-12.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentBuilder.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentBuilder.java 2011-04-12 12:32:47 UTC (rev 30517)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentBuilder.java 2011-04-12 14:26:33 UTC (rev 30518)
@@ -1,90 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat Inc..
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat Incorporated - initial API and implementation
- *******************************************************************************/
-package org.jboss.ide.eclipse.as7.deployment;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.Future;
-
-import org.jboss.as.controller.client.helpers.standalone.DeploymentPlan;
-import org.jboss.as.controller.client.helpers.standalone.DeploymentPlanBuilder;
-import org.jboss.as.controller.client.helpers.standalone.InitialDeploymentPlanBuilder;
-import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager;
-import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentPlanResult;
-
-/**
- * @author André Dietisheim
- */
-public class DeploymentBuilder {
-
- public static final long DEFAULT_TIMEOUT = 30 * 1000;
-
- private final List<Deployable> deployables = new ArrayList<Deployable>();
- private long timeout = DEFAULT_TIMEOUT;
- private Session session;
-
- public DeploymentBuilder(Session session) {
- this.session = session;
- }
-
- public DeploymentBuilder(String host, int port) throws UnknownHostException {
- this.session = new Session(host, port);
- }
-
- public DeploymentBuilder add(String name, File file) {
- deployables.add(new Deployable(name, file, timeout));
- return this;
- }
-
- public DeploymentBuilder add(File file) {
- return add(file.getName(), file);
- }
-
- public DeploymentBuilder setTimeout(long timeout) {
- this.timeout = timeout;
- return this;
- }
-
- public List<Deployable> deploy() throws DeploymentException {
- if (deployables.isEmpty()) {
- throw new DeploymentException("no files to deploy.");
- }
-
- ServerDeploymentManager manager = session.getManager();
- InitialDeploymentPlanBuilder builder = manager.newDeploymentPlan();
- try {
- addToBuilder(deployables, builder);
- DeploymentPlan plan = builder.build();
- Future<ServerDeploymentPlanResult> planResult = manager.execute(plan);
- setResult(planResult, deployables);
- return deployables;
- } catch (Exception e) {
- throw new DeploymentException(e);
- }
- }
-
- private void setResult(Future<ServerDeploymentPlanResult> planResult, List<Deployable> deployables) {
- for (Deployable deployable : deployables) {
- deployable.setResultFuture(planResult);
- }
- }
-
- private void addToBuilder(List<Deployable> deployables, DeploymentPlanBuilder builder) throws IOException {
- for (int i = 0; i < deployables.size(); i++) {
- Deployable deployable = deployables.get(i);
- builder = builder.add(deployable.getName(), deployable.getFile()).andDeploy();
- deployable.setDeploymentAction(builder.getLastAction());
- }
- }
-}
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentUtils.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentUtils.java (rev 0)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentUtils.java 2011-04-12 14:26:33 UTC (rev 30518)
@@ -0,0 +1,345 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.ide.eclipse.as7.deployment;
+
+import static org.jboss.as.protocol.StreamUtils.safeClose;
+
+import java.io.Closeable;
+import java.io.File;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+
+import org.jboss.as.controller.client.ModelControllerClient;
+import org.jboss.as.controller.client.helpers.standalone.DeploymentPlan;
+import org.jboss.as.controller.client.helpers.standalone.DeploymentPlanBuilder;
+import org.jboss.as.controller.client.helpers.standalone.DuplicateDeploymentNameException;
+import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ArchivePath;
+import org.jboss.shrinkwrap.api.ArchivePaths;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.container.ResourceContainer;
+import org.jboss.shrinkwrap.api.exporter.ZipExporter;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+
+/**
+ * Used to deploy/undeploy deployments to a running <b>standalone</b> application server
+ *
+ * TODO Use the real deployment API once that is complete
+ *
+ * @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class DeploymentUtils implements Closeable {
+
+ public static final long DEFAULT_TIMEOUT = 15000;
+
+ private final List<AbstractDeployment> deployments = new ArrayList<AbstractDeployment>();
+ private final ModelControllerClient client;
+ private final ServerDeploymentManager manager;
+ private long timeout = DEFAULT_TIMEOUT;
+
+ public DeploymentUtils() throws UnknownHostException {
+ client = ModelControllerClient.Factory.create(InetAddress.getByName("localhost"), 9999);
+ manager = ServerDeploymentManager.Factory.create(client);
+ }
+
+ public DeploymentUtils(String archiveName, Package... pkg) throws UnknownHostException {
+ this();
+ addDeployment(archiveName, pkg);
+ }
+
+ public DeploymentUtils(Archive<?> archive) throws UnknownHostException {
+ this();
+ deployments.add(new ArbitraryDeployment(archive,false));
+ }
+
+ public DeploymentUtils(String archiveName, boolean show, Package... pkgs) throws UnknownHostException {
+ this();
+ addDeployment(archiveName, show, pkgs);
+ }
+
+ public synchronized void addDeployment(String archiveName, Package... pkgs) {
+ addDeployment(archiveName, false, pkgs);
+ }
+
+ public synchronized void addDeployment(String archiveName, boolean show, Package... pkgs) {
+ deployments.add(new Deployment(archiveName, pkgs, show));
+ }
+
+ public synchronized void addWarDeployment(String archiveName, Package... pkgs) {
+ addWarDeployment(archiveName, false, pkgs);
+ }
+
+ public synchronized void addWarDeployment(String archiveName, boolean show, Package... pkgs) {
+ deployments.add(new WarDeployment(archiveName, pkgs, show));
+ }
+
+ public synchronized void addWarFileDeployment(File file) {
+ deployments.add(new WarFileDeployment(file));
+ }
+
+ public synchronized void deploy() throws DuplicateDeploymentNameException, IOException, ExecutionException, InterruptedException, TimeoutException {
+ DeploymentPlanBuilder builder = manager.newDeploymentPlan().withRollback();
+ for (AbstractDeployment deployment : deployments) {
+ builder = deployment.addDeployment(manager, builder);
+ }
+
+ try {
+ manager.execute(builder.build()).get(timeout, TimeUnit.MILLISECONDS);
+ } finally {
+ markDeploymentsDeployed();
+ }
+ }
+
+ private void markDeploymentsDeployed() {
+ for (AbstractDeployment deployment : deployments) {
+ deployment.deployed = true;
+ }
+ }
+
+ public synchronized void undeploy() throws ExecutionException, InterruptedException, TimeoutException {
+ DeploymentPlanBuilder builder = manager.newDeploymentPlan();
+ for (AbstractDeployment deployment : deployments) {
+ builder = deployment.removeDeployment(builder);
+ }
+ DeploymentPlan plan = builder.build();
+ if (plan.getDeploymentActions().size() > 0) {
+ manager.execute(builder.build()).get(timeout, TimeUnit.MILLISECONDS);
+ }
+ }
+
+ public MBeanServerConnection getConnection() throws Exception {
+ return JMXConnectorFactory.connect(new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:1090/jmxrmi"),
+ new HashMap<String, Object>()).getMBeanServerConnection();
+ }
+
+ public String showJndi() throws Exception {
+ return (String)getConnection().invoke(new ObjectName("jboss:type=JNDIView"), "list", new Object[] {true}, new String[] {"boolean"});
+ }
+
+ public long getTimeout() {
+ return timeout;
+ }
+
+ public void setTimeout(long timeout) {
+ this.timeout = timeout;
+ }
+
+ @Override
+ public void close() throws IOException {
+ safeClose(client);
+ }
+
+ private abstract class AbstractDeployment{
+
+ boolean deployed;
+ String deployment;
+
+ public synchronized DeploymentPlanBuilder addDeployment(ServerDeploymentManager manager, DeploymentPlanBuilder builder) throws DuplicateDeploymentNameException, IOException, ExecutionException, InterruptedException {
+ deployment = getRealArchive().getName();
+ System.out.println("Deploying " + deployment);
+ return builder.add(deployment, getRealArchive()).deploy(deployment);
+ }
+
+ public synchronized DeploymentPlanBuilder removeDeployment(DeploymentPlanBuilder builder) {
+ if (deployed) {
+ System.out.println("Undeploying " + deployment);
+ return builder.undeploy(deployment).remove(deployment);
+ }
+ else {
+ return builder;
+ }
+ }
+
+ protected void addFiles(ResourceContainer<?> archive, File dir, ArchivePath dest) {
+ for (String name : dir.list()) {
+ File file = new File(dir, name);
+ if (file.isDirectory()) {
+ addFiles(archive, file, ArchivePaths.create(dest, name));
+ } else {
+ archive.addAsResource(file, ArchivePaths.create(dest, name));
+ }
+ }
+ }
+
+ protected File getSourceMetaInfDir(String archiveName) {
+ String name = "archives/" + archiveName + "/META-INF/MANIFEST.MF";
+
+ URL url = Thread.currentThread().getContextClassLoader().getResource(name);
+ if (url == null) {
+ throw new IllegalArgumentException("No resource called " + name);
+ }
+ try {
+ File file = new File(url.toURI());
+ return file.getParentFile();
+ } catch (URISyntaxException e) {
+ throw new RuntimeException("Could not get file for " + url);
+ }
+ }
+
+ protected File getSourceWebInfDir(String archiveName) {
+ String name = "archives/" + archiveName + "/WEB-INF";
+
+ URL url = Thread.currentThread().getContextClassLoader().getResource(name);
+ if (url == null) {
+ return null;
+ }
+ try {
+ return new File(url.toURI());
+ } catch (URISyntaxException e) {
+ throw new RuntimeException("Could not get file for " + url);
+ }
+ }
+
+ protected File getOutputDir() {
+ File file = new File("target");
+ if (!file.exists()) {
+ throw new IllegalStateException("target/ does not exist");
+ }
+ if (!file.isDirectory()) {
+ throw new IllegalStateException("target/ is not a directory");
+ }
+ file = new File(file, "archives");
+ if (file.exists()) {
+ if (!file.isDirectory()) {
+ throw new IllegalStateException("target/archives/ already exists and is not a directory");
+ }
+ } else {
+ file.mkdir();
+ }
+ return file.getAbsoluteFile();
+ }
+
+ protected File createArchive(Archive<?> archive) {
+ File realArchive = new File(getOutputDir(), archive.getName());
+ archive.as(ZipExporter.class).exportZip(realArchive, true);
+ return realArchive;
+ }
+
+ protected abstract File getRealArchive();
+ }
+
+ private class Deployment extends AbstractDeployment {
+ final File realArchive;
+
+ public Deployment(String archiveName, Package[] pkgs, boolean show) {
+
+ ArchivePath metaInf = ArchivePaths.create("META-INF");
+
+ JavaArchive archive = ShrinkWrap.create(JavaArchive.class, archiveName);
+ for(Package pkg : pkgs) {
+ archive.addPackage(pkg);
+ }
+
+ File sourceMetaInf = getSourceMetaInfDir(archiveName);
+ addFiles(archive, sourceMetaInf, metaInf);
+
+ System.out.println(archive.toString(show));
+ realArchive = createArchive(archive);
+ }
+
+ @Override
+ protected File getRealArchive() {
+ return realArchive;
+ }
+ }
+
+
+ private class WarDeployment extends AbstractDeployment {
+ final File realArchive;
+
+ public WarDeployment(String archiveName, Package[] pkgs, boolean show) {
+
+ ArchivePath metaInf = ArchivePaths.create("META-INF");
+
+
+ WebArchive archive = ShrinkWrap.create(WebArchive.class, archiveName);
+ for(Package pkg : pkgs) {
+ archive.addPackage(pkg);
+ }
+
+ File sourceMetaInf = getSourceMetaInfDir(archiveName);
+ addFiles(archive, sourceMetaInf, metaInf);
+
+ File sourceWebInf = getSourceWebInfDir(archiveName);
+ if (sourceWebInf != null) {
+ addFiles(archive, sourceWebInf, ArchivePaths.create("WEB-INF"));
+ }
+
+ System.out.println(archive.toString(show));
+ realArchive = createArchive(archive);
+ }
+
+ @Override
+ protected File getRealArchive() {
+ return realArchive;
+ }
+ }
+
+ private class ArbitraryDeployment extends AbstractDeployment {
+ final File realArchive;
+
+ public ArbitraryDeployment(Archive archive, boolean show) {
+
+ ArchivePath metaInf = ArchivePaths.create("META-INF");
+
+ System.out.println(archive.toString(show));
+ realArchive = createArchive(archive);
+ }
+
+ @Override
+ protected File getRealArchive() {
+ return realArchive;
+ }
+ }
+
+ private class WarFileDeployment extends AbstractDeployment {
+
+ private File file;
+
+ public WarFileDeployment(File file) {
+ this.file = file;
+ }
+
+ @Override
+ protected File getRealArchive() {
+ return file;
+ }
+
+ }
+}
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentUtils.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/Session.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/Session.java 2011-04-12 12:32:47 UTC (rev 30517)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/Session.java 2011-04-12 14:26:33 UTC (rev 30518)
@@ -33,6 +33,10 @@
*/
public class Session {
+ protected ServerDeploymentManager getManager() {
+ return manager;
+ }
+
private ModelControllerClient client;
private ServerDeploymentManager manager;
@@ -41,10 +45,10 @@
this.manager = ServerDeploymentManager.Factory.create(client);
}
- public ServerDeploymentManager getManager() {
- return manager;
+ public StandaloneDeployment newStandaloneDeployment() {
+ return new StandaloneDeployment(this);
}
-
+
public void close() {
StreamUtils.safeClose(client);
}
Copied: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/StandaloneDeployment.java (from rev 30473, workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/DeploymentBuilder.java)
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/StandaloneDeployment.java (rev 0)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/StandaloneDeployment.java 2011-04-12 14:26:33 UTC (rev 30518)
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.jboss.ide.eclipse.as7.deployment;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.Future;
+
+import org.jboss.as.controller.client.helpers.standalone.DeploymentPlan;
+import org.jboss.as.controller.client.helpers.standalone.DeploymentPlanBuilder;
+import org.jboss.as.controller.client.helpers.standalone.InitialDeploymentPlanBuilder;
+import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager;
+import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentPlanResult;
+
+/**
+ * @author André Dietisheim
+ */
+public class StandaloneDeployment {
+
+ public static final long DEFAULT_TIMEOUT = 30 * 1000;
+
+ private final List<Deployable> deployables = new ArrayList<Deployable>();
+ private long timeout = DEFAULT_TIMEOUT;
+ private Session session;
+
+ protected StandaloneDeployment(Session session) {
+ this.session = session;
+ }
+
+ public StandaloneDeployment add(String name, File file) {
+ deployables.add(new Deployable(name, file, timeout));
+ return this;
+ }
+
+ public StandaloneDeployment add(File file) {
+ return add(file.getName(), file);
+ }
+
+ public StandaloneDeployment setTimeout(long timeout) {
+ this.timeout = timeout;
+ return this;
+ }
+
+ public List<Deployable> deploy() throws DeploymentException {
+ if (deployables.isEmpty()) {
+ throw new DeploymentException("no files to deploy.");
+ }
+
+ ServerDeploymentManager manager = session.getManager();
+ InitialDeploymentPlanBuilder builder = manager.newDeploymentPlan();
+ try {
+ addToBuilder(deployables, builder);
+ DeploymentPlan plan = builder.build();
+ Future<ServerDeploymentPlanResult> planResult = manager.execute(plan);
+ setResult(planResult, deployables);
+ return deployables;
+ } catch (Exception e) {
+ throw new DeploymentException(e);
+ }
+ }
+
+ private void setResult(Future<ServerDeploymentPlanResult> planResult, List<Deployable> deployables) {
+ for (Deployable deployable : deployables) {
+ deployable.setResultFuture(planResult);
+ }
+ }
+
+ private void addToBuilder(List<Deployable> deployables, DeploymentPlanBuilder builder) throws IOException {
+ for (int i = 0; i < deployables.size(); i++) {
+ Deployable deployable = deployables.get(i);
+ builder = builder.add(deployable.getName(), deployable.getFile()).andDeploy();
+ deployable.setDeploymentAction(builder.getLastAction());
+ }
+ }
+}
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/StandaloneDeployment.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/META-INF/MANIFEST.MF
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/META-INF/MANIFEST.MF 2011-04-12 12:32:47 UTC (rev 30517)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/META-INF/MANIFEST.MF 2011-04-12 14:26:33 UTC (rev 30518)
@@ -4,8 +4,8 @@
Bundle-SymbolicName: org.jboss.ide.eclipse.as7.deployment.tests
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Import-Package: org.jboss.ide.eclipse.as7.deployment
Require-Bundle: org.junit;bundle-version="[4.8.1,5.0.0)",
- org.eclipse.core.runtime;bundle-version="3.7.0"
+ org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.jboss.ide.eclipse.as7.deployment;bundle-version="0.0.1"
Bundle-ClassPath: wars/,
.
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DeploymentBuilderIntegrationTest.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DeploymentBuilderIntegrationTest.java 2011-04-12 12:32:47 UTC (rev 30517)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DeploymentBuilderIntegrationTest.java 2011-04-12 14:26:33 UTC (rev 30518)
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2010 Red Hat Inc..
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat Incorporated - initial API and implementation
- *******************************************************************************/
-package org.jboss.ide.eclipse.as7.deployment.tests;
-
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.fail;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.StringWriter;
-import java.net.ConnectException;
-import java.net.HttpURLConnection;
-import java.net.InetSocketAddress;
-import java.net.Socket;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.net.UnknownHostException;
-import java.text.MessageFormat;
-import java.util.List;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Platform;
-import org.jboss.ide.eclipse.as7.deployment.Deployable;
-import org.jboss.ide.eclipse.as7.deployment.DeploymentBuilder;
-import org.jboss.ide.eclipse.as7.deployment.DeploymentException;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.osgi.framework.Bundle;
-
-/**
- * @author André Dietisheim
- */
-public class DeploymentBuilderIntegrationTest {
-
- private static final String WAR_FOLDER = "/wars/";
- private static final String BUNDLE_ID = "org.jboss.ide.eclipse.as7.deployment.tests";
- private static final int WEBAPP_RESPONSE_TIMEOUT = 10 * 1024;
-
- private static final String HOST = "localhost";
- private static final int MGMT_PORT = 9999;
- private static final int WEB_PORT = 8080;
-
- @Before
- public void setUp() throws UnknownHostException, IOException {
- assertAs7IsRunning();
- }
-
- private void assertAs7IsRunning() throws UnknownHostException, IOException {
- try {
- Socket socket = new Socket();
- socket.connect(new InetSocketAddress(HOST, MGMT_PORT));
- socket.close();
- } catch (ConnectException e) {
- fail("JBoss as7 seems not to run on " + HOST + ", test cannot access it's management API on port "
- + MGMT_PORT);
- }
- }
-
- @Ignore
- @Test
- public void canDeploy() throws DeploymentException, URISyntaxException, IOException {
- File file = getWarFile("minimalistic.war");
- new DeploymentBuilder(HOST, MGMT_PORT).add(file).deploy();
- }
-
- @Ignore
- @Test
- public void returnsDeployables() throws DeploymentException, URISyntaxException, IOException {
- String warName = "minimalistic.war";
- File file = getWarFile(warName);
- List<Deployable> deployables = new DeploymentBuilder(HOST, MGMT_PORT).add(file).deploy();
- assertEquals(1, deployables.size());
- assertEquals(warName, deployables.get(0).getName());
- }
-
- @Test
- public void canGetDeploymentStatus() throws DeploymentException, URISyntaxException, IOException {
- File file = getWarFile("minimalistic.war");
- List<Deployable> deployables = new DeploymentBuilder(HOST, MGMT_PORT).add(file).deploy();
- Deployable deployable = deployables.get(0);
- assertNotNull(deployable.getStatus());
- }
-
- @Test
- public void isDeployed() throws DeploymentException, URISyntaxException, IOException {
- String warName = "minimalistic.war";
- File file = getWarFile(warName);
- List<Deployable> deployables = new DeploymentBuilder(HOST, MGMT_PORT).add(file).deploy();
- Deployable deployable = deployables.get(0);
- deployable.getStatus(); // wait for deployment to have finished
- String response = getServerResponse(new URL(
- MessageFormat.format("http://{0}:{1}/{2}",
- HOST,
- String.valueOf(WEB_PORT),
- getWebappname(deployable.getName()))));
- assertTrue(response.indexOf("minimalistic") >= 0);
- }
-
- /**
- * cuts off the .war suffix
- * @param deployableName
- * @return
- */
- private String getWebappname(String deployableName) {
- int suffixIndex = deployableName.indexOf('.');
- if (suffixIndex < 0) {
- return deployableName;
- }
- return deployableName.substring(0, suffixIndex);
- }
-
- private File getWarFile(String name) throws URISyntaxException, IOException {
- Bundle bundle = Platform.getBundle(BUNDLE_ID);
- URL entryUrl = bundle.getEntry(WAR_FOLDER + name);
- return new File(FileLocator.resolve(entryUrl).toURI());
- }
-
- private String getServerResponse(URL url) throws IOException {
- HttpURLConnection connection = (HttpURLConnection) url.openConnection();
- connection.setUseCaches(false);
- connection.setDoInput(true);
- connection.setAllowUserInteraction(false);
- connection.setConnectTimeout(WEBAPP_RESPONSE_TIMEOUT);
- connection.setInstanceFollowRedirects(true);
- connection.setDoOutput(false);
- BufferedInputStream in = new BufferedInputStream(connection.getInputStream());
- return toString(in);
- }
-
- private String toString(BufferedInputStream in) throws IOException {
- StringWriter writer = new StringWriter();
- for (int data = -1; ((data = in.read()) != -1);) {
- writer.write(data);
- }
- return writer.toString();
- }
-}
Copied: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeploymentIntegrationTest.java (from rev 30484, workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/DeploymentBuilderIntegrationTest.java)
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeploymentIntegrationTest.java (rev 0)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeploymentIntegrationTest.java 2011-04-12 14:26:33 UTC (rev 30518)
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat Inc..
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat Incorporated - initial API and implementation
+ *******************************************************************************/
+package org.jboss.ide.eclipse.as7.deployment.tests;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.fail;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.net.ConnectException;
+import java.net.HttpURLConnection;
+import java.net.InetSocketAddress;
+import java.net.Socket;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.UnknownHostException;
+import java.text.MessageFormat;
+import java.util.List;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.ide.eclipse.as7.deployment.Deployable;
+import org.jboss.ide.eclipse.as7.deployment.DeploymentException;
+import org.jboss.ide.eclipse.as7.deployment.DeploymentUtils;
+import org.jboss.ide.eclipse.as7.deployment.Session;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author André Dietisheim
+ */
+public class StandaloneDeploymentIntegrationTest {
+
+ private static final String WAR_FOLDER = "/wars/";
+ private static final String BUNDLE_ID = "org.jboss.ide.eclipse.as7.deployment.tests";
+ private static final int WEBAPP_RESPONSE_TIMEOUT = 10 * 1024;
+
+ private static final String HOST = "localhost";
+ private static final int MGMT_PORT = 9999;
+ private static final int WEB_PORT = 8080;
+ private Session session;
+
+ @Before
+ public void setUp() throws UnknownHostException, IOException {
+ assertAs7IsRunning();
+ this.session = new Session(HOST, MGMT_PORT);
+ }
+
+ public void tearDown() {
+ session.close();
+ }
+
+ private void assertAs7IsRunning() throws UnknownHostException, IOException {
+ try {
+ Socket socket = new Socket();
+ socket.connect(new InetSocketAddress(HOST, MGMT_PORT));
+ socket.close();
+ } catch (ConnectException e) {
+ fail("JBoss as7 seems not to run on " + HOST + ", test cannot access it's management API on port "
+ + MGMT_PORT);
+ }
+ }
+
+ @Test
+ public void canDeployWithDemoUtils() throws URISyntaxException, IOException {
+ DeploymentUtils utils = new DeploymentUtils();
+ utils.addWarFileDeployment(getWarFile("minimalistic.war"));
+ String response = getServerResponse(new URL(
+ MessageFormat.format("http://{0}:{1}/{2}",
+ HOST,
+ String.valueOf(WEB_PORT),
+ "test")));
+ assertTrue(response.indexOf("minimalistic") >= 0);
+ }
+
+ @Ignore
+ @Test
+ public void canDeploy() throws DeploymentException, URISyntaxException, IOException {
+ File file = getWarFile("minimalistic.war");
+ session.newStandaloneDeployment().add(file).deploy();
+ }
+
+ @Ignore
+ @Test
+ public void returnsDeployables() throws DeploymentException, URISyntaxException, IOException {
+ String warName = "minimalistic.war";
+ File file = getWarFile(warName);
+ List<Deployable> deployables = session.newStandaloneDeployment().add(file).deploy();
+ assertEquals(1, deployables.size());
+ assertEquals(warName, deployables.get(0).getName());
+ }
+
+ @Test
+ public void canGetDeploymentStatus() throws DeploymentException, URISyntaxException, IOException {
+ File file = getWarFile("minimalistic.war");
+ List<Deployable> deployables = session.newStandaloneDeployment().add(file).deploy();
+ Deployable deployable = deployables.get(0);
+ assertNotNull(deployable.getStatus());
+ }
+
+ @Test
+ public void isDeployed() throws DeploymentException, URISyntaxException, IOException {
+ String warName = "minimalistic.war";
+ File file = getWarFile(warName);
+ Session session = new Session(HOST, MGMT_PORT);
+ List<Deployable> deployables = session.newStandaloneDeployment().add(file).deploy();
+ Deployable deployable = deployables.get(0);
+ deployable.getStatus(); // wait for deployment to have finished
+ String response = getServerResponse(new URL(
+ MessageFormat.format("http://{0}:{1}/{2}",
+ HOST,
+ String.valueOf(WEB_PORT),
+ getWebappname(deployable.getName()))));
+ assertTrue(response.indexOf("minimalistic") >= 0);
+ }
+
+ /**
+ * cuts off the .war suffix
+ * @param deployableName
+ * @return
+ */
+ private String getWebappname(String deployableName) {
+ int suffixIndex = deployableName.indexOf('.');
+ if (suffixIndex < 0) {
+ return deployableName;
+ }
+ return deployableName.substring(0, suffixIndex);
+ }
+
+ private File getWarFile(String name) throws URISyntaxException, IOException {
+ Bundle bundle = Platform.getBundle(BUNDLE_ID);
+ URL entryUrl = bundle.getEntry(WAR_FOLDER + name);
+ return new File(FileLocator.resolve(entryUrl).toURI());
+ }
+
+ private String getServerResponse(URL url) throws IOException {
+ HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+ connection.setUseCaches(false);
+ connection.setDoInput(true);
+ connection.setAllowUserInteraction(false);
+ connection.setConnectTimeout(WEBAPP_RESPONSE_TIMEOUT);
+ connection.setInstanceFollowRedirects(true);
+ connection.setDoOutput(false);
+ BufferedInputStream in = new BufferedInputStream(connection.getInputStream());
+ return toString(in);
+ }
+
+ private String toString(BufferedInputStream in) throws IOException {
+ StringWriter writer = new StringWriter();
+ for (int data = -1; ((data = in.read()) != -1);) {
+ writer.write(data);
+ }
+ return writer.toString();
+ }
+}
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeploymentIntegrationTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
13 years, 7 months
JBoss Tools SVN: r30517 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-04-12 08:32:47 -0400 (Tue, 12 Apr 2011)
New Revision: 30517
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmEntityImpl.java
Log:
https://issues.jboss.org/browse/JBIDE-8708
Return valid DBTable name
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmEntityImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmEntityImpl.java 2011-04-12 11:52:43 UTC (rev 30516)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/orm/HibernateOrmEntityImpl.java 2011-04-12 12:32:47 UTC (rev 30517)
@@ -14,6 +14,9 @@
import java.util.ListIterator;
import org.eclipse.jpt.common.core.utility.TextRange;
+import org.eclipse.jpt.common.utility.internal.CollectionTools;
+import org.eclipse.jpt.common.utility.internal.NotNullFilter;
+import org.eclipse.jpt.common.utility.internal.iterables.FilteringIterable;
import org.eclipse.jpt.common.utility.internal.iterables.TransformationIterable;
import org.eclipse.jpt.common.utility.internal.iterators.EmptyListIterator;
import org.eclipse.jpt.jpa.core.context.BaseJoinColumn;
@@ -117,18 +120,25 @@
return this.getTable().getDBTableName();
}
- @Override
protected boolean tableNameIsValid(String tableName) {
- // TODO Auto-generated method stub
- return super.tableNameIsValid(tableName);
+ return this.tableIsUndefined || CollectionTools.contains(this.getAllAssociatedDBTableNames(), tableName);
}
+
+ public Iterable<String> getAllAssociatedDBTableNames() {
+ return this.convertToDBNames(this.getAllAssociatedTables());
+ }
+ /**
+ * strip out <code>null</code> names
+ */
+ protected Iterable<String> convertToDBNames(Iterable<ReadOnlyTable> tables) {
+ return new FilteringIterable<String>(this.convertToDBNames_(tables), NotNullFilter.<String>instance());
+ }
/**
* Convert Table to it's DB name.
*/
- @Override
- protected Iterable<String> convertToNames_(Iterable<ReadOnlyTable> tables) {
+ protected Iterable<String> convertToDBNames_(Iterable<ReadOnlyTable> tables) {
return new TransformationIterable<ReadOnlyTable, String>(tables) {
@Override
protected String transform(ReadOnlyTable t) {
@@ -141,6 +151,7 @@
};
}
+
@Override
protected PrimaryKeyJoinColumnOwner buildPrimaryKeyJoinColumnOwner() {
return new HibernatePrimaryKeyJoinColumnOwner();
13 years, 7 months
JBoss Tools SVN: r30516 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/jpa2.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-04-12 07:52:43 -0400 (Tue, 12 Apr 2011)
New Revision: 30516
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/jpa2/HibernateJpaFactory2_0.java
Log:
https://issues.jboss.org/browse/JBIDE-8681
Implement JpaFactory2_0 interface
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/jpa2/HibernateJpaFactory2_0.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/jpa2/HibernateJpaFactory2_0.java 2011-04-12 05:04:25 UTC (rev 30515)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/jpa2/HibernateJpaFactory2_0.java 2011-04-12 11:52:43 UTC (rev 30516)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.hibernate.jpt.core.internal.jpa2;
+
import org.eclipse.jpt.jpa.core.JpaDataSource;
import org.eclipse.jpt.jpa.core.JpaProject;
import org.eclipse.jpt.jpa.core.context.PersistentType;
@@ -44,6 +45,7 @@
import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaPersistentAttribute2_0;
import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaPersistentType2_0;
import org.eclipse.jpt.jpa.core.internal.jpa2.context.java.GenericJavaSequenceGenerator2_0;
+import org.eclipse.jpt.jpa.core.jpa2.JpaFactory2_0;
import org.eclipse.jpt.jpa.core.jpa2.JpaProject2_0;
import org.eclipse.jpt.jpa.core.jpa2.context.MetamodelSourceType;
import org.eclipse.jpt.jpa.core.jpa2.context.Orderable2_0;
@@ -72,21 +74,13 @@
import org.jboss.tools.hibernate.jpt.core.internal.context.java.HibernateJavaOneToOneMapping;
+
/**
* @author Dmitry Geraskov
*
*/
-public class HibernateJpaFactory2_0 extends HibernateAbstractJpaFactory {
+public class HibernateJpaFactory2_0 extends HibernateAbstractJpaFactory implements JpaFactory2_0 {
- // ********** Core Model **********
- @Override
- public JpaProject buildJpaProject(JpaProject.Config config){
- if ( ! (config instanceof JpaProject2_0.Config)) {
- throw new IllegalArgumentException("config must be 2.0-compatible: " + config); //$NON-NLS-1$
- }
- return super.buildJpaProject(config);
- }
-
// ********** Hibernate Specific **********
@Override
public JavaManyToOneMapping buildJavaManyToOneMapping(JavaPersistentAttribute parent) {
@@ -106,6 +100,16 @@
}
// ********** From GenericJpa2_0 Model **********
+ // ********** Core Model **********
+
+ @Override
+ public JpaProject buildJpaProject(JpaProject.Config config) {
+ if ( ! (config instanceof JpaProject2_0.Config)) {
+ throw new IllegalArgumentException("config must be 2.0-compatible: " + config); //$NON-NLS-1$
+ }
+ return super.buildJpaProject(config);
+ }
+
public MetamodelSourceType.Synchronizer buildMetamodelSynchronizer(MetamodelSourceType sourceType) {
return new GenericMetamodelSynchronizer(sourceType);
}
13 years, 7 months
JBoss Tools SVN: r30515 - in branches/jbosstools-3.2.x: jbpm/tests/org.jboss.tools.jbpm.ui.bot.test and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-04-12 01:04:25 -0400 (Tue, 12 Apr 2011)
New Revision: 30515
Added:
branches/jbosstools-3.2.x/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/pom.xml
branches/jbosstools-3.2.x/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/pom.xml
branches/jbosstools-3.2.x/smooks/tests/org.jboss.tools.smooks.ui.bot.test/pom.xml
Modified:
branches/jbosstools-3.2.x/bpmn/plugins/org.jboss.tools.jbpm/META-INF/MANIFEST.MF
Log:
add missing poms and make poms and manifest versions match up
Modified: branches/jbosstools-3.2.x/bpmn/plugins/org.jboss.tools.jbpm/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-3.2.x/bpmn/plugins/org.jboss.tools.jbpm/META-INF/MANIFEST.MF 2011-04-12 04:59:57 UTC (rev 30514)
+++ branches/jbosstools-3.2.x/bpmn/plugins/org.jboss.tools.jbpm/META-INF/MANIFEST.MF 2011-04-12 05:04:25 UTC (rev 30515)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: jBPM Eclipse Plug-in
Bundle-SymbolicName: org.jboss.tools.jbpm;singleton:=true
-Bundle-Version: 5.0.0.SNAPSHOT
+Bundle-Version: 5.0.0.qualifier
Bundle-Activator: org.jboss.tools.jbpm.JBPMEclipsePlugin
Bundle-Vendor: JBoss, a division of Red Hat
Bundle-Localization: plugin
Added: branches/jbosstools-3.2.x/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/pom.xml
===================================================================
--- branches/jbosstools-3.2.x/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/pom.xml (rev 0)
+++ branches/jbosstools-3.2.x/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/pom.xml 2011-04-12 05:04:25 UTC (rev 30515)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.jbpm.tests</groupId>
+ <artifactId>org.jboss.tools.jbpm.ui.bot.test</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
Added: branches/jbosstools-3.2.x/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/pom.xml
===================================================================
--- branches/jbosstools-3.2.x/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/pom.xml (rev 0)
+++ branches/jbosstools-3.2.x/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/pom.xml 2011-04-12 05:04:25 UTC (rev 30515)
@@ -0,0 +1,17 @@
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.modeshape</groupId>
+ <artifactId>org.jboss.tools.modeshape.rest.ui.test</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+ <properties>
+ <emma.filter>org.jboss.tools.modeshape.rest.ui*</emma.filter>
+ <emma.instrument.bundles>org.jboss.tools.modeshape.rest</emma.instrument.bundles>
+ </properties>
+</project>
Added: branches/jbosstools-3.2.x/smooks/tests/org.jboss.tools.smooks.ui.bot.test/pom.xml
===================================================================
--- branches/jbosstools-3.2.x/smooks/tests/org.jboss.tools.smooks.ui.bot.test/pom.xml (rev 0)
+++ branches/jbosstools-3.2.x/smooks/tests/org.jboss.tools.smooks.ui.bot.test/pom.xml 2011-04-12 05:04:25 UTC (rev 30515)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.smooks.tests</groupId>
+ <artifactId>org.jboss.tools.smooks.ui.bot.test</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <properties>
+ <emma.filter>org.jboss.tools.smooks.*</emma.filter>
+ <emma.instrument.bundles>org.jboss.tools.smooks.ui,org.jboss.tools.smooks.core</emma.instrument.bundles>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>maven-osgi-test-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>org/jboss/tools/smooks/launch/serialize/ObjectSerializerTest.class</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
13 years, 7 months
JBoss Tools SVN: r30514 - in trunk: modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-04-12 00:59:57 -0400 (Tue, 12 Apr 2011)
New Revision: 30514
Added:
trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/pom.xml
trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/pom.xml
trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/pom.xml
Log:
add missing pom.xml files for jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/pom.xml modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/pom.xml smooks/tests/org.jboss.tools.smooks.ui.bot.test/pom.xml
Added: trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/pom.xml
===================================================================
--- trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/pom.xml (rev 0)
+++ trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/pom.xml 2011-04-12 04:59:57 UTC (rev 30514)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.jbpm.tests</groupId>
+ <artifactId>org.jboss.tools.jbpm.ui.bot.test</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
Added: trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/pom.xml
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/pom.xml (rev 0)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.rest.ui.bot.test/pom.xml 2011-04-12 04:59:57 UTC (rev 30514)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.modeshape</groupId>
+ <artifactId>org.jboss.tools.modeshape.rest.ui.test</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+ <properties>
+ <emma.filter>org.jboss.tools.modeshape.rest.ui*</emma.filter>
+ <emma.instrument.bundles>org.jboss.tools.modeshape.rest</emma.instrument.bundles>
+ </properties>
+</project>
\ No newline at end of file
Added: trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/pom.xml
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/pom.xml (rev 0)
+++ trunk/smooks/tests/org.jboss.tools.smooks.ui.bot.test/pom.xml 2011-04-12 04:59:57 UTC (rev 30514)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.smooks.tests</groupId>
+ <artifactId>org.jboss.tools.smooks.ui.bot.test</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <properties>
+ <emma.filter>org.jboss.tools.smooks.*</emma.filter>
+ <emma.instrument.bundles>org.jboss.tools.smooks.ui,org.jboss.tools.smooks.core</emma.instrument.bundles>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>maven-osgi-test-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>org/jboss/tools/smooks/launch/serialize/ObjectSerializerTest.class</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
13 years, 7 months
JBoss Tools SVN: r30513 - in trunk: maven/plugins/org.jboss.tools.maven.hibernate and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-04-12 00:59:29 -0400 (Tue, 12 Apr 2011)
New Revision: 30513
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/pom.xml
trunk/maven/plugins/org.jboss.tools.maven.hibernate/META-INF/MANIFEST.MF
trunk/maven/plugins/org.jboss.tools.maven.hibernate/pom.xml
Log:
make pom.xml match MANIFEST.MF
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/pom.xml 2011-04-12 04:33:57 UTC (rev 30512)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/pom.xml 2011-04-12 04:59:29 UTC (rev 30513)
@@ -8,7 +8,7 @@
</parent>
<groupId>org.jboss.tools.cdi.tests</groupId>
<artifactId>org.jboss.tools.cdi.seam.solder.core.test</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
Modified: trunk/maven/plugins/org.jboss.tools.maven.hibernate/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.hibernate/META-INF/MANIFEST.MF 2011-04-12 04:33:57 UTC (rev 30512)
+++ trunk/maven/plugins/org.jboss.tools.maven.hibernate/META-INF/MANIFEST.MF 2011-04-12 04:59:29 UTC (rev 30513)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Bundle-SymbolicName: org.jboss.tools.maven.hibernate;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.2.0.qualifier
Bundle-Activator: org.jboss.tools.maven.hibernate.MavenHibernateActivator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
Modified: trunk/maven/plugins/org.jboss.tools.maven.hibernate/pom.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.hibernate/pom.xml 2011-04-12 04:33:57 UTC (rev 30512)
+++ trunk/maven/plugins/org.jboss.tools.maven.hibernate/pom.xml 2011-04-12 04:59:29 UTC (rev 30513)
@@ -10,4 +10,4 @@
<artifactId>org.jboss.tools.maven.hibernate</artifactId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project>
\ No newline at end of file
+</project>
13 years, 7 months
JBoss Tools SVN: r30512 - in trunk/module_template/docs/reference/en-US/images: reference and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-04-12 00:33:57 -0400 (Tue, 12 Apr 2011)
New Revision: 30512
Added:
trunk/module_template/docs/reference/en-US/images/reference/
trunk/module_template/docs/reference/en-US/images/reference/wizard_one/
trunk/module_template/docs/reference/en-US/images/reference/wizard_one/wizard_screenshot_one.png
Log:
adding in image and image directory structure
Added: trunk/module_template/docs/reference/en-US/images/reference/wizard_one/wizard_screenshot_one.png
===================================================================
(Binary files differ)
Property changes on: trunk/module_template/docs/reference/en-US/images/reference/wizard_one/wizard_screenshot_one.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
13 years, 7 months