JBoss Tools SVN: r30541 - in trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi: core/extension and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-04-12 19:51:35 -0400 (Tue, 12 Apr 2011)
New Revision: 30541
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/extension/AbstractDefinitionContextExtension.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IRootDefinitionContext.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/extension/IDefinitionContextExtension.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationDefinition.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java
Log:
JBIDE-8717
https://issues.jboss.org/browse/JBIDE-8717
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IRootDefinitionContext.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IRootDefinitionContext.java 2011-04-12 21:44:00 UTC (rev 30540)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IRootDefinitionContext.java 2011-04-12 23:51:35 UTC (rev 30541)
@@ -10,8 +10,11 @@
******************************************************************************/
package org.jboss.tools.cdi.core;
+import java.util.Set;
+
import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.IType;
+import org.jboss.tools.cdi.core.extension.IDefinitionContextExtension;
import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationDefinition;
/**
@@ -36,8 +39,18 @@
*/
public void addToParents(IPath file);
+ /**
+ * Registers type name in context so that when its parent resource is removed from project,
+ * definitions load from that path should be cleaned from context.
+ *
+ * @param file
+ */
+ public void addType(IPath file, String typeName);
+
public int getAnnotationKind(IType annotationType);
public AnnotationDefinition getAnnotation(String fullyQualifiedName);
+ public Set<IDefinitionContextExtension> getExtensions();
+
}
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/extension/AbstractDefinitionContextExtension.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/extension/AbstractDefinitionContextExtension.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/extension/AbstractDefinitionContextExtension.java 2011-04-12 23:51:35 UTC (rev 30541)
@@ -0,0 +1,72 @@
+package org.jboss.tools.cdi.core.extension;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.core.IType;
+import org.jboss.tools.cdi.core.CDIConstants;
+import org.jboss.tools.cdi.core.IRootDefinitionContext;
+import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationDefinition;
+
+public abstract class AbstractDefinitionContextExtension implements IDefinitionContextExtension {
+ protected IRootDefinitionContext root;
+
+ protected AbstractDefinitionContextExtension original;
+ protected AbstractDefinitionContextExtension workingCopy;
+
+ protected abstract AbstractDefinitionContextExtension copy(boolean clean);
+
+ public void newWorkingCopy(boolean forFullBuild) {
+ if(original != null) return;
+ workingCopy = copy(forFullBuild);
+ workingCopy.original = this;
+ }
+
+ public void applyWorkingCopy() {
+ if(original != null) {
+ original.applyWorkingCopy();
+ return;
+ }
+ if(workingCopy == null) {
+ return;
+ }
+
+ doApplyWorkingCopy();
+
+ workingCopy = null;
+ }
+
+ protected void doApplyWorkingCopy() {}
+
+ public void clean() {
+ }
+
+ public void clean(IPath path) {
+ }
+
+ public void clean(String typeName) {
+ }
+
+ public void setRootContext(IRootDefinitionContext context) {
+ this.root = context;
+ }
+
+ public IRootDefinitionContext getRootContext() {
+ return root;
+ }
+
+ public IDefinitionContextExtension getWorkingCopy() {
+ if(original != null) {
+ return this;
+ }
+ if(workingCopy != null) {
+ return workingCopy;
+ }
+ workingCopy = copy(false);
+ workingCopy.original = this;
+ return workingCopy;
+ }
+
+ public void computeAnnotationKind(AnnotationDefinition annotation) {
+
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/extension/AbstractDefinitionContextExtension.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/extension/IDefinitionContextExtension.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/extension/IDefinitionContextExtension.java 2011-04-12 21:44:00 UTC (rev 30540)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/extension/IDefinitionContextExtension.java 2011-04-12 23:51:35 UTC (rev 30541)
@@ -10,8 +10,10 @@
******************************************************************************/
package org.jboss.tools.cdi.core.extension;
+import org.eclipse.jdt.core.IType;
import org.jboss.tools.cdi.core.IDefinitionContext;
import org.jboss.tools.cdi.core.IRootDefinitionContext;
+import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationDefinition;
/**
* Context to keep definitions loaded by CDI extensions.
@@ -21,6 +23,13 @@
*/
public interface IDefinitionContextExtension extends IDefinitionContext {
+ /**
+ * Removes definitions loaded from type
+ *
+ * @param typeName
+ */
+ public void clean(String typeName);
+
public void setRootContext(IRootDefinitionContext context);
/**
@@ -37,4 +46,12 @@
*/
public IDefinitionContextExtension getWorkingCopy();
+ /**
+ * Contributes to computing of annotation kind by root context.
+ *
+ * @param annotationType
+ * @return
+ */
+ public void computeAnnotationKind(AnnotationDefinition annotation);
+
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationDefinition.java 2011-04-12 21:44:00 UTC (rev 30540)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationDefinition.java 2011-04-12 23:51:35 UTC (rev 30541)
@@ -14,6 +14,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.IMethod;
@@ -21,6 +22,7 @@
import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.IAnnotationDeclaration;
import org.jboss.tools.cdi.core.IRootDefinitionContext;
+import org.jboss.tools.cdi.core.extension.IDefinitionContextExtension;
import org.jboss.tools.cdi.internal.core.impl.AnnotationDeclaration;
/**
@@ -36,9 +38,12 @@
public static final int STEREOTYPE = 8; //has Stereotype
public static final int INTERCEPTOR_BINDING = 16; //has InterceptorBinding
public static final int SCOPE = 32; //has Scope or NormalScope
+
+ public static final int EXTENDED = 1024;
//TODO add other definition kinds of interest
protected int kind = NON_RELEVANT;
+ protected Object extendedKind = null;
List<AnnotationMemberDefinition> methods = new ArrayList<AnnotationMemberDefinition>();
@@ -48,10 +53,19 @@
this.kind = kind;
}
+ public void setExtendedKind(Object s) {
+ extendedKind = s;
+ kind |= EXTENDED;
+ }
+
public int getKind() {
return kind;
}
+ public boolean hasExtendedKind(Object kind) {
+ return extendedKind != null && extendedKind.equals(kind);
+ }
+
public List<AnnotationMemberDefinition> getMethods() {
return methods;
}
@@ -87,6 +101,13 @@
kind |= INTERCEPTOR_BINDING;
}
if(kind == NON_RELEVANT) {
+ Set<IDefinitionContextExtension> es = context.getExtensions();
+ for (IDefinitionContextExtension e: es) {
+ e.computeAnnotationKind(this);
+ if(kind == EXTENDED) break;
+ }
+ }
+ if(kind == NON_RELEVANT) {
if(AnnotationHelper.BASIC_ANNOTATION_TYPES.contains(qualifiedName)) {
kind = AnnotationDefinition.BASIC;
} else if(AnnotationHelper.CDI_ANNOTATION_TYPES.contains(qualifiedName)) {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java 2011-04-12 21:44:00 UTC (rev 30540)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java 2011-04-12 23:51:35 UTC (rev 30541)
@@ -59,6 +59,10 @@
for (IDefinitionContextExtension e: extensions) e.setRootContext(this);
}
+ public Set<IDefinitionContextExtension> getExtensions() {
+ return extensions;
+ }
+
private DefinitionContext copy(boolean clean) {
DefinitionContext copy = new DefinitionContext();
copy.project = project;
@@ -114,16 +118,7 @@
}
public void addType(IPath file, String typeName, AbstractTypeDefinition def) {
- if(file != null) {
- Set<String> ts = resources.get(file);
- if(ts == null) {
- ts = new HashSet<String>();
- resources.put(file, ts);
- }
- ts.add(typeName);
- types.add(typeName);
- addToParents(file);
- }
+ addType(file, typeName);
if(def != null) {
if(def instanceof AnnotationDefinition) {
synchronized (annotations) {
@@ -162,6 +157,19 @@
addToParents(path);
}
+ public void addType(IPath file, String typeName) {
+ if(file != null) {
+ Set<String> ts = resources.get(file);
+ if(ts == null) {
+ ts = new HashSet<String>();
+ resources.put(file, ts);
+ }
+ ts.add(typeName);
+ types.add(typeName);
+ addToParents(file);
+ }
+ }
+
public void addToParents(IPath file) {
if(file == null) return;
if(file.segmentCount() < 2) return;
@@ -211,6 +219,7 @@
synchronized (packageDefinitions) {
packageDefinitions.remove(t);
}
+ for (IDefinitionContextExtension e: extensions) e.clean(t);
}
synchronized (beanXMLs) {
beanXMLs.remove(path);
@@ -248,6 +257,7 @@
public int getAnnotationKind(IType annotationType) {
if(annotationType == null) return -1;
+ if(!annotationType.exists()) return -1;
AnnotationDefinition d = getAnnotation(annotationType);
if(d != null) {
return d.getKind();
15 years
JBoss Tools SVN: r30540 - workspace/adietish/org.jboss.ide.eclipse.as7.deployment.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-04-12 17:44:00 -0400 (Tue, 12 Apr 2011)
New Revision: 30540
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath
Log:
workspace stuff - build path was wrong
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath 2011-04-12 20:59:49 UTC (rev 30539)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath 2011-04-12 21:44:00 UTC (rev 30540)
@@ -8,6 +8,6 @@
<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-logging-3.0.0.Beta5.jar" sourcepath="jboss-logging-3.0.0.Beta5-sources.jar"/>
+ <classpathentry kind="lib" path="jboss-logging-3.0.0.Beta3.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
15 years
JBoss Tools SVN: r30539 - in workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite: features and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-04-12 16:59:49 -0400 (Tue, 12 Apr 2011)
New Revision: 30539
Added:
workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/.project
workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/artifacts.jar
workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/content.jar
workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/features/
workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/features/org.jboss.tools.maven.ee6.classpath.feature_1.0.0.201104122255.jar
workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/plugins/
workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/plugins/org.jboss.tools.maven.ee6.classpath_1.0.0.201104122255.jar
workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/site.xml
Log:
Added: workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/.project
===================================================================
--- workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/.project (rev 0)
+++ workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/.project 2011-04-12 20:59:49 UTC (rev 30539)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.maven.ee6.classpath.updatesite</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.UpdateSiteBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.UpdateSiteNature</nature>
+ </natures>
+</projectDescription>
Added: workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/artifacts.jar
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/artifacts.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/content.jar
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/content.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/features/org.jboss.tools.maven.ee6.classpath.feature_1.0.0.201104122255.jar
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/features/org.jboss.tools.maven.ee6.classpath.feature_1.0.0.201104122255.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/plugins/org.jboss.tools.maven.ee6.classpath_1.0.0.201104122255.jar
===================================================================
(Binary files differ)
Property changes on: workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/plugins/org.jboss.tools.maven.ee6.classpath_1.0.0.201104122255.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/site.xml
===================================================================
--- workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/site.xml (rev 0)
+++ workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/site.xml 2011-04-12 20:59:49 UTC (rev 30539)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <feature url="features/org.jboss.tools.maven.ee6.classpath.feature_1.0.0.201104122255.jar" id="org.jboss.tools.maven.ee6.classpath.feature" version="1.0.0.201104122255">
+ <category name="org.jboss.tools.maven.ee6.classpath"/>
+ </feature>
+ <category-def name="org.jboss.tools.maven.ee6.classpath" label="EE6 Classpath Patch"/>
+</site>
15 years
JBoss Tools SVN: r30538 - workspace/snjeza.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-04-12 16:58:29 -0400 (Tue, 12 Apr 2011)
New Revision: 30538
Added:
workspace/snjeza/org.jboss.tools.maven.ee6.classpath.updatesite/
Log:
Initial import.
15 years
JBoss Tools SVN: r30537 - trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-04-12 16:42:17 -0400 (Tue, 12 Apr 2011)
New Revision: 30537
Modified:
trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/ReconciliationHelper.java
Log:
https://issues.jboss.org/browse/JBIDE-8305
avoid NPE when a feature is a reference and has no name attribute
Modified: trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/ReconciliationHelper.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/ReconciliationHelper.java 2011-04-12 20:12:27 UTC (rev 30536)
+++ trunk/bpel/plugins/org.eclipse.bpel.model/src/org/eclipse/bpel/model/util/ReconciliationHelper.java 2011-04-12 20:42:17 UTC (rev 30537)
@@ -701,7 +701,7 @@
if (parent instanceof OnEvent || parent instanceof Catch) {
// ignore attempts to set attributes on the parent that aren't in the model
for ( EStructuralFeature feature : parent.eClass().getEAllStructuralFeatures()) {
- if ( feature.getName().equals(attributeName)) {
+ if ( attributeName.equals(feature.getName())) {
parseElement = ((ExtensibleElement)parent).getElement();
break;
}
15 years
JBoss Tools SVN: r30536 - workspace/adietish/org.jboss.ide.eclipse.as7.deployment.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-04-12 16:12:27 -0400 (Tue, 12 Apr 2011)
New Revision: 30536
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath
Log:
workspace stuff
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath 2011-04-12 19:56:00 UTC (rev 30535)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath 2011-04-12 20:12:27 UTC (rev 30536)
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry exported="true" kind="lib" path="jboss-threads-2.0.0.CR8.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-client-7.0.0.Beta3-SNAPSHOT.jar" sourcepath="jboss-as-controller-client-7.0.0.Beta3-SNAPSHOT-sources.jar"/>
- <classpathentry exported="true" kind="lib" path="jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar"/>
- <classpathentry exported="true" kind="lib" path="jboss-dmr-1.0.0.Beta5.jar"/>
- <classpathentry exported="true" kind="lib" path="jboss-logging-3.0.0.Beta3.jar"/>
- <classpathentry exported="true" kind="lib" path="jboss-marshalling-1.3.0.CR8.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar" sourcepath="jboss-as-protocol-7.0.0.Beta3-SNAPSHOT-sources.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-dmr-1.0.0.Beta5.jar" sourcepath="jboss-dmr-1.0.0.Beta5-sources.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-marshalling-1.3.0.CR8.jar" sourcepath="jboss-marshalling-1.3.0.CR8-sources.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-logging-3.0.0.Beta5.jar" sourcepath="jboss-logging-3.0.0.Beta5-sources.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
15 years
JBoss Tools SVN: r30535 - in workspace/adietish: org.jboss.ide.eclipse.as7.deployment/META-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-12 15:56:00 -0400 (Tue, 12 Apr 2011)
New Revision: 30535
Added:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-logging-3.0.0.Beta3.jar
Removed:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-logging-3.0.0.Beta5-sources.jar
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-logging-3.0.0.Beta5.jar
Modified:
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/.classpath
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/META-INF/MANIFEST.MF
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties
Log:
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath 2011-04-12 19:38:12 UTC (rev 30534)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath 2011-04-12 19:56:00 UTC (rev 30535)
@@ -1,19 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <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"/>
- <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-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-threads-2.0.0.CR8.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.Beta3-SNAPSHOT-sources.jar"/>
<classpathentry exported="true" kind="lib" path="jboss-as-protocol-7.0.0.Beta3-SNAPSHOT.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-dmr-1.0.0.Beta5.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-logging-3.0.0.Beta3.jar"/>
+ <classpathentry exported="true" kind="lib" path="jboss-marshalling-1.3.0.CR8.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-dmr-1.0.0.Beta5-sources.jar"/>
- <classpathentry kind="lib" path="jboss-threads-2.0.0.CR8-sources.jar"/>
- <classpathentry kind="lib" path="jboss-marshalling-1.3.0.CR8-sources.jar"/>
- <classpathentry kind="lib" path="jboss-logging-3.0.0.Beta5-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="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 19:38:12 UTC (rev 30534)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/META-INF/MANIFEST.MF 2011-04-12 19:56:00 UTC (rev 30535)
@@ -10,12 +10,10 @@
Bundle-ClassPath: .,
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-logging-3.0.0.Beta3.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
+ jboss-threads-2.0.0.CR8.jar
Export-Package: org.jboss.as.controller.client,
org.jboss.as.controller.client.helpers,
org.jboss.as.controller.client.helpers.domain,
@@ -24,12 +22,11 @@
org.jboss.as.controller.client.helpers.standalone.impl,
org.jboss.as.protocol,
org.jboss.as.protocol.mgmt,
+ org.jboss.dmr,
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.threads,
- org.jboss.threads.management
+ org.jboss.marshalling.util
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 19:38:12 UTC (rev 30534)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties 2011-04-12 19:56:00 UTC (rev 30535)
@@ -4,23 +4,18 @@
.,\
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-logging-3.0.0.Beta3.jar,\
jboss-marshalling-1.3.0.CR8.jar,\
- shrinkwrap-impl-base-1.0.0-alpha-12.jar
+ jboss-threads-2.0.0.CR8.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,\
- 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,\
REAME.txt
Added: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-logging-3.0.0.Beta3.jar
===================================================================
(Binary files differ)
Property changes on: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-logging-3.0.0.Beta3.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-logging-3.0.0.Beta5-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-logging-3.0.0.Beta5.jar
===================================================================
(Binary files differ)
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 19:38:12 UTC (rev 30534)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/META-INF/MANIFEST.MF 2011-04-12 19:56:00 UTC (rev 30535)
@@ -8,10 +8,4 @@
org.eclipse.core.runtime;bundle-version="3.7.0",
org.jboss.ide.eclipse.as7.deployment;bundle-version="0.0.1"
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
+ wars/
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 19:38:12 UTC (rev 30534)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/build.properties 2011-04-12 19:56:00 UTC (rev 30535)
@@ -2,10 +2,4 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
- 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
+ wars/
15 years
JBoss Tools SVN: r30534 - in workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests: src/org/jboss/ide/eclipse/as7/deployment/tests and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-12 15:38:12 -0400 (Tue, 12 Apr 2011)
New Revision: 30534
Removed:
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
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/.classpath
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeployerIntegrationTest.java
Log:
removed unneeded jars
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/.classpath
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/.classpath 2011-04-12 19:28:16 UTC (rev 30533)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/.classpath 2011-04-12 19:38:12 UTC (rev 30534)
@@ -1,11 +1,5 @@
<?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"/>
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-api-1.0.0-alpha-12-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-api-1.0.0-alpha-12.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-impl-base-1.0.0-alpha-12-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-impl-base-1.0.0-alpha-12.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-spi-1.0.0-alpha-12-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/shrinkwrap-spi-1.0.0-alpha-12.jar
===================================================================
(Binary files differ)
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeployerIntegrationTest.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeployerIntegrationTest.java 2011-04-12 19:28:16 UTC (rev 30533)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeployerIntegrationTest.java 2011-04-12 19:38:12 UTC (rev 30534)
@@ -55,6 +55,8 @@
private static final int MGMT_PORT = 9999;
private static final int WEB_PORT = 8080;
+
+
@Test
public void canDeploy() throws Exception {
StandaloneDeployer deployer = null;
15 years
JBoss Tools SVN: r30533 - in workspace/adietish: org.jboss.ide.eclipse.as7.deployment/META-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-12 15:28:16 -0400 (Tue, 12 Apr 2011)
New Revision: 30533
Removed:
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
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeployerIntegrationTest.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
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/StandaloneDeployer.java
Log:
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath 2011-04-12 19:13:44 UTC (rev 30532)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/.classpath 2011-04-12 19:28:16 UTC (rev 30533)
@@ -4,7 +4,6 @@
<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"/>
<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"/>
@@ -14,7 +13,6 @@
<classpathentry kind="lib" path="jboss-threads-2.0.0.CR8-sources.jar"/>
<classpathentry kind="lib" path="jboss-marshalling-1.3.0.CR8-sources.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="output" path="bin"/>
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 19:13:44 UTC (rev 30532)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/META-INF/MANIFEST.MF 2011-04-12 19:28:16 UTC (rev 30533)
@@ -8,7 +8,6 @@
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: .,
- 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,
@@ -17,23 +16,12 @@
jboss-marshalling-1.3.0.CR8.jar,
shrinkwrap-api-1.0.0-alpha-11.jar,
shrinkwrap-impl-base-1.0.0-alpha-12.jar
-Export-Package: org.jboss.as.controller,
- org.jboss.as.controller.client,
+Export-Package: 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,
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties 2011-04-12 19:13:44 UTC (rev 30532)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/build.properties 2011-04-12 19:28:16 UTC (rev 30533)
@@ -2,7 +2,6 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
- 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,\
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-7.0.0.Beta3-SNAPSHOT-sources.jar
===================================================================
(Binary files differ)
Deleted: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/jboss-as-controller-7.0.0.Beta3-SNAPSHOT.jar
===================================================================
(Binary files differ)
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/StandaloneDeployer.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/StandaloneDeployer.java 2011-04-12 19:13:44 UTC (rev 30532)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/StandaloneDeployer.java 2011-04-12 19:28:16 UTC (rev 30533)
@@ -45,113 +45,119 @@
import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager;
/**
- * Used to deploy/undeploy deployments to a running <b>standalone</b> application server
- *
+ * Used to deploy/undeploy deployments to a running <b>standalone</b>
+ * application server
+ *
* @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
* @author <a href="adietish(a)redhat.com">André Dietisheim</a>
*/
public class StandaloneDeployer {
- public static final long DEFAULT_TIMEOUT = 15000;
+ public static final long DEFAULT_TIMEOUT = 15000;
- private final List<AbstractDeployable> deployments = new ArrayList<AbstractDeployable>();
- private final ModelControllerClient client;
- private final ServerDeploymentManager manager;
- private long timeout = DEFAULT_TIMEOUT;
+ private final List<AbstractDeployable> deployments = new ArrayList<AbstractDeployable>();
+ private final ModelControllerClient client;
+ private final ServerDeploymentManager manager;
+ private long timeout = DEFAULT_TIMEOUT;
- public StandaloneDeployer(String host, int port) throws UnknownHostException {
- client = ModelControllerClient.Factory.create(host, port);
- manager = ServerDeploymentManager.Factory.create(client);
- }
+ public StandaloneDeployer(String host, int port) throws UnknownHostException {
+ client = ModelControllerClient.Factory.create(host, port);
+ manager = ServerDeploymentManager.Factory.create(client);
+ }
- public synchronized void addWar(File file) {
- deployments.add(new WarDeployable(file));
- }
+ public synchronized StandaloneDeployer addWar(File file) {
+ deployments.add(new WarDeployable(file));
+ return this;
+ }
- public synchronized void addWarDeployment(String name, File file) {
- deployments.add(new WarDeployable(name,file));
- }
+ public synchronized StandaloneDeployer addWarDeployment(String name, File file) {
+ deployments.add(new WarDeployable(name, file));
+ return this;
+ }
- public synchronized void deploy() throws DuplicateDeploymentNameException, IOException, ExecutionException, InterruptedException, TimeoutException {
- DeploymentPlanBuilder builder = manager.newDeploymentPlan();
- for (AbstractDeployable deployment : deployments) {
- builder = deployment.addDeployment(builder);
- }
+ public synchronized void deploy() throws DuplicateDeploymentNameException, IOException, ExecutionException,
+ InterruptedException, TimeoutException {
+ DeploymentPlanBuilder builder = manager.newDeploymentPlan();
+ for (AbstractDeployable deployment : deployments) {
+ builder = deployment.addDeployment(builder);
+ }
- try {
- manager.execute(builder.build()).get(timeout, TimeUnit.MILLISECONDS);
- } finally {
- markDeploymentsDeployed();
- }
- }
+ try {
+ manager.execute(builder.build()).get(timeout, TimeUnit.MILLISECONDS);
+ } finally {
+ markDeploymentsDeployed();
+ }
+ }
- private void markDeploymentsDeployed() {
- for (AbstractDeployable deployment : deployments) {
- deployment.deployed = true;
- }
- }
+ private void markDeploymentsDeployed() {
+ for (AbstractDeployable deployment : deployments) {
+ deployment.deployed = true;
+ }
+ }
- public synchronized void undeploy() throws ExecutionException, InterruptedException, TimeoutException {
- DeploymentPlanBuilder builder = manager.newDeploymentPlan();
- for (AbstractDeployable deployment : deployments) {
- builder = deployment.removeDeployment(builder);
- }
- DeploymentPlan plan = builder.build();
- if (plan.getDeploymentActions().size() > 0) {
- manager.execute(builder.build()).get(timeout, TimeUnit.MILLISECONDS);
- }
- }
+ public synchronized void undeploy() throws ExecutionException, InterruptedException, TimeoutException {
+ DeploymentPlanBuilder builder = manager.newDeploymentPlan();
+ for (AbstractDeployable 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 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 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 long getTimeout() {
+ return timeout;
+ }
- public void setTimeout(long timeout) {
- this.timeout = timeout;
- }
+ public void setTimeout(long timeout) {
+ this.timeout = timeout;
+ }
- public void dispose() {
- safeClose(client);
- }
+ public void dispose() {
+ safeClose(client);
+ }
- private abstract class AbstractDeployable{
+ private abstract class AbstractDeployable {
- private boolean deployed;
+ private boolean deployed;
- public synchronized DeploymentPlanBuilder addDeployment(DeploymentPlanBuilder builder) throws DuplicateDeploymentNameException, IOException, ExecutionException, InterruptedException {
- String name = getName();
- return builder.add(name, getFile()).deploy(name);
- }
+ public synchronized DeploymentPlanBuilder addDeployment(DeploymentPlanBuilder builder)
+ throws DuplicateDeploymentNameException, IOException, ExecutionException, InterruptedException {
+ String name = getName();
+ return builder.add(name, getFile()).deploy(name);
+ }
- public synchronized DeploymentPlanBuilder removeDeployment(DeploymentPlanBuilder builder) {
- String name = getName();
- if (deployed) {
- return builder.undeploy(name).remove(name);
- }
- else {
- return builder;
- }
- }
-
- protected abstract String getName();
-
- protected abstract File getFile();
- }
+ public synchronized DeploymentPlanBuilder removeDeployment(DeploymentPlanBuilder builder) {
+ String name = getName();
+ if (deployed) {
+ return builder.undeploy(name).remove(name);
+ }
+ else {
+ return builder;
+ }
+ }
- private class WarDeployable extends AbstractDeployable {
+ protected abstract String getName();
+ protected abstract File getFile();
+ }
+
+ private class WarDeployable extends AbstractDeployable {
+
private File file;
private String name;
-
+
public WarDeployable(String name, File file) {
this(file);
this.name = name;
@@ -162,9 +168,9 @@
}
@Override
- protected File getFile() {
- return file;
- }
+ protected File getFile() {
+ return file;
+ }
@Override
protected String getName() {
@@ -174,6 +180,6 @@
return file.getName();
}
}
-
- }
+
+ }
}
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeployerIntegrationTest.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeployerIntegrationTest.java 2011-04-12 19:13:44 UTC (rev 30532)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeployerIntegrationTest.java 2011-04-12 19:28:16 UTC (rev 30533)
@@ -54,15 +54,14 @@
private static final String HOST = "localhost";
private static final int MGMT_PORT = 9999;
private static final int WEB_PORT = 8080;
-
+
@Test
public void canDeploy() throws Exception {
StandaloneDeployer deployer = null;
try {
File warFile = getWarFile("minimalistic.war");
deployer = new StandaloneDeployer(HOST, MGMT_PORT);
- deployer.addWar(warFile);
- deployer.deploy();
+ deployer.addWar(warFile).deploy();
String response = getServerResponse(new URL(
MessageFormat.format("http://{0}:{1}/{2}",
@@ -70,11 +69,23 @@
assertTrue(response.indexOf("minimalistic") >= 0);
} finally {
- deployer.undeploy();
- deployer.dispose();
+ quietlyCleanup(deployer);
}
}
+ @Test
+ public void cannotDeployWarTwice() throws Exception {
+ StandaloneDeployer deployer = null;
+ try {
+ File warFile = getWarFile("minimalistic.war");
+ deployer = new StandaloneDeployer(HOST, MGMT_PORT);
+ deployer.addWar(warFile).deploy();
+ deployer.addWar(warFile).deploy();
+ } finally {
+ quietlyCleanup(deployer);
+ }
+ }
+
private File getWarFile(String name) throws URISyntaxException, IOException {
Bundle bundle = Platform.getBundle(BUNDLE_ID);
URL entryUrl = bundle.getEntry(WAR_FOLDER + name);
@@ -100,4 +111,16 @@
}
return writer.toString();
}
+
+ private void quietlyCleanup(StandaloneDeployer deployer) {
+ try {
+ if (deployer != null) {
+ deployer.undeploy();
+ deployer.dispose();
+ }
+ } catch (Exception e) {
+ // ignore
+ }
+
+ }
}
15 years
JBoss Tools SVN: r30532 - in workspace/adietish: org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-04-12 15:13:44 -0400 (Tue, 12 Apr 2011)
New Revision: 30532
Modified:
workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeployerIntegrationTest.java
workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/StandaloneDeployer.java
Log:
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/StandaloneDeployer.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/StandaloneDeployer.java 2011-04-12 19:05:17 UTC (rev 30531)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment/src/org/jboss/ide/eclipse/as7/deployment/StandaloneDeployer.java 2011-04-12 19:13:44 UTC (rev 30532)
@@ -23,10 +23,8 @@
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.UnknownHostException;
import java.util.ArrayList;
import java.util.HashMap;
@@ -61,8 +59,8 @@
private final ServerDeploymentManager manager;
private long timeout = DEFAULT_TIMEOUT;
- public StandaloneDeployer() throws UnknownHostException {
- client = ModelControllerClient.Factory.create(InetAddress.getByName("localhost"), 9999);
+ public StandaloneDeployer(String host, int port) throws UnknownHostException {
+ client = ModelControllerClient.Factory.create(host, port);
manager = ServerDeploymentManager.Factory.create(client);
}
Modified: workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeployerIntegrationTest.java
===================================================================
--- workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeployerIntegrationTest.java 2011-04-12 19:05:17 UTC (rev 30531)
+++ workspace/adietish/org.jboss.ide.eclipse.as7.deployment.tests/src/org/jboss/ide/eclipse/as7/deployment/tests/StandaloneDeployerIntegrationTest.java 2011-04-12 19:13:44 UTC (rev 30532)
@@ -36,7 +36,6 @@
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
import org.jboss.ide.eclipse.as7.deployment.StandaloneDeployer;
-import org.junit.Before;
import org.junit.Test;
import org.osgi.framework.Bundle;
@@ -53,20 +52,15 @@
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() {
-
- }
-
@Test
- public void canDeployUsingDeploymentUtils() throws Exception {
+ public void canDeploy() throws Exception {
StandaloneDeployer deployer = null;
try {
- deployer = new StandaloneDeployer();
File warFile = getWarFile("minimalistic.war");
+ deployer = new StandaloneDeployer(HOST, MGMT_PORT);
deployer.addWar(warFile);
deployer.deploy();
15 years