Skip to content

Commit

Permalink
Skip plugins with scope test
Browse files Browse the repository at this point in the history
  • Loading branch information
rubendel committed Feb 10, 2017
1 parent 5bee859 commit e47654c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
26 changes: 14 additions & 12 deletions Shared/src/org/bimserver/plugins/PluginManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -275,20 +275,22 @@ public void dumpStructure(int indent) {
} else {
// Snapshot projects linked in Eclipse
ArtifactRequest request = new ArtifactRequest();
request.setArtifact(dependency2.getArtifact());
request.setRepositories(mavenPluginRepository.getLocalRepositories());
try {
ArtifactResult resolveArtifact = mavenPluginRepository.getSystem().resolveArtifact(mavenPluginRepository.getSession(), request);
if (resolveArtifact.getArtifact().getFile() != null) {
bimServerDependencies.add(new org.bimserver.plugins.Dependency(resolveArtifact.getArtifact().getFile().toPath()));
} else {
// TODO error?
if (!depend.getScope().equals("test")) {
request.setArtifact(dependency2.getArtifact());
request.setRepositories(mavenPluginRepository.getLocalRepositories());
try {
ArtifactResult resolveArtifact = mavenPluginRepository.getSystem().resolveArtifact(mavenPluginRepository.getSession(), request);
if (resolveArtifact.getArtifact().getFile() != null) {
bimServerDependencies.add(new org.bimserver.plugins.Dependency(resolveArtifact.getArtifact().getFile().toPath()));
} else {
// TODO error?
}
} catch (Exception e) {
e.printStackTrace();
}
} catch (ArtifactResolutionException e) {
e.printStackTrace();
}


// bimServerDependencies.add(new org.bimserver.plugins.Dependency(resolveArtifact.getArtifact().getFile().toPath()));
}
}

CollectRequest collectRequest = new CollectRequest();
Expand Down
7 changes: 1 addition & 6 deletions Tests/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<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>
<artifactId>Tests</artifactId>
<artifactId>tests</artifactId>
<parent>
<groupId>org.opensourcebim</groupId>
<artifactId>parent</artifactId>
Expand Down Expand Up @@ -42,11 +42,6 @@
<artifactId>xsom</artifactId>
<version>20140925</version>
</dependency>
<dependency>
<groupId>org.opensourcebim</groupId>
<artifactId>pluginbase</artifactId>
<version>1.5.66-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.opensourcebim</groupId>
<artifactId>bimserverjar</artifactId>
Expand Down

0 comments on commit e47654c

Please sign in to comment.