JBoss Tools SVN: r44178 - trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test.
by jbosstools-commits@lists.jboss.org
Author: sbunciak
Date: 2012-10-01 09:37:56 -0400 (Mon, 01 Oct 2012)
New Revision: 44178
Modified:
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/pom.xml
Log:
Mac OS Java fix
Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/pom.xml
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/pom.xml 2012-10-01 13:16:06 UTC (rev 44177)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/pom.xml 2012-10-01 13:37:56 UTC (rev 44178)
@@ -34,6 +34,11 @@
<artifactId>org.jboss.tools.openshift.express.feature.feature.group</artifactId>
<version>0.0.0</version>
</dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.jdt.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
</dependencies>
</configuration>
</plugin>
12 years, 2 months
JBoss Tools SVN: r44177 - in branches/jbosstools-4.0.0.Alpha2/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel: domain and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: xcoulon
Date: 2012-10-01 09:16:06 -0400 (Mon, 01 Oct 2012)
New Revision: 44177
Modified:
branches/jbosstools-4.0.0.Alpha2/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedBuildJob.java
branches/jbosstools-4.0.0.Alpha2/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedListener.java
branches/jbosstools-4.0.0.Alpha2/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementDeltaScanner.java
branches/jbosstools-4.0.0.Alpha2/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsElementFactory.java
Log:
Fixed - JBIDE-12760
JAX-RS error message "Failed to analyse compilation unit methods" when editing method body
Modified: branches/jbosstools-4.0.0.Alpha2/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedBuildJob.java
===================================================================
--- branches/jbosstools-4.0.0.Alpha2/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedBuildJob.java 2012-10-01 13:10:11 UTC (rev 44176)
+++ branches/jbosstools-4.0.0.Alpha2/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedBuildJob.java 2012-10-01 13:16:06 UTC (rev 44177)
@@ -16,6 +16,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.eclipse.core.runtime.jobs.Job;
@@ -38,6 +39,10 @@
Logger.debug("Initiating an incremental JAX-RS Metamodel build after " + event); //$NON-NLS-1$
}
+ public void execute() {
+ run(new NullProgressMonitor());
+ }
+
@Override
protected IStatus run(final IProgressMonitor progressMonitor) {
try {
Modified: branches/jbosstools-4.0.0.Alpha2/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedListener.java
===================================================================
--- branches/jbosstools-4.0.0.Alpha2/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedListener.java 2012-10-01 13:10:11 UTC (rev 44176)
+++ branches/jbosstools-4.0.0.Alpha2/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementChangedListener.java 2012-10-01 13:16:06 UTC (rev 44177)
@@ -18,7 +18,6 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jdt.core.ElementChangedEvent;
import org.eclipse.jdt.core.IElementChangedListener;
import org.eclipse.jdt.core.IJavaElement;
@@ -46,9 +45,11 @@
try {
if (isApplicable(event.getDelta())) {
logDelta(event.getDelta(), event.getType());
- Job job = new JavaElementChangedBuildJob(event);
- job.setRule(MutexJobSchedulingRule.getInstance());
- job.schedule();
+ JavaElementChangedBuildJob job = new JavaElementChangedBuildJob(event);
+ job.execute(); // not using this class as a job, just calling the execute() method for immediate execution.
+ /*job.setRule(MutexJobSchedulingRule.getInstance());
+ job.schedule();*/
+ //job.join();
}
} catch (CoreException e) {
Logger.error("Failed to process Java Element change", e);
Modified: branches/jbosstools-4.0.0.Alpha2/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementDeltaScanner.java
===================================================================
--- branches/jbosstools-4.0.0.Alpha2/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementDeltaScanner.java 2012-10-01 13:10:11 UTC (rev 44176)
+++ branches/jbosstools-4.0.0.Alpha2/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/builder/JavaElementDeltaScanner.java 2012-10-01 13:16:06 UTC (rev 44177)
@@ -106,7 +106,8 @@
// compilationUnitAST is null when the given compilation unit'w
// working copy is being commited (ie, Java Editor is being closed
// for the given compilation unit, etc.)
- if (compilationUnit.isWorkingCopy() && compilationUnitAST != null) {
+ if (compilationUnit.exists() // see https://issues.jboss.org/browse/JBIDE-12760: compilationUnit may not exist
+ && compilationUnit.isWorkingCopy() && compilationUnitAST != null) {
// Looking for changes in the method signatures (return type,
// param types and param annotations). Other changes in methods
// (renaming, adding/removing params) result in add+remove
Modified: branches/jbosstools-4.0.0.Alpha2/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsElementFactory.java
===================================================================
--- branches/jbosstools-4.0.0.Alpha2/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsElementFactory.java 2012-10-01 13:10:11 UTC (rev 44176)
+++ branches/jbosstools-4.0.0.Alpha2/ws/plugins/org.jboss.tools.ws.jaxrs.core/src/org/jboss/tools/ws/jaxrs/core/internal/metamodel/domain/JaxrsElementFactory.java 2012-10-01 13:16:06 UTC (rev 44177)
@@ -142,11 +142,14 @@
* the AST associated to the java type
* @param metamodel
* the current metamodel, in which the JAX-RS Resource should be added
- * @return the created resource
+ * @return the created resource, or null if the java type did not exist.
* @throws CoreException
*/
public JaxrsResource createResource(IType javaType, CompilationUnit ast, JaxrsMetamodel metamodel)
throws CoreException {
+ if(!javaType.exists()) {
+ return null;
+ }
// create the resource:
final JaxrsResource resource = internalCreateResource(javaType, ast, metamodel);
// find the resource methods, subresource methods and subresource
@@ -207,7 +210,9 @@
*/
public JaxrsResourceMethod createResourceMethod(IMethod method, CompilationUnit ast, JaxrsMetamodel metamodel)
throws CoreException {
-
+ if(!method.exists()) {
+ return null;
+ }
final IType parentType = (IType) method.getParent();
JaxrsResource parentResource = (JaxrsResource) metamodel.getElement(parentType);
if (parentResource == null) {
@@ -272,6 +277,9 @@
*/
public JaxrsHttpMethod createHttpMethod(final IType javaType, final CompilationUnit ast,
final JaxrsMetamodel metamodel) throws CoreException {
+ if(!javaType.exists()) {
+ return null;
+ }
Map<String, Annotation> annotations = JdtUtils.resolveAnnotations(javaType, ast, HTTP_METHOD.qualifiedName, TARGET.qualifiedName, RETENTION.qualifiedName);
if (annotations == null || annotations.isEmpty()) {
return null;
@@ -312,6 +320,9 @@
*/
public JaxrsJavaApplication createApplication(final IType javaType, final CompilationUnit ast,
final JaxrsMetamodel metamodel) throws CoreException {
+ if(!javaType.exists()) {
+ return null;
+ }
Annotation applicationPathAnnotation = JdtUtils.resolveAnnotation(javaType, ast, APPLICATION_PATH.qualifiedName);
return createApplication(javaType, applicationPathAnnotation, metamodel);
}
@@ -349,6 +360,9 @@
*/
private JaxrsJavaApplication createApplication(final IType applicationType, final Annotation appPathAnnotation,
final JaxrsMetamodel metamodel) throws CoreException {
+ if(!applicationType.exists()) {
+ return null;
+ }
final IType applicationSupertype = JdtUtils.resolveType(EnumJaxrsClassname.APPLICATION.qualifiedName, applicationType.getJavaProject(), new NullProgressMonitor());
final boolean isApplicationSubclass = JdtUtils.isTypeOrSuperType(applicationSupertype, applicationType);
if(isApplicationSubclass || appPathAnnotation != null) {
@@ -376,6 +390,9 @@
public JaxrsResourceField createField(IField javaField, CompilationUnit ast, JaxrsMetamodel metamodel)
throws JavaModelException {
+ if(!javaField.exists()) {
+ return null;
+ }
final IType parentType = (IType) javaField.getParent();
IJaxrsElement parentResource = metamodel.getElement(parentType);
if (parentResource == null) {
@@ -423,7 +440,9 @@
* @return a representation of the given provider or null in case of invalid type (ie, not a valid JAX-RS Provider)
*/
public JaxrsProvider createProvider(final IType javaType, final CompilationUnit ast, final JaxrsMetamodel metamodel, final IProgressMonitor progressMonitor ) throws CoreException {
-
+ if(!javaType.exists()) {
+ return null;
+ }
final Map<String, Annotation> annotations = JdtUtils.resolveAnnotations(javaType, ast, PROVIDER.qualifiedName,
CONSUMES.qualifiedName, PRODUCES.qualifiedName);
// assert that given java type is not abstract
12 years, 2 months
JBoss Tools SVN: r44176 - in trunk/maven: plugins/org.jboss.tools.maven.jbosspackaging/src/org/jboss/tools/maven/jbosspackaging/configurators and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-10-01 09:10:11 -0400 (Mon, 01 Oct 2012)
New Revision: 44176
Added:
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-4/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-4/pom.xml
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/util/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/util/pom.xml
Modified:
trunk/maven/plugins/org.jboss.tools.maven.jbosspackaging/META-INF/MANIFEST.MF
trunk/maven/plugins/org.jboss.tools.maven.jbosspackaging/src/org/jboss/tools/maven/jbosspackaging/configurators/SarProjectConfigurator.java
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/JBossSarConfiguratorTest.java
Log:
JBIDE-12732 : properly configure workspace dependencies of SAR projects
Modified: trunk/maven/plugins/org.jboss.tools.maven.jbosspackaging/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jbosspackaging/META-INF/MANIFEST.MF 2012-10-01 12:53:37 UTC (rev 44175)
+++ trunk/maven/plugins/org.jboss.tools.maven.jbosspackaging/META-INF/MANIFEST.MF 2012-10-01 13:10:11 UTC (rev 44176)
@@ -13,7 +13,8 @@
org.eclipse.jst.j2ee,
org.eclipse.wst.common.emfworkbench.integration;bundle-version="1.2.100",
org.sonatype.m2e.mavenarchiver;bundle-version="0.14.0",
- org.jboss.ide.eclipse.as.ui.mbeans;bundle-version="2.3.0"
+ org.jboss.ide.eclipse.as.ui.mbeans;bundle-version="2.3.0",
+ org.eclipse.m2e.wtp;bundle-version="0.16.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %Bundle-Vendor
Modified: trunk/maven/plugins/org.jboss.tools.maven.jbosspackaging/src/org/jboss/tools/maven/jbosspackaging/configurators/SarProjectConfigurator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jbosspackaging/src/org/jboss/tools/maven/jbosspackaging/configurators/SarProjectConfigurator.java 2012-10-01 12:53:37 UTC (rev 44175)
+++ trunk/maven/plugins/org.jboss.tools.maven.jbosspackaging/src/org/jboss/tools/maven/jbosspackaging/configurators/SarProjectConfigurator.java 2012-10-01 13:10:11 UTC (rev 44176)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.maven.jbosspackaging.configurators;
+import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.Set;
@@ -18,6 +19,7 @@
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
import org.apache.maven.project.MavenProject;
+import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
@@ -30,8 +32,6 @@
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
-import org.eclipse.jst.common.project.facet.core.JavaFacet;
-import org.eclipse.jst.common.project.facet.core.internal.JavaFacetUtil;
import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.MavenProjectChangedEvent;
@@ -39,6 +39,9 @@
import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
import org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest;
import org.eclipse.m2e.jdt.internal.MavenClasspathHelpers;
+import org.eclipse.m2e.wtp.ArtifactHelper;
+import org.eclipse.m2e.wtp.ResourceCleaner;
+import org.eclipse.m2e.wtp.WTPProjectsUtil;
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
@@ -54,8 +57,6 @@
import org.jboss.ide.eclipse.as.ui.mbeans.project.JBossSARFacetDataModelProvider;
import org.jboss.tools.maven.core.IJBossMavenConstants;
import org.jboss.tools.maven.core.internal.project.facet.MavenFacetInstallDataModelProvider;
-import org.jboss.tools.maven.core.xpl.ArtifactHelper;
-import org.jboss.tools.maven.core.xpl.WTPProjectsUtil;
/**
*
@@ -97,14 +98,11 @@
IMavenProjectFacade facade = request.getMavenProjectFacade();
ResourceCleaner fileCleaner = new ResourceCleaner(project);
- addFilesToClean(fileCleaner, facade.getResourceLocations());
- addFilesToClean(fileCleaner, facade.getTestResourceLocations());
- addFilesToClean(fileCleaner, facade.getCompileSourceLocations());
- addFilesToClean(fileCleaner, facade.getTestCompileSourceLocations());
+ addFoldersToClean(fileCleaner, facade);
IPath source = facade.getResourceLocations()[0];
- installJavaFacet(actions, project, facetedProject);
+ WTPProjectsUtil.installJavaFacet(actions, project, facetedProject);
if (!actions.isEmpty()) {
facetedProject.modify(actions, monitor);
}
@@ -116,7 +114,7 @@
removeTestFolderLinks(project, mavenProject, monitor, "/");
- setNonDependencyAttributeToContainer(project, monitor);
+ WTPProjectsUtil.setNonDependencyAttributeToContainer(project, monitor);
WTPProjectsUtil.removeWTPClasspathContainer(project);
@@ -140,21 +138,6 @@
}
}
- /**
- * @param actions
- * @param project
- * @param facetedProject
- */
- //TODO Fix/refactor that method from WTPProjectUtils in m2e-wtp 0.14.x
- public static void installJavaFacet(Set<Action> actions, IProject project, IFacetedProject facetedProject) {
- IProjectFacetVersion javaFv = JavaFacet.FACET.getVersion(JavaFacetUtil.getCompilerLevel(project));
- if(!facetedProject.hasProjectFacet(JavaFacet.FACET)) {
- actions.add(new IFacetedProject.Action(IFacetedProject.Action.Type.INSTALL, javaFv, null));
- } else if(!facetedProject.hasProjectFacet(javaFv)) {
- actions.add(new IFacetedProject.Action(IFacetedProject.Action.Type.VERSION_CHANGE, javaFv, null));
- }
- }
-
private void installM2Facet(IFacetedProject fproj, IProgressMonitor monitor) throws CoreException {
if (!fproj.hasProjectFacet(m2Facet)) {
IDataModel config = (IDataModel) new MavenFacetInstallDataModelProvider().create();
@@ -221,7 +204,9 @@
if (workspaceDependency != null && !workspaceDependency.getProject().equals(project)
&& workspaceDependency.getFullPath(artifact.getFile()) != null) {
// artifact dependency is a workspace project
- depComponent = ComponentCore.createComponent(workspaceDependency.getProject());
+ IProject depProject = workspaceDependency.getProject();
+ configureWtpUtil(workspaceDependency, monitor);
+ depComponent = ComponentCore.createComponent(depProject);
} else {
// artifact dependency should be added as a JEE module,
// referenced with M2_REPO variable
@@ -243,12 +228,6 @@
}
}
- protected void setNonDependencyAttributeToContainer(IProject project, IProgressMonitor monitor)
- throws JavaModelException {
- updateContainerAttributes(project, NONDEPENDENCY_ATTRIBUTE,
- IClasspathDependencyConstants.CLASSPATH_COMPONENT_DEPENDENCY, monitor);
- }
-
protected void updateContainerAttributes(IProject project, IClasspathAttribute attributeToAdd,
String attributeToDelete, IProgressMonitor monitor) throws JavaModelException {
IJavaProject javaProject = JavaCore.create(project);
@@ -279,10 +258,115 @@
setModuleDependencies(event.getMavenProject().getProject(), event.getMavenProject().getMavenProject(), monitor);
}
- private void addFilesToClean(ResourceCleaner cleaner, IPath[] paths) {
- for (IPath resourceFolderPath : paths) {
- cleaner.addFiles(resourceFolderPath.append("META-INF/MANIFEST.MF"));
- }
- }
+ protected void configureWtpUtil(IMavenProjectFacade facade, IProgressMonitor monitor) throws CoreException {
+ // Adding utility facet on JEE projects is not allowed
+ IProject project = facade.getProject();
+ MavenProject mavenProject = facade.getMavenProject();
+ if( !WTPProjectsUtil.isJavaProject(facade)
+ || WTPProjectsUtil.isJavaEEProject(project)
+ || WTPProjectsUtil.isQualifiedAsWebFragment(facade)) {
+ return;
+ }
+
+ IPath[] sourceRoots = MavenProjectUtils.getSourceLocations(project, mavenProject.getCompileSourceRoots());
+ IPath[] resourceRoots = MavenProjectUtils.getResourceLocations(project, mavenProject.getResources());
+
+ if (!checkJavaConfiguration(project, sourceRoots, resourceRoots)) {
+ return;
+ }
+ IFacetedProject facetedProject = ProjectFacetsManager.create(project, true, monitor);
+ Set<Action> actions = new LinkedHashSet<Action>();
+
+ WTPProjectsUtil.installJavaFacet(actions, project, facetedProject);
+
+ if(!facetedProject.hasProjectFacet(WTPProjectsUtil.UTILITY_FACET)) {
+ actions.add(new IFacetedProject.Action(IFacetedProject.Action.Type.INSTALL, WTPProjectsUtil.UTILITY_10, null));
+ } else if(!facetedProject.hasProjectFacet(WTPProjectsUtil.UTILITY_10)) {
+ actions.add(new IFacetedProject.Action(IFacetedProject.Action.Type.VERSION_CHANGE, WTPProjectsUtil.UTILITY_10,
+ null));
+ }
+
+ if (!actions.isEmpty()) {
+ ResourceCleaner fileCleaner = new ResourceCleaner(project);
+ try {
+ addFoldersToClean(fileCleaner, facade);
+ facetedProject.modify(actions, monitor);
+ } finally {
+ //Remove any unwanted MANIFEST.MF the Facet installation has created
+ fileCleaner.cleanUp();
+ }
+ }
+
+ WTPProjectsUtil.fixMissingModuleCoreNature(project, monitor);
+
+ //MNGECLIPSE-904 remove tests folder links for utility jars
+ removeTestFolderLinks(project, mavenProject, monitor, "/");
+
+ //Remove "library unavailable at runtime" warning.
+ WTPProjectsUtil.setNonDependencyAttributeToContainer(project, monitor);
+
+ WTPProjectsUtil.removeWTPClasspathContainer(project);
+ }
+
+ /**
+ * Checks the maven source folders are correctly added to the project classpath
+ */
+ private boolean checkJavaConfiguration(IProject project, IPath[] sourceRoots, IPath[] resourceRoots) throws JavaModelException {
+ IJavaProject javaProject = JavaCore.create(project);
+ if (javaProject == null) {
+ return false;
+ }
+ IClasspathEntry[] cpEntries = javaProject.getRawClasspath();
+ if (cpEntries == null) {
+ return false;
+ }
+ Set<IPath> currentPaths = new HashSet<IPath>();
+ for (IClasspathEntry entry : cpEntries) {
+ if (IClasspathEntry.CPE_SOURCE == entry.getEntryKind()){
+ currentPaths.add(entry.getPath().makeRelativeTo(project.getFullPath()));
+ }
+ }
+ for(IPath mavenSource : sourceRoots) {
+ if (mavenSource != null && !mavenSource.isEmpty()) {
+ IFolder sourceFolder = project.getFolder(mavenSource);
+ if (sourceFolder.exists() && !currentPaths.contains(mavenSource)) {
+ return false;
+ }
+ }
+ }
+ for(IPath mavenSource : resourceRoots) {
+ if (mavenSource != null && !mavenSource.isEmpty()) {
+ IFolder resourceFolder = project.getFolder(mavenSource);
+ if (resourceFolder.exists() && !currentPaths.contains(mavenSource)) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
+
+
+ protected void addFoldersToClean(ResourceCleaner fileCleaner, IMavenProjectFacade facade) {
+ for (IPath p : facade.getCompileSourceLocations()) {
+ if (p != null) {
+ fileCleaner.addFiles(p.append("META-INF/MANIFEST.MF"));
+ fileCleaner.addFolder(p);
+ }
+ }
+ for (IPath p : facade.getResourceLocations()) {
+ if (p != null) {
+ fileCleaner.addFiles(p.append("META-INF/MANIFEST.MF"));
+ fileCleaner.addFolder(p);
+ }
+ }
+ for (IPath p : facade.getTestCompileSourceLocations()) {
+ if (p != null) fileCleaner.addFolder(p);
+ }
+ for (IPath p : facade.getTestResourceLocations()) {
+ if (p != null) fileCleaner.addFolder(p);
+ }
+ }
+
}
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-4/pom.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-4/pom.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-4/pom.xml 2012-10-01 13:10:11 UTC (rev 44176)
@@ -0,0 +1,38 @@
+<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>
+ <groupId>org.jboss.tools.maven.tests</groupId>
+ <artifactId>jboss-sar-4</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>jboss-sar</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jboss-packaging-maven-plugin</artifactId>
+ <version>2.2</version>
+ <!-- Enable packaging types and lifecycle bindings. -->
+ <extensions>true</extensions>
+ <configuration>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.5.1</version>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.tools.maven.tests</groupId>
+ <artifactId>util</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/util/pom.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/util/pom.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/util/pom.xml 2012-10-01 13:10:11 UTC (rev 44176)
@@ -0,0 +1,23 @@
+<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>
+ <groupId>org.jboss.tools.maven.tests</groupId>
+ <artifactId>util</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.5.1</version>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.5</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Modified: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/JBossSarConfiguratorTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/JBossSarConfiguratorTest.java 2012-10-01 12:53:37 UTC (rev 44175)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/JBossSarConfiguratorTest.java 2012-10-01 13:10:11 UTC (rev 44176)
@@ -116,6 +116,29 @@
// message, 1, "", project);
// }
+ @Test
+ public void testWorkspaceDependency() throws Exception {
+ IProject[] projects = importProjects("projects/jboss-sar/",
+ new String[] {"jboss-sar-4/pom.xml", "util/pom.xml"},
+ new ResolverConfiguration());
+ waitForJobsToComplete();
+ IProject project = projects[0];
+ IProject util = projects[1];
+
+ assertIsSarProject(project);
+
+ IVirtualComponent sarComponent = ComponentCore.createComponent(project);
+ assertNotNull(sarComponent);
+ IVirtualReference[] references = sarComponent.getReferences();
+ assertEquals(2, references.length);
+ assertEquals(util, references[0].getReferencedComponent().getProject());
+ assertEquals("util-0.0.1-SNAPSHOT.jar", references[0].getArchiveName());
+ assertEquals("/lib", references[0].getRuntimePath().toPortableString());
+ assertEquals("commons-lang-2.5.jar", references[1].getArchiveName());
+ assertEquals("/lib", references[1].getRuntimePath().toPortableString());
+ }
+
+
private void assertIsSarProject(IProject project) throws Exception {
IProjectFacetVersion expectedJaxRsVersion = SarProjectConfigurator.JBOSS_SAR_FACET_VERSION_1_0;
assertNoErrors(project);
12 years, 2 months
JBoss Tools SVN: r44175 - trunk/vpe.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2012-10-01 08:53:37 -0400 (Mon, 01 Oct 2012)
New Revision: 44175
Removed:
trunk/vpe/contrib/
Log:
Removed outdated xulrunner plugin
12 years, 2 months
JBoss Tools SVN: r44174 - in trunk/maven/tests/org.jboss.tools.maven.configurators.tests: projects/jboss-sar/jboss-sar-1/src and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-10-01 08:37:48 -0400 (Mon, 01 Oct 2012)
New Revision: 44174
Added:
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-1/src/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-1/src/main/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-1/src/main/java/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-1/src/main/java/com/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-1/src/main/java/com/acme/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-1/src/main/java/com/acme/HelloWorldService.java
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-1/src/main/java/com/acme/HelloWorldServiceMBean.java
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-1/src/main/resources/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-1/src/main/resources/META-INF/
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-1/src/main/resources/META-INF/jboss-service.xml
Modified:
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/AbstractMavenConfiguratorTest.java
Log:
Fix some annoying test failures
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-1/src/main/java/com/acme/HelloWorldService.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-1/src/main/java/com/acme/HelloWorldService.java (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-1/src/main/java/com/acme/HelloWorldService.java 2012-10-01 12:37:48 UTC (rev 44174)
@@ -0,0 +1,39 @@
+package com.acme;
+
+import org.apache.commons.lang.StringUtils;
+
+
+
+public class HelloWorldService implements HelloWorldServiceMBean
+{
+ // Our message attribute
+ private String message = "Sorry no message today";
+
+ // Getters and Setters
+ public String getMessage()
+ {
+ return message;
+ }
+
+ public void setMessage(String message)
+ {
+ this.message = message;
+ }
+
+ // The printMessage operation
+ public void printMessage()
+ {
+ System.out.println(message);
+ }
+
+ // The lifecycle
+ public void start() throws Exception
+ {
+ System.out.println("Démarrage avec le message=" + StringUtils.reverse(message));
+ }
+
+ public void stop()
+ {
+ System.out.println("Stopping with message=" + StringUtils.reverse(message));
+ }
+}
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-1/src/main/java/com/acme/HelloWorldServiceMBean.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-1/src/main/java/com/acme/HelloWorldServiceMBean.java (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-1/src/main/java/com/acme/HelloWorldServiceMBean.java 2012-10-01 12:37:48 UTC (rev 44174)
@@ -0,0 +1,16 @@
+package com.acme;
+
+
+public interface HelloWorldServiceMBean
+{
+ // Configure getters and setters for the message attribute
+ String getMessage();
+ void setMessage(String message);
+
+ // The print message operation
+ void printMessage();
+
+ // Lifecycle callbacks
+ void start() throws Exception;
+ void stop();
+}
Added: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-1/src/main/resources/META-INF/jboss-service.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-1/src/main/resources/META-INF/jboss-service.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/projects/jboss-sar/jboss-sar-1/src/main/resources/META-INF/jboss-service.xml 2012-10-01 12:37:48 UTC (rev 44174)
@@ -0,0 +1,20 @@
+<!-- ~ 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. -->
+<server xmlns="urn:jboss:service:7.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jboss:service:7.0 jboss-service_7_0.xsd">
+ <mbean code="com.acme.HelloWorldService" name="acme.com:service=HelloWorld">
+ <attribute name="Message">Hello World</attribute>
+ </mbean>
+</server>
\ No newline at end of file
Modified: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/AbstractMavenConfiguratorTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/AbstractMavenConfiguratorTest.java 2012-10-01 12:25:42 UTC (rev 44173)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/src/org/jboss/tools/maven/configurators/tests/AbstractMavenConfiguratorTest.java 2012-10-01 12:37:48 UTC (rev 44174)
@@ -11,7 +11,11 @@
package org.jboss.tools.maven.configurators.tests;
import java.io.File;
+import java.util.Iterator;
+import java.util.List;
+import junit.framework.Assert;
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
@@ -22,6 +26,7 @@
import org.eclipse.m2e.core.project.IProjectConfigurationManager;
import org.eclipse.m2e.core.project.ResolverConfiguration;
import org.eclipse.m2e.tests.common.AbstractMavenProjectTestCase;
+import org.eclipse.m2e.tests.common.WorkspaceHelpers;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
@@ -105,7 +110,19 @@
fail("Error Message '"+ errorMessage +"' was not found on "+project.getName());
}
- protected String getMessage(IMarker marker) throws CoreException {
+ protected static String getMessage(IMarker marker) throws CoreException {
return (String)marker.getAttribute(IMarker.MESSAGE);
}
+
+ protected static void assertNoErrors(IProject project) throws CoreException {
+ List<IMarker> markers = WorkspaceHelpers.findErrorMarkers(project);
+ Iterator<IMarker> ite = markers.iterator();
+ while (ite.hasNext()) {
+ IMarker m =ite.next();
+ if (getMessage(m).contains("Referenced file contains errors (http://java.sun.com/xml/ns/javaee/web-facesconfig_2_1.xsd)")) {
+ ite.remove();
+ }
+ }
+ Assert.assertEquals("Unexpected error markers " + toString(markers), 0, markers.size());
+ }
}
12 years, 2 months
JBoss Tools SVN: r44173 - trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/META-INF.
by jbosstools-commits@lists.jboss.org
Author: sbunciak
Date: 2012-10-01 08:25:42 -0400 (Mon, 01 Oct 2012)
New Revision: 44173
Modified:
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/META-INF/MANIFEST.MF
Log:
Version fix
Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/META-INF/MANIFEST.MF 2012-10-01 12:21:04 UTC (rev 44172)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/META-INF/MANIFEST.MF 2012-10-01 12:25:42 UTC (rev 44173)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: OpenShift SWTBot Tests
Bundle-SymbolicName: org.jboss.tools.openshift.ui.bot.test
-Bundle-Version: 2.3.0.qualifier
+Bundle-Version: 2.4.0.qualifier
Bundle-Activator: org.jboss.tools.openshift.ui.bot.test.Activator
Bundle-Vendor: Red Hat
Require-Bundle: org.eclipse.ui,
12 years, 2 months
JBoss Tools SVN: r44172 - trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot.
by jbosstools-commits@lists.jboss.org
Author: rhopp
Date: 2012-10-01 08:21:04 -0400 (Mon, 01 Oct 2012)
New Revision: 44172
Modified:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java
Log:
tests maintenance
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java 2012-10-01 11:47:47 UTC (rev 44171)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/src/org/jboss/tools/central/test/ui/bot/CreateProjectsWithServerTest.java 2012-10-01 12:21:04 UTC (rev 44172)
@@ -27,7 +27,7 @@
//TODO When testing new build try it with type=ServerType.EAP !!!!
-@Require(clearProjects=false,server=(a)org.jboss.tools.ui.bot.ext.config.Annotations.Server(type=ServerType.EAP))
+@Require(clearProjects=false,server=(a)org.jboss.tools.ui.bot.ext.config.Annotations.Server(type=ServerType.ALL))
public class CreateProjectsWithServerTest extends SWTTestExt{
@BeforeClass
12 years, 2 months
JBoss Tools SVN: r44171 - in trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test: src/org/jboss/tools/openshift/ui/bot/test and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: sbunciak
Date: 2012-10-01 07:47:47 -0400 (Mon, 01 Oct 2012)
New Revision: 44171
Added:
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/OpenShiftAllBotTests.launch
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/OpenShiftAllBotTestsMaven.launch
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/OpenShiftJenkinsBotTests.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftExplorerView.java
Modified:
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/OpenShiftBotTestsMaven.launch
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/pom.xml
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/explorer/Connection.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/explorer/CreateApp.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/explorer/CreateDomain.java
trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftUI.java
Log:
Created minimal Jenkins test suite
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/OpenShiftAllBotTests.launch
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/OpenShiftAllBotTests.launch (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/OpenShiftAllBotTests.launch 2012-10-01 11:47:47 UTC (rev 44171)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.swtbot.eclipse.ui.launcher.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/OpenShiftAllBotTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="DISPLAY" value=":1"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.jboss.tools.openshift.ui.bot.test.OpenShiftAllBotTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.jboss.tools.openshift.ui.bot.test"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m -Dswtbot.test.properties.file=${project_loc}/resources/swtbot.properties -Dusage_reporting_enabled=false"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/OpenShiftAllBotTestsMaven.launch
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/OpenShiftAllBotTestsMaven.launch (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/OpenShiftAllBotTestsMaven.launch 2012-10-01 11:47:47 UTC (rev 44171)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType">
+<booleanAttribute key="M2_DEBUG_OUTPUT" value="false"/>
+<stringAttribute key="M2_GOALS" value="clean install"/>
+<booleanAttribute key="M2_NON_RECURSIVE" value="false"/>
+<booleanAttribute key="M2_OFFLINE" value="false"/>
+<stringAttribute key="M2_PROFILES" value="default"/>
+<listAttribute key="M2_PROPERTIES">
+<listEntry value="swtbot.test.skip=false"/>
+<listEntry value="configurations.dir=${project_loc}/resources"/>
+<listEntry value="scope=All"/>
+</listAttribute>
+<stringAttribute key="M2_RUNTIME" value="EMBEDDED"/>
+<booleanAttribute key="M2_SKIP_TESTS" value="false"/>
+<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="true"/>
+<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="true"/>
+<mapAttribute key="org.eclipse.debug.core.environmentVariables">
+<mapEntry key="DISPLAY" value=":${string_prompt}"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:/openshift/tests/org.jboss.tools.openshift.ui.bot.test}"/>
+</launchConfiguration>
Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/OpenShiftBotTestsMaven.launch
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/OpenShiftBotTestsMaven.launch 2012-10-01 11:04:01 UTC (rev 44170)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/OpenShiftBotTestsMaven.launch 2012-10-01 11:47:47 UTC (rev 44171)
@@ -8,6 +8,7 @@
<listAttribute key="M2_PROPERTIES">
<listEntry value="swtbot.test.skip=false"/>
<listEntry value="configurations.dir=${project_loc}/resources"/>
+<listEntry value="scope=Jenkins"/>
</listAttribute>
<stringAttribute key="M2_RUNTIME" value="EMBEDDED"/>
<booleanAttribute key="M2_SKIP_TESTS" value="false"/>
@@ -16,5 +17,5 @@
<mapAttribute key="org.eclipse.debug.core.environmentVariables">
<mapEntry key="DISPLAY" value=":${string_prompt}"/>
</mapAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:/openshift/tests/org.jboss.tools.openshift.ui.bot.test}"/>
+<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc:/org.jboss.tools.openshift.ui.bot.test}"/>
</launchConfiguration>
Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/pom.xml
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/pom.xml 2012-10-01 11:04:01 UTC (rev 44170)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/pom.xml 2012-10-01 11:47:47 UTC (rev 44171)
@@ -6,12 +6,11 @@
<parent>
<groupId>org.jboss.tools.openshift</groupId>
<artifactId>tests</artifactId>
- <version>2.3.0-SNAPSHOT</version>
+ <version>2.4.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.openshift.tests</groupId>
<artifactId>org.jboss.tools.openshift.ui.bot.test</artifactId>
- <version>2.3.0-SNAPSHOT</version>
-
+
<packaging>eclipse-test-plugin</packaging>
<properties>
@@ -28,12 +27,12 @@
<skip>${swtbot.test.skip}</skip>
<useUIThread>false</useUIThread>
<testSuite>org.jboss.tools.openshift.ui.bot.test</testSuite>
- <testClass>org.jboss.tools.openshift.ui.bot.test.OpenShiftAllBotTests</testClass>
+ <testClass>org.jboss.tools.openshift.ui.bot.test.OpenShift${scope}BotTests</testClass>
<dependencies combine.children="append">
<dependency>
<type>p2-installable-unit</type>
<artifactId>org.jboss.tools.openshift.express.feature.feature.group</artifactId>
- <version>2.3.0</version>
+ <version>0.0.0</version>
</dependency>
</dependencies>
</configuration>
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/OpenShiftJenkinsBotTests.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/OpenShiftJenkinsBotTests.java (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/OpenShiftJenkinsBotTests.java 2012-10-01 11:47:47 UTC (rev 44171)
@@ -0,0 +1,14 @@
+package org.jboss.tools.openshift.ui.bot.test;
+
+import org.jboss.tools.openshift.ui.bot.test.explorer.Connection;
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+@SuiteClasses({
+Connection.class
+})
+(a)RunWith(RequirementAwareSuite.class)
+public class OpenShiftJenkinsBotTests {
+
+}
Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/explorer/Connection.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/explorer/Connection.java 2012-10-01 11:04:01 UTC (rev 44170)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/explorer/Connection.java 2012-10-01 11:47:47 UTC (rev 44171)
@@ -3,6 +3,7 @@
import org.eclipse.swtbot.swt.finder.waits.Conditions;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotButton;
import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.jboss.tools.openshift.ui.bot.util.OpenShiftExplorerView;
import org.jboss.tools.openshift.ui.bot.util.OpenShiftUI;
import org.jboss.tools.openshift.ui.bot.util.TestProperties;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
@@ -16,12 +17,11 @@
@Test
public void canCreateConnectionToOpenShiftAccount() {
- // open OpenShift Explorer
- open.viewOpen(OpenShiftUI.Explorer.iView);
-
- bot.toolbarButtonWithTooltip(OpenShiftUI.Labels.CONNECT_TO_OPENSHIFT)
- .click();
-
+ bot.waitWhile(new NonSystemJobRunsCondition(), TIME_60S, TIME_1S);
+
+ OpenShiftExplorerView explorer = new OpenShiftExplorerView();
+ explorer.getConnectionToolButton().click();
+
// open credentials dialog
SWTBotShell shell = bot.waitForShell(OpenShiftUI.Shell.CREDENTIALS);
Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/explorer/CreateApp.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/explorer/CreateApp.java 2012-10-01 11:04:01 UTC (rev 44170)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/explorer/CreateApp.java 2012-10-01 11:47:47 UTC (rev 44171)
@@ -82,11 +82,11 @@
bot.waitForShell("Question", TIME_60S * 3);
bot.button(IDELabel.Button.YES).click();
-
+/*
bot.waitForShell("Information", TIME_60S * 3);
bot.text(0).setText(TestProperties.get("openshift.user.pwd"));
bot.button(IDELabel.Button.OK).click();
-
+*/
log.info("*** OpenShift SWTBot Tests: SSH passphrase given. ***");
bot.waitUntil(Conditions.shellCloses(bot.activeShell()), TIME_60S, TIME_1S);
Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/explorer/CreateDomain.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/explorer/CreateDomain.java 2012-10-01 11:04:01 UTC (rev 44170)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/test/explorer/CreateDomain.java 2012-10-01 11:47:47 UTC (rev 44171)
@@ -1,6 +1,7 @@
package org.jboss.tools.openshift.ui.bot.test.explorer;
import java.io.File;
+import java.util.Date;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
import org.eclipse.swtbot.swt.finder.waits.Conditions;
@@ -9,6 +10,7 @@
import org.jboss.tools.openshift.ui.bot.util.OpenShiftUI;
import org.jboss.tools.openshift.ui.bot.util.TestProperties;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.condition.NonSystemJobRunsCondition;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.junit.Before;
import org.junit.Test;
@@ -33,6 +35,7 @@
&& sshDir.listFiles().length > 0) {
for (File file : sshDir.listFiles()) {
if (file.getName().contains("id_rsa"))
+ //keyAvailable = true;
file.delete();
if (file.getName().contains("known_hosts"))
file.delete();
@@ -52,7 +55,7 @@
.contextMenu(OpenShiftUI.Labels.EXPLORER_CREATE_EDIT_DOMAIN)
.click();
- bot.waitForShell(OpenShiftUI.Shell.DOMAIN);
+ bot.waitForShell(OpenShiftUI.Shell.CREATE_DOMAIN);
SWTBotText domainText = bot.text(0);
@@ -64,18 +67,29 @@
SWTBotButton finishBtn = bot.button(IDELabel.Button.FINISH);
+
+ bot.link(0).click();
+
if (keyAvailable) {
+// TODO: add them to the list
+ bot.waitForShell(OpenShiftUI.Shell.SSH_WIZARD);
+ assertTrue("SSH key should be set!", bot.table().columnCount() > 0);
- assertTrue("SSH key should be set!", bot.text(1).getText()
- .contains("id_rsa"));
-
} else {
-
- bot.button(IDELabel.Shell.NEW).click();
+
+ bot.waitForShell(OpenShiftUI.Shell.SSH_WIZARD);
+ bot.buttonInGroup("New...", "SSH Public Keys").click();
bot.waitForShell(OpenShiftUI.Shell.NEW_SSH);
- bot.text(0).setText(TestProperties.get("openshift.user.pwd"));
+
+ bot.textInGroup("New SSH Key", 0).setText("jbtkey" + new Date());
+ bot.textInGroup("New SSH Key", 2).setText("id_rsa");
+ bot.button(IDELabel.Button.FINISH).click();
+
+ bot.waitWhile(new NonSystemJobRunsCondition(), TIME_20S, TIME_1S);
+ bot.waitForShell(OpenShiftUI.Shell.SSH_WIZARD);
+
bot.button(IDELabel.Button.OK).click();
- bot.waitForShell(OpenShiftUI.Shell.DOMAIN);
+ bot.waitForShell(OpenShiftUI.Shell.CREATE_DOMAIN);
log.info("*** OpenShift SWTBot Tests: SSH Keys created. ***");
}
Added: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftExplorerView.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftExplorerView.java (rev 0)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftExplorerView.java 2012-10-01 11:47:47 UTC (rev 44171)
@@ -0,0 +1,24 @@
+package org.jboss.tools.openshift.ui.bot.util;
+
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton;
+import org.jboss.tools.ui.bot.ext.view.ViewBase;
+
+/**
+ *
+ * @author sbunciak
+ *
+ */
+public class OpenShiftExplorerView extends ViewBase {
+
+ public OpenShiftExplorerView() {
+ super();
+ this.viewObject = OpenShiftUI.Explorer.iView;
+ show();
+
+ }
+
+ public SWTBotToolbarButton getConnectionToolButton() {
+ return this.getToolbarButtonWitTooltip(OpenShiftUI.Labels.CONNECT_TO_OPENSHIFT);
+ }
+
+}
Modified: trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftUI.java
===================================================================
--- trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftUI.java 2012-10-01 11:04:01 UTC (rev 44170)
+++ trunk/openshift/tests/org.jboss.tools.openshift.ui.bot.test/src/org/jboss/tools/openshift/ui/bot/util/OpenShiftUI.java 2012-10-01 11:47:47 UTC (rev 44171)
@@ -110,9 +110,11 @@
public static final String NO_TITLE = "";
public static final String NEW_APP = "New OpenShift Application";
- public static final String DOMAIN = "";
+ public static final String CREATE_DOMAIN = "Create Domain";
+ public static final String EDIT_DOMAIN = "Edit Domain";
public static final String CREDENTIALS = "";
- public static final String NEW_SSH = "New ssh key";
+ public static final String SSH_WIZARD = "";
+ public static final String NEW_SSH = "";
public static final String DELETE_APP = "Application deletion";
}
12 years, 2 months
JBoss Tools SVN: r44170 - trunk/central/tests/org.jboss.tools.central.test.ui.bot/META-INF.
by jbosstools-commits@lists.jboss.org
Author: rhopp
Date: 2012-10-01 07:04:01 -0400 (Mon, 01 Oct 2012)
New Revision: 44170
Modified:
trunk/central/tests/org.jboss.tools.central.test.ui.bot/META-INF/MANIFEST.MF
Log:
tests maintenance
Modified: trunk/central/tests/org.jboss.tools.central.test.ui.bot/META-INF/MANIFEST.MF
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test.ui.bot/META-INF/MANIFEST.MF 2012-10-01 11:00:24 UTC (rev 44169)
+++ trunk/central/tests/org.jboss.tools.central.test.ui.bot/META-INF/MANIFEST.MF 2012-10-01 11:04:01 UTC (rev 44170)
@@ -7,5 +7,7 @@
Bundle-Vendor: Red Hat
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.eclipse.swtbot.go,
- org.jboss.tools.ui.bot.ext;bundle-version="3.2.0"
+ org.jboss.tools.ui.bot.ext;bundle-version="3.2.0",
+ org.eclipse.ui.forms;bundle-version="3.5.101",
+ org.jboss.tools.central;bundle-version="1.1.0"
Import-Package: org.jboss.tools.ui.bot.ext
12 years, 2 months