Commit the patch.

This commit is contained in:
Krzysztof Daniel 2013-03-18 15:12:22 +01:00
parent 00615dca5c
commit 40b525ce12
2 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,36 @@
diff --git a/tycho-core/src/main/java/org/eclipse/tycho/osgi/runtime/TychoOsgiRuntimeLocator.java b/tycho-core/src/main/java/org/eclipse/tycho/osgi/runtime/TychoOsgiRuntimeLocator.java
index 1e878e5..e96a3b8 100644
--- a/tycho-core/src/main/java/org/eclipse/tycho/osgi/runtime/TychoOsgiRuntimeLocator.java
+++ b/tycho-core/src/main/java/org/eclipse/tycho/osgi/runtime/TychoOsgiRuntimeLocator.java
@@ -38,6 +38,7 @@ import org.eclipse.sisu.equinox.embedder.EquinoxRuntimeLocator;
import org.eclipse.tycho.dev.DevWorkspaceResolver;
import org.eclipse.tycho.locking.facade.FileLockService;
import org.eclipse.tycho.locking.facade.FileLocker;
+import org.sonatype.aether.repository.WorkspaceReader;
/**
* Implementation of {@link org.eclipse.sisu.equinox.embedder.EquinoxRuntimeLocator} for Tycho's
@@ -94,6 +95,9 @@ public class TychoOsgiRuntimeLocator implements EquinoxRuntimeLocator {
@Requirement
private DevWorkspaceResolver workspaceState;
+ @Requirement(hint = "ide")
+ private WorkspaceReader workspaceReader;
+
public void locateRuntime(EquinoxRuntimeDescription description) throws MavenExecutionException {
WorkspaceTychoOsgiRuntimeLocator workspaceLocator = WorkspaceTychoOsgiRuntimeLocator
.getResolver(this.workspaceState);
@@ -201,6 +205,13 @@ public class TychoOsgiRuntimeLocator implements EquinoxRuntimeLocator {
Artifact artifact = repositorySystem.createArtifact(dependency.getGroupId(), dependency.getArtifactId(),
dependency.getVersion(), dependency.getType());
+ if (workspaceReader != null) {
+ File artifactFile = workspaceReader.findArtifact(artifact);
+ if (artifactFile != null) {
+ artifact.setFile(artifactFile);
+ }
+ }
+
ArtifactResolutionRequest request = new ArtifactResolutionRequest();
request.setArtifact(artifact);
request.setResolveRoot(true).setResolveTransitively(false);

View File

@ -8,7 +8,7 @@
Name: tycho
Version: 0.17.0
Release: 0.6.git3351b1%{?dist}
Release: 0.7.git3351b1%{?dist}
Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven
Group: Development/Libraries
@ -270,6 +270,9 @@ install -m 644 $osgiJarPath $RPM_BUILD_ROOT%{_javadir}/%{name}/osgi.jar
%{_javadocdir}/%{name}
%changelog
* Mon Mar 18 2013 Krzysztof Daniel <kdaniel@redhat.com> 0.17.0-0.7.git3351b1
- Commit the patch.
* Mon Mar 18 2013 Krzysztof Daniel <kdaniel@redhat.com> 0.17.0-0.6.git3351b1
- Use plexus to instantiate workspace reader.