Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

Commit

Permalink
Break out the dependency-scrobbling bits from BuildTool and possibly
Browse files Browse the repository at this point in the history
be smarter about gathering stuff.
  • Loading branch information
bobmcwhirter committed Nov 13, 2015
1 parent 4dcb04b commit 9476c4a
Show file tree
Hide file tree
Showing 8 changed files with 817 additions and 368 deletions.
Expand Up @@ -2,8 +2,6 @@

import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;

/**
* @author Bob McWhirter
Expand Down Expand Up @@ -156,10 +154,10 @@ public String mavenGav() {
this.version;
}

public String repoPath(boolean forClasspath) {
public String repoPath(boolean forJar) {
char delim = File.separatorChar;

if (forClasspath) {
if (forJar) {
delim = '/';
}

Expand Down
Expand Up @@ -37,6 +37,7 @@ public void addEntry(MavenArtifactDescriptor entry) {
this.entries.add( entry );
}


public void addEntry(String gav) throws IOException {
String[] parts = gav.split(":");

Expand All @@ -55,8 +56,8 @@ public void addEntry(String groupId, String artifactId, String type, String clas
this.entries.add(new MavenArtifactDescriptor(groupId, artifactId, type, classifier, version));
}

public List<MavenArtifactDescriptor> getEntries() {
return Collections.unmodifiableList(this.entries);
public List<? extends MavenArtifactDescriptor> getEntries() {
return Collections.unmodifiableList( this.entries);
}

public WildFlySwarmBootstrapConf(InputStream in) throws IOException {
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Expand Up @@ -125,6 +125,7 @@
<systemPropertyVariables>
<jboss.bind.address>127.0.0.1</jboss.bind.address>
<maven.repo.local>${maven.repo.local}</maven.repo.local>
<project.version>${project.version}</project.version>
</systemPropertyVariables>
</configuration>
</plugin>
Expand Down
7 changes: 4 additions & 3 deletions tools/src/main/java/org/wildfly/swarm/tools/ArtifactSpec.java
Expand Up @@ -16,7 +16,6 @@
package org.wildfly.swarm.tools;

import java.io.File;
import java.io.IOException;

import org.wildfly.swarm.bootstrap.util.MavenArtifactDescriptor;

Expand All @@ -33,14 +32,16 @@ public class ArtifactSpec extends MavenArtifactDescriptor {

public boolean gathered = false;

public static ArtifactSpec fromMscGav(String gav) throws IOException {
public boolean bootstrapped = false;

public static ArtifactSpec fromMscGav(String gav) {
String[] parts = gav.split(":");
if (parts.length == 3) {
return new ArtifactSpec("compile", parts[0], parts[1], parts[2], "jar", null, null);
} else if (parts.length == 4) {
return new ArtifactSpec("compile", parts[0], parts[1], parts[2], "jar", parts[3], null);
} else {
throw new IOException("Invalid gav: " + gav);
throw new RuntimeException("Invalid gav: " + gav);
}
}

Expand Down

0 comments on commit 9476c4a

Please sign in to comment.