JBoss Tools SVN: r43129 - in trunk/maven: tests and 17 other directories.
by jbosstools-commits@lists.jboss.org
Author: fbricon
Date: 2012-08-21 08:56:34 -0400 (Tue, 21 Aug 2012)
New Revision: 43129
Added:
trunk/maven/tests/org.jboss.tools.maven.profiles.test/
trunk/maven/tests/org.jboss.tools.maven.profiles.test/.classpath
trunk/maven/tests/org.jboss.tools.maven.profiles.test/.project
trunk/maven/tests/org.jboss.tools.maven.profiles.test/.settings/
trunk/maven/tests/org.jboss.tools.maven.profiles.test/.settings/org.eclipse.jdt.core.prefs
trunk/maven/tests/org.jboss.tools.maven.profiles.test/.settings/org.eclipse.m2e.core.prefs
trunk/maven/tests/org.jboss.tools.maven.profiles.test/META-INF/
trunk/maven/tests/org.jboss.tools.maven.profiles.test/META-INF/MANIFEST.MF
trunk/maven/tests/org.jboss.tools.maven.profiles.test/build.properties
trunk/maven/tests/org.jboss.tools.maven.profiles.test/plugin_customization.ini
trunk/maven/tests/org.jboss.tools.maven.profiles.test/pom.xml
trunk/maven/tests/org.jboss.tools.maven.profiles.test/projects/
trunk/maven/tests/org.jboss.tools.maven.profiles.test/projects/12442/
trunk/maven/tests/org.jboss.tools.maven.profiles.test/projects/12442/pom.xml
trunk/maven/tests/org.jboss.tools.maven.profiles.test/settings.xml
trunk/maven/tests/org.jboss.tools.maven.profiles.test/src/
trunk/maven/tests/org.jboss.tools.maven.profiles.test/src/org/
trunk/maven/tests/org.jboss.tools.maven.profiles.test/src/org/jboss/
trunk/maven/tests/org.jboss.tools.maven.profiles.test/src/org/jboss/tools/
trunk/maven/tests/org.jboss.tools.maven.profiles.test/src/org/jboss/tools/maven/
trunk/maven/tests/org.jboss.tools.maven.profiles.test/src/org/jboss/tools/maven/profiles/
trunk/maven/tests/org.jboss.tools.maven.profiles.test/src/org/jboss/tools/maven/profiles/tests/
trunk/maven/tests/org.jboss.tools.maven.profiles.test/src/org/jboss/tools/maven/profiles/tests/AbstractMavenProfileTest.java
trunk/maven/tests/org.jboss.tools.maven.profiles.test/src/org/jboss/tools/maven/profiles/tests/MavenProfileManagerTest.java
trunk/maven/tests/org.jboss.tools.maven.profiles.test/testrepo/
trunk/maven/tests/org.jboss.tools.maven.profiles.test/testrepo/foo/
trunk/maven/tests/org.jboss.tools.maven.profiles.test/testrepo/foo/bar/
trunk/maven/tests/org.jboss.tools.maven.profiles.test/testrepo/foo/bar/parent-pom/
trunk/maven/tests/org.jboss.tools.maven.profiles.test/testrepo/foo/bar/parent-pom/0.0.1/
trunk/maven/tests/org.jboss.tools.maven.profiles.test/testrepo/foo/bar/parent-pom/0.0.1/parent-pom-0.0.1.pom
Modified:
trunk/maven/plugins/org.jboss.tools.maven.profiles.core/src/org/jboss/tools/maven/profiles/core/internal/profiles/ProfileManager.java
trunk/maven/tests/pom.xml
Log:
JBIDE-12442 : use project defined repositories to resolve parent hierarchy
Modified: trunk/maven/plugins/org.jboss.tools.maven.profiles.core/src/org/jboss/tools/maven/profiles/core/internal/profiles/ProfileManager.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.profiles.core/src/org/jboss/tools/maven/profiles/core/internal/profiles/ProfileManager.java 2012-08-21 10:54:10 UTC (rev 43128)
+++ trunk/maven/plugins/org.jboss.tools.maven.profiles.core/src/org/jboss/tools/maven/profiles/core/internal/profiles/ProfileManager.java 2012-08-21 12:56:34 UTC (rev 43129)
@@ -12,13 +12,17 @@
import java.util.Set;
import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.InvalidRepositoryException;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.model.Model;
import org.apache.maven.model.Parent;
import org.apache.maven.model.Profile;
+import org.apache.maven.model.Repository;
import org.apache.maven.project.MavenProject;
+import org.apache.maven.repository.RepositorySystem;
import org.apache.maven.settings.Settings;
import org.apache.maven.settings.SettingsUtils;
+import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
import org.codehaus.plexus.util.StringUtils;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
@@ -26,11 +30,14 @@
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.embedder.IMaven;
+import org.eclipse.m2e.core.internal.MavenPluginActivator;
+import org.eclipse.m2e.core.internal.NoSuchComponentException;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.IProjectConfigurationManager;
import org.eclipse.m2e.core.project.MavenUpdateRequest;
import org.eclipse.m2e.core.project.ResolverConfiguration;
import org.eclipse.osgi.util.NLS;
+import org.jboss.tools.maven.profiles.core.MavenProfilesCoreActivator;
import org.jboss.tools.maven.profiles.core.profiles.IProfileManager;
import org.jboss.tools.maven.profiles.core.profiles.ProfileState;
import org.jboss.tools.maven.profiles.core.profiles.ProfileStatus;
@@ -235,7 +242,14 @@
models.add(projectModel);
Parent p = projectModel.getParent();
if (p != null) {
- Model parentModel = resolvePomModel(p.getGroupId(), p.getArtifactId(), p.getVersion(), monitor);
+
+ IMaven maven = MavenPlugin.getMaven();
+
+ List<ArtifactRepository> repositories = new ArrayList<ArtifactRepository>();
+ repositories.addAll(getProjectRepositories(projectModel));
+ repositories.addAll(maven.getArtifactRepositories());
+
+ Model parentModel = resolvePomModel(p.getGroupId(), p.getArtifactId(), p.getVersion(), repositories, monitor);
if (parentModel != null) {
getModelHierarchy(models, parentModel, monitor);
}
@@ -243,7 +257,35 @@
return models;
}
- private Model resolvePomModel(String groupId, String artifactId, String version, IProgressMonitor monitor)
+ private List<ArtifactRepository> getProjectRepositories(Model projectModel) {
+ List<ArtifactRepository> repos = new ArrayList<ArtifactRepository>();
+ List<Repository> modelRepos = projectModel.getRepositories();
+ if (modelRepos != null && !modelRepos.isEmpty()) {
+ RepositorySystem repositorySystem = getRepositorySystem();
+ for (Repository modelRepo : modelRepos) {
+ ArtifactRepository ar;
+ try {
+ ar = repositorySystem.buildArtifactRepository(modelRepo);
+ if (ar != null) {
+ repos.add(ar);
+ }
+ } catch (InvalidRepositoryException e) {
+ MavenProfilesCoreActivator.log(e);
+ }
+ }
+ }
+ return repos;
+ }
+
+ private RepositorySystem getRepositorySystem() {
+ try {
+ return MavenPluginActivator.getDefault().getPlexusContainer().lookup(RepositorySystem.class);
+ } catch (ComponentLookupException e) {
+ throw new NoSuchComponentException(e);
+ }
+ }
+
+ private Model resolvePomModel(String groupId, String artifactId, String version, List<ArtifactRepository> repositories, IProgressMonitor monitor)
throws CoreException {
monitor.subTask(NLS.bind("Resolving {0}:{1}:{2}", new Object[] { groupId, artifactId, version}));
@@ -254,7 +296,6 @@
return facade.getMavenProject(monitor).getModel();
}
- List<ArtifactRepository> repositories = maven.getArtifactRepositories();
Artifact artifact = maven.resolve(groupId, artifactId, version, "pom", null, repositories, monitor); //$NON-NLS-1$
File file = artifact.getFile();
if(file == null) {
Added: trunk/maven/tests/org.jboss.tools.maven.profiles.test/.classpath
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.profiles.test/.classpath (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.profiles.test/.classpath 2012-08-21 12:56:34 UTC (rev 43129)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <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="output" path="target/classes"/>
+</classpath>
Added: trunk/maven/tests/org.jboss.tools.maven.profiles.test/.project
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.profiles.test/.project (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.profiles.test/.project 2012-08-21 12:56:34 UTC (rev 43129)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.maven.configurators.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/maven/tests/org.jboss.tools.maven.profiles.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.profiles.test/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.profiles.test/.settings/org.eclipse.jdt.core.prefs 2012-08-21 12:56:34 UTC (rev 43129)
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Added: trunk/maven/tests/org.jboss.tools.maven.profiles.test/.settings/org.eclipse.m2e.core.prefs
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.profiles.test/.settings/org.eclipse.m2e.core.prefs (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.profiles.test/.settings/org.eclipse.m2e.core.prefs 2012-08-21 12:56:34 UTC (rev 43129)
@@ -0,0 +1,5 @@
+#Mon Nov 28 08:59:23 CET 2011
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
Added: trunk/maven/tests/org.jboss.tools.maven.profiles.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.profiles.test/META-INF/MANIFEST.MF (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.profiles.test/META-INF/MANIFEST.MF 2012-08-21 12:56:34 UTC (rev 43129)
@@ -0,0 +1,20 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: JBoss Maven Profile Management Tests
+Bundle-SymbolicName: org.jboss.tools.maven.profiles.test;singleton:=true
+Bundle-Version: 1.4.0.qualifier
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.apache.log4j,
+ org.junit4,
+ org.jboss.tools.maven.profiles.core,
+ org.jboss.tools.common,
+ org.jboss.tools.tests,
+ org.eclipse.m2e.launching,
+ org.eclipse.m2e.tests.common,
+ org.eclipse.ui.ide
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Eclipse-RegisterBuddy: org.apache.log4j
+
Added: trunk/maven/tests/org.jboss.tools.maven.profiles.test/build.properties
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.profiles.test/build.properties (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.profiles.test/build.properties 2012-08-21 12:56:34 UTC (rev 43129)
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Added: trunk/maven/tests/org.jboss.tools.maven.profiles.test/plugin_customization.ini
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.profiles.test/plugin_customization.ini (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.profiles.test/plugin_customization.ini 2012-08-21 12:56:34 UTC (rev 43129)
@@ -0,0 +1,2 @@
+org.eclipse.m2e.core/eclipse.m2.updateIndexes=false
+org.jboss.tools.central/showJBossCentralOnStartup=false
\ No newline at end of file
Added: trunk/maven/tests/org.jboss.tools.maven.profiles.test/pom.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.profiles.test/pom.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.profiles.test/pom.xml 2012-08-21 12:56:34 UTC (rev 43129)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools.maven</groupId>
+ <artifactId>tests</artifactId>
+ <version>1.4.0-SNAPSHOT</version>
+ </parent>
+ <groupId>org.jboss.tools.maven.tests</groupId>
+ <artifactId>org.jboss.tools.maven.profiles.test</artifactId>
+
+ <packaging>eclipse-test-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tychoVersion}</version>
+ <configuration>
+ <useUIThread>false</useUIThread>
+ <useUIHarness>true</useUIHarness>
+ <includes>
+ <include>**/*Test.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Added: trunk/maven/tests/org.jboss.tools.maven.profiles.test/projects/12442/pom.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.profiles.test/projects/12442/pom.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.profiles.test/projects/12442/pom.xml 2012-08-21 12:56:34 UTC (rev 43129)
@@ -0,0 +1,17 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>foo.bar</groupId>
+ <artifactId>parent-pom</artifactId>
+ <version>0.0.1</version>
+ </parent>
+ <artifactId>12442</artifactId>
+ <repositories>
+ <repository>
+ <id>testrepo</id>
+ <url>file:testrepo</url>
+ <snapshots><enabled>true</enabled></snapshots>
+ <releases><enabled>true</enabled></releases>
+ </repository>
+ </repositories>
+</project>
\ No newline at end of file
Added: trunk/maven/tests/org.jboss.tools.maven.profiles.test/settings.xml
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.profiles.test/settings.xml (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.profiles.test/settings.xml 2012-08-21 12:56:34 UTC (rev 43129)
@@ -0,0 +1,19 @@
+<settings>
+ <profiles>
+ <profile>
+ <id>activebydefault-settings-profile</id>
+ <activation><activeByDefault>true</activeByDefault></activation>
+ </profile>
+ <profile>
+ <id>inactive-settings-profile</id>
+ </profile>
+ <profile>
+ <id>active-settings-profile</id>
+ </profile>
+ </profiles>
+
+ <activeProfiles>
+ <activeProfile>active-settings-profile</activeProfile>
+ </activeProfiles>
+
+</settings>
Added: trunk/maven/tests/org.jboss.tools.maven.profiles.test/src/org/jboss/tools/maven/profiles/tests/AbstractMavenProfileTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.profiles.test/src/org/jboss/tools/maven/profiles/tests/AbstractMavenProfileTest.java (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.profiles.test/src/org/jboss/tools/maven/profiles/tests/AbstractMavenProfileTest.java 2012-08-21 12:56:34 UTC (rev 43129)
@@ -0,0 +1,97 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.maven.profiles.tests;
+
+import java.io.File;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.project.IProjectConfigurationManager;
+import org.eclipse.m2e.core.project.ResolverConfiguration;
+import org.eclipse.m2e.tests.common.AbstractMavenProjectTestCase;
+import org.jboss.tools.common.util.FileUtil;
+import org.jboss.tools.maven.profiles.core.MavenProfilesCoreActivator;
+import org.jboss.tools.maven.profiles.core.profiles.IProfileManager;
+
+public abstract class AbstractMavenProfileTest extends AbstractMavenProjectTestCase {
+
+ protected IProfileManager profileManager;
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ profileManager = MavenProfilesCoreActivator.getDefault().getProfileManager();
+ }
+
+ protected IMavenProjectFacade getFacade(IProject project) {
+ return MavenPlugin.getMavenProjectRegistry().create(project, monitor);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ profileManager = null;
+ super.tearDown();
+ }
+
+ protected String toString(File file) {
+ return FileUtil.readFile(file);
+ }
+
+ protected String toString(IFile file) {
+ return FileUtil.getContentFromEditorOrFile(file);
+ }
+
+ /**
+ * Replace the project pom.xml with a new one, triggers new build
+ *
+ * @param project
+ * @param newPomName
+ * @throws Exception
+ */
+ protected void updateProject(IProject project, String newPomName) throws Exception {
+ updateProject(project, newPomName, -1);
+ }
+
+ /**
+ * Replace the project pom.xml with a new one, triggers new build, wait for
+ * waitTime milliseconds.
+ *
+ * @param project
+ * @param newPomName
+ * @param waitTime
+ * @throws Exception
+ */
+ protected void updateProject(IProject project, String newPomName, int waitTime) throws Exception {
+
+ if (newPomName != null) {
+ copyContent(project, newPomName, "pom.xml");
+ }
+ IProjectConfigurationManager configurationManager = MavenPlugin.getProjectConfigurationManager();
+ ResolverConfiguration configuration = new ResolverConfiguration();
+ configurationManager.enableMavenNature(project, configuration, monitor);
+ configurationManager.updateProjectConfiguration(project, monitor);
+ waitForJobsToComplete(monitor);
+
+ project.build(IncrementalProjectBuilder.FULL_BUILD, monitor);
+ if (waitTime > 0) {
+ Thread.sleep(waitTime);
+ }
+ waitForJobsToComplete(monitor);
+ }
+
+ protected void updateProject(IProject project) throws Exception {
+ updateProject(project, null, -1);
+ }
+
+}
Added: trunk/maven/tests/org.jboss.tools.maven.profiles.test/src/org/jboss/tools/maven/profiles/tests/MavenProfileManagerTest.java
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.profiles.test/src/org/jboss/tools/maven/profiles/tests/MavenProfileManagerTest.java (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.profiles.test/src/org/jboss/tools/maven/profiles/tests/MavenProfileManagerTest.java 2012-08-21 12:56:34 UTC (rev 43129)
@@ -0,0 +1,59 @@
+/*************************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.maven.profiles.tests;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.jboss.tools.maven.profiles.core.profiles.ProfileState;
+import org.jboss.tools.maven.profiles.core.profiles.ProfileStatus;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+@SuppressWarnings("restriction")
+public class MavenProfileManagerTest extends AbstractMavenProfileTest {
+
+ @Test
+ public void testJBIDE12442_parentFromRemote() throws Exception {
+ String pomPath = "projects/12442/pom.xml";
+ IProject project = importProject(pomPath);
+ waitForJobsToComplete();
+ assertNotNull(pomPath+" could not be imported", project);
+
+ IMavenProjectFacade facade = getFacade(project);
+ List<ProfileStatus> profiles = profileManager.getProfilesStatuses(facade, monitor);
+ assertEquals(profiles.toString(), 5, profiles.size());
+ for (ProfileStatus p : profiles) {
+ String pid = p.getId();
+ if ("other-parent-profile".equals(pid)) {
+ assertFalse(p.isAutoActive());//parent profile activation is not inherited
+ assertEquals(ProfileState.Inactive, p.getActivationState());
+ } else if ("inactive-settings-profile".equals(pid)) {
+ assertFalse(p.isAutoActive());
+ assertEquals(ProfileState.Inactive, p.getActivationState());
+ } else if ("active-settings-profile".equals(pid)) {
+ assertTrue(p.isAutoActive());
+ assertEquals(ProfileState.Active, p.getActivationState());
+ } else if ("activebydefault-settings-profile".equals(pid)) {
+ assertTrue(p.isAutoActive());
+ assertEquals(ProfileState.Active, p.getActivationState());
+ } else if ("parent-profile".equals(pid)) {
+ assertFalse(p.isAutoActive());
+ assertEquals(ProfileState.Inactive, p.getActivationState());
+ } else {
+ fail("Unexpected profile "+pid);
+ }
+ }
+
+ }
+
+}
Added: trunk/maven/tests/org.jboss.tools.maven.profiles.test/testrepo/foo/bar/parent-pom/0.0.1/parent-pom-0.0.1.pom
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.profiles.test/testrepo/foo/bar/parent-pom/0.0.1/parent-pom-0.0.1.pom (rev 0)
+++ trunk/maven/tests/org.jboss.tools.maven.profiles.test/testrepo/foo/bar/parent-pom/0.0.1/parent-pom-0.0.1.pom 2012-08-21 12:56:34 UTC (rev 43129)
@@ -0,0 +1,18 @@
+<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>foo.bar</groupId>
+ <artifactId>parent-pom</artifactId>
+ <version>0.0.1</version>
+ <packaging>pom</packaging>
+ <profiles>
+ <profile>
+ <id>parent-profile</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ </profile>
+ <profile>
+ <id>other-parent-profile</id>
+ </profile>
+ </profiles>
+</project>
\ No newline at end of file
Modified: trunk/maven/tests/pom.xml
===================================================================
--- trunk/maven/tests/pom.xml 2012-08-21 10:54:10 UTC (rev 43128)
+++ trunk/maven/tests/pom.xml 2012-08-21 12:56:34 UTC (rev 43129)
@@ -14,6 +14,7 @@
<packaging>pom</packaging>
<modules>
<module>org.jboss.tools.maven.configurators.tests</module>
+ <module>org.jboss.tools.maven.profiles.test</module>
<module>org.jboss.tools.maven.ui.bot.test</module>
</modules>
12 years, 4 months
JBoss Tools SVN: r43128 - branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-08-21 06:54:10 -0400 (Tue, 21 Aug 2012)
New Revision: 43128
Modified:
branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/PreferencesDialog.java
Log:
Added activation of workbench shell (fix for windows)
Modified: branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/PreferencesDialog.java
===================================================================
--- branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/PreferencesDialog.java 2012-08-21 10:53:40 UTC (rev 43127)
+++ branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/dialog/preferences/PreferencesDialog.java 2012-08-21 10:54:10 UTC (rev 43128)
@@ -1,6 +1,8 @@
package org.jboss.tools.runtime.as.ui.bot.test.dialog.preferences;
+import org.apache.log4j.Logger;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.SWTBotFactory;
import org.jboss.tools.ui.bot.ext.gen.ActionItem.Preference;
@@ -8,6 +10,8 @@
public class PreferencesDialog {
+ private static final Logger log = Logger.getLogger(PreferencesDialog.class);
+
protected void open(String... path){
SWTBotExt bot = SWTBotFactory.getBot();
try {
@@ -16,10 +20,25 @@
} catch (WidgetNotFoundException e){
// ok
}
+ activateWorkbenchShell();
IPreference preference = Preference.create(path);
SWTBotFactory.getOpen().preferenceOpen(preference);
}
+ public void activateWorkbenchShell(){
+ log.info("Trying to activate workbench shell");
+ SWTBotShell[] shells = SWTBotFactory.getBot().shells();
+ if (shells.length == 1){
+ log.info("Only one shell present, assuming it's workbench and activating");
+ shells[0].activate();
+ } else {
+ log.info("More than one shell present");
+ for (SWTBotShell shell : shells){
+ log.info(shell.getText());
+ }
+ }
+ }
+
public void ok(){
SWTBotFactory.getBot().button("OK").click();
}
12 years, 4 months
JBoss Tools SVN: r43127 - branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-08-21 06:53:40 -0400 (Tue, 21 Aug 2012)
New Revision: 43127
Added:
branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/RT_ProjectTestsSuite.launch
Log:
Created launcher for project suite
Added: branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/RT_ProjectTestsSuite.launch
===================================================================
--- branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/RT_ProjectTestsSuite.launch (rev 0)
+++ branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/RT_ProjectTestsSuite.launch 2012-08-21 10:53:40 UTC (rev 43127)
@@ -0,0 +1,42 @@
+<?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.runtime.as.ui.bot.test/src/org/jboss/tools/runtime/as/ui/bot/test/ProjectTestsSuite.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=":${string_prompt:display number:0}"/>
+</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.MAIN_TYPE" value="org.jboss.tools.runtime.as.ui.bot.test.ProjectTestsSuite"/>
+<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.runtime.as.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="-Xmx1024m -XX:MaxPermSize=256m"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<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>
12 years, 4 months
JBoss Tools SVN: r43126 - branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace.
by jbosstools-commits@lists.jboss.org
Author: ljelinko
Date: 2012-08-21 06:53:25 -0400 (Tue, 21 Aug 2012)
New Revision: 43126
Modified:
branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace/RT_prepare_workspace.launch
Log:
Use embedded Maven
Modified: branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace/RT_prepare_workspace.launch
===================================================================
--- branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace/RT_prepare_workspace.launch 2012-08-21 10:07:58 UTC (rev 43125)
+++ branches/jbosstools-3.3.x/runtime/tests/org.jboss.tools.runtime.as.ui.bot.test/launchers/prepare_workspace/RT_prepare_workspace.launch 2012-08-21 10:53:25 UTC (rev 43126)
@@ -18,7 +18,7 @@
<listEntry value="jboss-seam-2.2=${folder_prompt:Seam 2.2 installation folder}"/>
<listEntry value="jboss-seam-2.3=${folder_prompt:Seam 2.3 installation folder}"/>
</listAttribute>
-<stringAttribute key="M2_RUNTIME" value="/home/ljelinko/programs/apache-maven-3.0.3"/>
+<stringAttribute key="M2_RUNTIME" value="EMBEDDED"/>
<booleanAttribute key="M2_SKIP_TESTS" value="false"/>
<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>
<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="false"/>
12 years, 4 months
JBoss Tools SVN: r43125 - in trunk: cdi/tests/org.jboss.tools.cdi.bot.test/META-INF and 18 other directories.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-08-21 06:07:58 -0400 (Tue, 21 Aug 2012)
New Revision: 43125
Modified:
trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/META-INF/MANIFEST.MF
trunk/central/tests/org.jboss.tools.central.test/META-INF/MANIFEST.MF
trunk/common/tests/org.jboss.tools.common.verification.test/META-INF/MANIFEST.MF
trunk/deltacloud/tests/org.jboss.tools.deltacloud.ui.bot.test/META-INF/MANIFEST.MF
trunk/examples/tests/org.jboss.tools.project.examples.test/META-INF/MANIFEST.MF
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/META-INF/MANIFEST.MF
trunk/jbpm/tests/org.jboss.tools.jbpm.convert.test/META-INF/MANIFEST.MF
trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/META-INF/MANIFEST.MF
trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/META-INF/MANIFEST.MF
trunk/maven/tests/org.jboss.tools.maven.configurators.tests/META-INF/MANIFEST.MF
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF
trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/META-INF/MANIFEST.MF
trunk/modeshape/tests/org.jboss.tools.modeshape.rest.test/META-INF/MANIFEST.MF
trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/META-INF/MANIFEST.MF
trunk/runtime-soa/tests/org.jboss.tools.runtime.soa.test/META-INF/MANIFEST.MF
trunk/runtime/tests/org.jboss.tools.runtime.test/META-INF/MANIFEST.MF
trunk/ws/tests/org.jboss.tools.ws.creation.core.test/META-INF/MANIFEST.MF
trunk/ws/tests/org.jboss.tools.ws.ui.test/META-INF/MANIFEST.MF
Log:
JBIDE-12449: Replace org.junit4 by org.junit;bundle-version="4.8.0"
Modified: trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/META-INF/MANIFEST.MF 2012-08-21 10:07:43 UTC (rev 43124)
+++ trunk/build/aggregate/soatests-site/tests/org.jboss.tools.drools.ui.bot.test/META-INF/MANIFEST.MF 2012-08-21 10:07:58 UTC (rev 43125)
@@ -10,7 +10,7 @@
org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0",
org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
- org.junit4;bundle-version="4.5.0",
+ org.junit;bundle-version="4.5.0",
org.jboss.tools.ui.bot.ext,
org.drools.eclipse;bundle-version="5.3.1",
org.eclipse.swtbot.eclipse.gef.finder,
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/META-INF/MANIFEST.MF 2012-08-21 10:07:43 UTC (rev 43124)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/META-INF/MANIFEST.MF 2012-08-21 10:07:58 UTC (rev 43125)
@@ -25,7 +25,7 @@
org.eclipse.swtbot.eclipse.ui;bundle-version="2.0.0",
org.eclipse.swtbot.junit4_x;bundle-version="2.0.0",
org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
- org.junit4;bundle-version="4.8.1",
+ org.junit;bundle-version="4.8.1",
org.apache.log4j;bundle-version="1.2.15",
org.eclipse.ui;bundle-version="3.6.0",
org.jboss.tools.ui.bot.ext;bundle-version="3.2.0",
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/META-INF/MANIFEST.MF 2012-08-21 10:07:43 UTC (rev 43124)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam3.bot.test/META-INF/MANIFEST.MF 2012-08-21 10:07:58 UTC (rev 43125)
@@ -10,7 +10,7 @@
org.eclipse.swtbot.eclipse.ui;bundle-version="2.0.0",
org.eclipse.swtbot.junit4_x;bundle-version="2.0.0",
org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
- org.junit4;bundle-version="4.8.1",
+ org.junit;bundle-version="4.8.1",
org.apache.log4j;bundle-version="1.2.15",
org.eclipse.ui;bundle-version="3.6.0",
org.jboss.tools.ui.bot.ext;bundle-version="3.2.0",
Modified: trunk/central/tests/org.jboss.tools.central.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/central/tests/org.jboss.tools.central.test/META-INF/MANIFEST.MF 2012-08-21 10:07:43 UTC (rev 43124)
+++ trunk/central/tests/org.jboss.tools.central.test/META-INF/MANIFEST.MF 2012-08-21 10:07:58 UTC (rev 43125)
@@ -8,7 +8,7 @@
org.eclipse.core.runtime;bundle-version="3.7.0",
org.jboss.tools.central;bundle-version="1.0.0",
org.jboss.tools.tests;bundle-version="3.2.0",
- org.junit4;bundle-version="4.8.1",
+ org.junit;bundle-version="4.8.1",
org.jboss.tools.project.examples;bundle-version="1.2.1",
org.jboss.tools.project.examples.cheatsheet;bundle-version="1.2.1",
org.jboss.tools.community.project.examples;bundle-version="1.2.1",
Modified: trunk/common/tests/org.jboss.tools.common.verification.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/tests/org.jboss.tools.common.verification.test/META-INF/MANIFEST.MF 2012-08-21 10:07:43 UTC (rev 43124)
+++ trunk/common/tests/org.jboss.tools.common.verification.test/META-INF/MANIFEST.MF 2012-08-21 10:07:58 UTC (rev 43125)
@@ -7,7 +7,7 @@
Bundle-Vendor: %Bundle-Vendor.0
Export-Package: org.jboss.tools.common.verification.test
Require-Bundle:
- org.junit4,
+ org.junit;bundle-version="4.8.0",
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.jboss.tools.common.model,
Modified: trunk/deltacloud/tests/org.jboss.tools.deltacloud.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/tests/org.jboss.tools.deltacloud.ui.bot.test/META-INF/MANIFEST.MF 2012-08-21 10:07:43 UTC (rev 43124)
+++ trunk/deltacloud/tests/org.jboss.tools.deltacloud.ui.bot.test/META-INF/MANIFEST.MF 2012-08-21 10:07:58 UTC (rev 43125)
@@ -16,7 +16,7 @@
org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
org.eclipse.ui.ide;bundle-version="3.5.1",
org.eclipse.ui.forms;bundle-version="3.4.1",
- org.junit4;bundle-version="4.5.0",
+ org.junit;bundle-version="4.5.0",
org.eclipse.core.resources
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/examples/tests/org.jboss.tools.project.examples.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/examples/tests/org.jboss.tools.project.examples.test/META-INF/MANIFEST.MF 2012-08-21 10:07:43 UTC (rev 43124)
+++ trunk/examples/tests/org.jboss.tools.project.examples.test/META-INF/MANIFEST.MF 2012-08-21 10:07:58 UTC (rev 43125)
@@ -24,7 +24,7 @@
org.eclipse.jst.jee.web,
org.eclipse.ui,
org.eclipse.core.resources,
- org.junit4,
+ org.junit;bundle-version="4.8.0",
org.jboss.tools.jsf.vpe.seam,
org.jboss.tools.seam.pages.xml,
org.jboss.tools.seam.ui,
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/META-INF/MANIFEST.MF 2012-08-21 10:07:43 UTC (rev 43124)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/META-INF/MANIFEST.MF 2012-08-21 10:07:58 UTC (rev 43125)
@@ -6,7 +6,7 @@
Bundle-Activator: org.jboss.tools.hibernate.ui.bot.testcase.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.junit4,
+ org.junit;bundle-version="4.8.0",
org.apache.log4j;bundle-version="1.2.13",
org.jboss.tools.ui.bot.ext,
org.eclipse.jdt.ui,
Modified: trunk/jbpm/tests/org.jboss.tools.jbpm.convert.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jbpm/tests/org.jboss.tools.jbpm.convert.test/META-INF/MANIFEST.MF 2012-08-21 10:07:43 UTC (rev 43124)
+++ trunk/jbpm/tests/org.jboss.tools.jbpm.convert.test/META-INF/MANIFEST.MF 2012-08-21 10:07:58 UTC (rev 43125)
@@ -5,7 +5,7 @@
Bundle-Version: 1.2.0.qualifier
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.jboss.tools.jbpm.convert,
- org.junit4,
+ org.junit;bundle-version="4.8.0",
org.eclipse.core.runtime;bundle-version="3.4.0"
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %BundleProvider
Modified: trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/META-INF/MANIFEST.MF 2012-08-21 10:07:43 UTC (rev 43124)
+++ trunk/jbpm/tests/org.jboss.tools.jbpm.ui.bot.test/META-INF/MANIFEST.MF 2012-08-21 10:07:58 UTC (rev 43125)
@@ -16,7 +16,7 @@
org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
org.apache.log4j;bundle-version="1.2.15",
org.jboss.tools.ui.bot.ext;bundle-version="3.2.0",
- org.junit4;bundle-version="4.8.1",
+ org.junit;bundle-version="4.8.1",
org.eclipse.gef;bundle-version="3.6.1"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/META-INF/MANIFEST.MF 2012-08-21 10:07:43 UTC (rev 43124)
+++ trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/META-INF/MANIFEST.MF 2012-08-21 10:07:58 UTC (rev 43125)
@@ -14,7 +14,7 @@
org.apache.log4j;bundle-version="1.2.13",
org.jboss.tools.common.text.ext;bundle-version="2.0.0",
org.eclipse.ui.ide;bundle-version="3.5.0",
- org.junit4;bundle-version="4.5.0",
+ org.junit;bundle-version="4.5.0",
org.jboss.tools.ui.bot.ext;bundle-version="3.1.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/maven/tests/org.jboss.tools.maven.configurators.tests/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.configurators.tests/META-INF/MANIFEST.MF 2012-08-21 10:07:43 UTC (rev 43124)
+++ trunk/maven/tests/org.jboss.tools.maven.configurators.tests/META-INF/MANIFEST.MF 2012-08-21 10:07:58 UTC (rev 43125)
@@ -7,7 +7,7 @@
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.apache.log4j,
- org.junit4,
+ org.junit;bundle-version="4.8.0",
org.jboss.tools.seam.core,
org.jboss.tools.maven.core,
org.jboss.tools.maven.hibernate,
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF 2012-08-21 10:07:43 UTC (rev 43124)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF 2012-08-21 10:07:58 UTC (rev 43125)
@@ -9,7 +9,7 @@
org.eclipse.core.runtime,
org.eclipse.m2e.core,
org.jboss.tools.ui.bot.ext,
- org.junit4,
+ org.junit;bundle-version="4.8.0",
org.eclipse.swtbot.swt.finder,
org.eclipse.swtbot.eclipse.finder,
org.eclipse.m2e.tests.common,
Modified: trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/META-INF/MANIFEST.MF 2012-08-21 10:07:43 UTC (rev 43124)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/META-INF/MANIFEST.MF 2012-08-21 10:07:58 UTC (rev 43125)
@@ -6,5 +6,5 @@
Bundle-Vendor: %bundleVendor
Fragment-Host: org.jboss.tools.modeshape.jcr
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Require-Bundle: org.junit4
+Require-Bundle: org.junit;bundle-version="4.8.0"
Bundle-ClassPath: .
Modified: trunk/modeshape/tests/org.jboss.tools.modeshape.rest.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.rest.test/META-INF/MANIFEST.MF 2012-08-21 10:07:43 UTC (rev 43124)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.rest.test/META-INF/MANIFEST.MF 2012-08-21 10:07:58 UTC (rev 43125)
@@ -5,7 +5,7 @@
Bundle-Version: 1.1.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.jboss.tools.modeshape.rest,
- org.junit4,
+ org.junit;bundle-version="4.8.0",
org.jboss.tools.modeshape.client
Bundle-ClassPath: hamcrest-core-1.1.jar,
.,
Modified: trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/META-INF/MANIFEST.MF 2012-08-21 10:07:43 UTC (rev 43124)
+++ trunk/portlet/tests/org.jboss.tools.portlet.ui.bot.test/META-INF/MANIFEST.MF 2012-08-21 10:07:58 UTC (rev 43125)
@@ -13,7 +13,7 @@
org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
org.apache.log4j;bundle-version="1.2.13",
- org.junit4;bundle-version="4.8.1",
+ org.junit;bundle-version="4.8.1",
org.jboss.tools.ui.bot.ext;bundle-version="1.0.0",
org.hamcrest;bundle-version="1.1.0",
org.eclipse.ui.forms;bundle-version="3.5.0"
Modified: trunk/runtime/tests/org.jboss.tools.runtime.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/META-INF/MANIFEST.MF 2012-08-21 10:07:43 UTC (rev 43124)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/META-INF/MANIFEST.MF 2012-08-21 10:07:58 UTC (rev 43125)
@@ -4,7 +4,7 @@
Bundle-SymbolicName: org.jboss.tools.runtime.test;singleton:=true
Bundle-Version: 1.4.0.qualifier
Require-Bundle: org.eclipse.core.runtime,
- org.junit4,
+ org.junit;bundle-version="4.8.1",
org.jboss.tools.runtime.ui,
org.jboss.tools.runtime.core,
org.jboss.tools.tests,
@@ -24,7 +24,6 @@
org.eclipse.jst.jee.web,
org.eclipse.ui,
org.eclipse.core.resources,
- org.junit4,
org.jboss.tools.jsf.vpe.seam,
org.jboss.tools.seam.pages.xml,
org.jboss.tools.seam.ui,
Modified: trunk/runtime-soa/tests/org.jboss.tools.runtime.soa.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/runtime-soa/tests/org.jboss.tools.runtime.soa.test/META-INF/MANIFEST.MF 2012-08-21 10:07:43 UTC (rev 43124)
+++ trunk/runtime-soa/tests/org.jboss.tools.runtime.soa.test/META-INF/MANIFEST.MF 2012-08-21 10:07:58 UTC (rev 43125)
@@ -4,7 +4,7 @@
Bundle-SymbolicName: org.jboss.tools.runtime.soa.test;singleton:=true
Bundle-Version: 1.3.0.qualifier
Require-Bundle: org.eclipse.core.runtime,
- org.junit4,
+ org.junit;bundle-version="4.8.0",
org.jboss.tools.runtime.ui,
org.jboss.tools.runtime.core,
org.jboss.tools.tests,
@@ -24,7 +24,6 @@
org.eclipse.jst.jee.web,
org.eclipse.ui,
org.eclipse.core.resources,
- org.junit4,
org.jboss.tools.jsf.vpe.seam,
org.jboss.tools.seam.pages.xml,
org.jboss.tools.seam.ui,
Modified: trunk/ws/tests/org.jboss.tools.ws.creation.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.creation.core.test/META-INF/MANIFEST.MF 2012-08-21 10:07:43 UTC (rev 43124)
+++ trunk/ws/tests/org.jboss.tools.ws.creation.core.test/META-INF/MANIFEST.MF 2012-08-21 10:07:58 UTC (rev 43125)
@@ -6,7 +6,7 @@
Bundle-Activator: org.jboss.tools.ws.creation.core.test.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.junit4,
+ org.junit;bundle-version="4.8.0",
org.jboss.tools.tests,
org.jboss.tools.ws.core,
org.eclipse.core.resources,
Modified: trunk/ws/tests/org.jboss.tools.ws.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.test/META-INF/MANIFEST.MF 2012-08-21 10:07:43 UTC (rev 43124)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.test/META-INF/MANIFEST.MF 2012-08-21 10:07:58 UTC (rev 43125)
@@ -6,7 +6,7 @@
Bundle-Activator: org.jboss.tools.ws.ui.test.Activator
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.junit4,
+ org.junit;bundle-version="4.8.0",
org.jboss.tools.tests,
org.jboss.tools.ws.ui,
org.jboss.tools.ws.core,
12 years, 4 months
JBoss Tools SVN: r43124 - trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor.
by jbosstools-commits@lists.jboss.org
Author: jjankovi
Date: 2012-08-21 06:07:43 -0400 (Tue, 21 Aug 2012)
New Revision: 43124
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/BeansEditorTest.java
Log:
BeansEditorTest fails if project is not located in workspace
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/BeansEditorTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/BeansEditorTest.java 2012-08-21 09:59:44 UTC (rev 43123)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/src/org/jboss/tools/cdi/bot/test/editor/BeansEditorTest.java 2012-08-21 10:07:43 UTC (rev 43124)
@@ -22,6 +22,7 @@
import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
+import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.jboss.tools.cdi.bot.test.CDIAllBotTests;
import org.jboss.tools.cdi.bot.test.CDIConstants;
import org.jboss.tools.cdi.bot.test.CDISmokeBotTests;
@@ -64,6 +65,14 @@
editResourceUtil.copyResource("resources/beans.xml", descPath);
editResourceUtil.copyResource("resources/Foo.jav_", "src/cdi/Foo.java");
editResourceUtil.copyResource("resources/Bar.jav_", "src/cdi/Bar.java");
+ /**
+ * project should be located in workspace after previous test
+ */
+ try {
+ projectExplorer.selectProject("CDIWizardTest");
+ } catch (WidgetNotFoundException wnfe) {
+ fail("project should be located in workspace");
+ }
}
@Override
12 years, 4 months
JBoss Tools SVN: r43123 - trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2012-08-21 05:59:44 -0400 (Tue, 21 Aug 2012)
New Revision: 43123
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJpaModelTests.java
trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJpaOrmModelTests.java
Log:
https://issues.jboss.org/browse/JBIDE-12451
Use synchronize method to get JpaProject
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJpaModelTests.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJpaModelTests.java 2012-08-21 09:54:37 UTC (rev 43122)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJpaModelTests.java 2012-08-21 09:59:44 UTC (rev 43123)
@@ -10,19 +10,20 @@
******************************************************************************/
package org.jboss.tools.hibernate.jpt.core.test;
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertNotNull;
-import static junit.framework.Assert.assertTrue;
+import static junit.framework.Assert.*;
import java.util.ArrayList;
import java.util.List;
+import javax.security.auth.login.FailedLoginException;
+
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jpt.common.utility.internal.CollectionTools;
import org.eclipse.jpt.jpa.core.JpaProject;
+import org.eclipse.jpt.jpa.core.JpaProject.Reference;
import org.eclipse.jpt.jpa.core.context.JpaRootContextNode;
import org.eclipse.jpt.jpa.core.context.java.JavaJoinTable;
import org.eclipse.jpt.jpa.core.context.java.JavaJoinTableRelationshipStrategy;
@@ -63,7 +64,7 @@
project = ResourcesUtils.importProject(Platform.getBundle("org.jboss.tools.hibernate.jpt.core.test"),
PROJECT_PATH, new NullProgressMonitor());
project.refreshLocal(IResource.DEPTH_INFINITE, null);
- jpaProject = (JpaProject) project.getAdapter(JpaProject.class);
+ jpaProject = ((Reference) project.getAdapter(Reference.class)).getValue();
}
@Test
@@ -94,7 +95,11 @@
assertNotNull("Naming Strategy not found", cc.getConfiguration().getNamingStrategy());
assertEquals("ns.NamingStrategy", cc.getConfiguration().getNamingStrategy().getClass().getName());
- jpaProject = (JpaProject) project.getAdapter(JpaProject.class);
+ try {
+ jpaProject = ((Reference) project.getAdapter(Reference.class)).getValue();
+ } catch (InterruptedException e) {
+ fail(e.getMessage());
+ }
assertNotNull(jpaProject);
JpaRootContextNode rootContextNode = jpaProject.getRootContextNode();
Persistence p = rootContextNode.getPersistenceXml().getPersistence();
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJpaOrmModelTests.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJpaOrmModelTests.java 2012-08-21 09:54:37 UTC (rev 43122)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.jpt.core.test/src/org/jboss/tools/hibernate/jpt/core/test/HibernateJpaOrmModelTests.java 2012-08-21 09:59:44 UTC (rev 43123)
@@ -13,6 +13,7 @@
import static junit.framework.Assert.assertEquals;
import static junit.framework.Assert.assertNotNull;
import static junit.framework.Assert.assertTrue;
+import static junit.framework.Assert.fail;
import java.util.ArrayList;
import java.util.List;
@@ -23,6 +24,7 @@
import org.eclipse.core.runtime.Platform;
import org.eclipse.jpt.common.utility.internal.CollectionTools;
import org.eclipse.jpt.jpa.core.JpaProject;
+import org.eclipse.jpt.jpa.core.JpaProject.Reference;
import org.eclipse.jpt.jpa.core.context.JpaRootContextNode;
import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTable;
import org.eclipse.jpt.jpa.core.context.orm.OrmJoinTableRelationshipStrategy;
@@ -65,7 +67,7 @@
project = ResourcesUtils.importProject(Platform.getBundle("org.jboss.tools.hibernate.jpt.core.test"),
PROJECT_PATH, new NullProgressMonitor());
project.refreshLocal(IResource.DEPTH_INFINITE, null);
- jpaProject = (JpaProject) project.getAdapter(JpaProject.class);
+ jpaProject = ((Reference) project.getAdapter(Reference.class)).getValue();
}
@Test
@@ -95,7 +97,11 @@
assertNotNull("Naming Strategy not found", cc.getConfiguration().getNamingStrategy());
assertEquals("ns.NamingStrategy", cc.getConfiguration().getNamingStrategy().getClass().getName());
- jpaProject = (JpaProject) project.getAdapter(JpaProject.class);
+ try {
+ jpaProject = ((Reference) project.getAdapter(Reference.class)).getValue();
+ } catch (InterruptedException e) {
+ fail(e.getMessage());
+ }
assertNotNull(jpaProject);
JpaRootContextNode rootContextNode = jpaProject.getRootContextNode();
Persistence p = rootContextNode.getPersistenceXml().getPersistence();
12 years, 4 months
JBoss Tools SVN: r43121 - in branches/jbosstools-3.3.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core: util/internal and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-08-21 05:30:33 -0400 (Tue, 21 Aug 2012)
New Revision: 43121
Modified:
branches/jbosstools-3.3.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java
branches/jbosstools-3.3.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java
Log:
JBIDE-12280 to 3.3.x
Modified: branches/jbosstools-3.3.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java
===================================================================
--- branches/jbosstools-3.3.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java 2012-08-21 09:30:10 UTC (rev 43120)
+++ branches/jbosstools-3.3.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java 2012-08-21 09:30:33 UTC (rev 43121)
@@ -314,7 +314,7 @@
for( int j = 0; j < matchingFilesets.length; j++ ) {
IStatus[] errors2 = ModelTruezipBridge.deleteFiles(
matchingFilesets[j], matchingFilesets[j].getMatches(globalPath),
- new NullProgressMonitor(), true);
+ new NullProgressMonitor(), false);
errors.addAll(Arrays.asList(errors2));
if( !seen.contains(matchingFilesets[j])) {
seen.add(matchingFilesets[j]);
@@ -343,7 +343,7 @@
}
IStatus[] errors2 = ModelTruezipBridge.copyFiles(matchingFilesets[j],
matchingFilesets[j].getMatches(globalPath),
- new NullProgressMonitor(), true, true);
+ new NullProgressMonitor(), true, false);
errors.addAll(Arrays.asList(errors2));
}
EventManager.fileUpdated(path, matchingFilesets);
@@ -351,6 +351,7 @@
}
+ // NOW do the synch
TrueZipUtil.sync();
Comparator c = new Comparator() {
public int compare(Object o1, Object o2) {
@@ -363,7 +364,8 @@
while(i2.hasNext()) {
try {
IArchive changed = i2.next();
- changedPaths.add(changed.getArchiveFilePath());
+ if( !addedChanged.contains(changed.getArchiveFilePath()))
+ changedPaths.add(changed.getArchiveFilePath());
EventManager.finishedBuildingArchive(changed);
} catch( ClassCastException cce ) {
cce.printStackTrace();
Modified: branches/jbosstools-3.3.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java
===================================================================
--- branches/jbosstools-3.3.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java 2012-08-21 09:30:10 UTC (rev 43120)
+++ branches/jbosstools-3.3.x/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java 2012-08-21 09:30:33 UTC (rev 43121)
@@ -141,9 +141,11 @@
public static boolean updateParentTimestamps(IPath path) {
return updateParentTimestamps(getFile(path));
}
+
+ // Update only the PARENT timestamps.
public static boolean updateParentTimestamps(de.schlichtherle.io.File file) {
long time = System.currentTimeMillis();
- de.schlichtherle.io.File parent = file;
+ de.schlichtherle.io.File parent = (de.schlichtherle.io.File)file.getParentFile();
boolean b = true;
while( parent != null ) {
b &= parent.setLastModified(time);
12 years, 4 months
JBoss Tools SVN: r43120 - in trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core: util/internal and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-08-21 05:30:10 -0400 (Tue, 21 Aug 2012)
New Revision: 43120
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java
Log:
JBIDE-12280 to trunk
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java 2012-08-21 09:09:07 UTC (rev 43119)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/build/ArchiveBuildDelegate.java 2012-08-21 09:30:10 UTC (rev 43120)
@@ -314,7 +314,7 @@
for( int j = 0; j < matchingFilesets.length; j++ ) {
IStatus[] errors2 = ModelTruezipBridge.deleteFiles(
matchingFilesets[j], matchingFilesets[j].getMatches(globalPath),
- new NullProgressMonitor(), true);
+ new NullProgressMonitor(), false);
errors.addAll(Arrays.asList(errors2));
if( !seen.contains(matchingFilesets[j])) {
seen.add(matchingFilesets[j]);
@@ -343,7 +343,7 @@
}
IStatus[] errors2 = ModelTruezipBridge.copyFiles(matchingFilesets[j],
matchingFilesets[j].getMatches(globalPath),
- new NullProgressMonitor(), true, true);
+ new NullProgressMonitor(), true, false);
errors.addAll(Arrays.asList(errors2));
}
EventManager.fileUpdated(path, matchingFilesets);
@@ -351,6 +351,7 @@
}
+ // NOW do the synch
TrueZipUtil.sync();
Comparator c = new Comparator() {
public int compare(Object o1, Object o2) {
Modified: trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java
===================================================================
--- trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java 2012-08-21 09:09:07 UTC (rev 43119)
+++ trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/TrueZipUtil.java 2012-08-21 09:30:10 UTC (rev 43120)
@@ -141,9 +141,11 @@
public static boolean updateParentTimestamps(IPath path) {
return updateParentTimestamps(getFile(path));
}
+
+ // Update only the PARENT timestamps.
public static boolean updateParentTimestamps(de.schlichtherle.io.File file) {
long time = System.currentTimeMillis();
- de.schlichtherle.io.File parent = file;
+ de.schlichtherle.io.File parent = (de.schlichtherle.io.File)file.getParentFile();
boolean b = true;
while( parent != null ) {
b &= parent.setLastModified(time);
12 years, 4 months