Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

target Maven 3.1 #155

Merged
merged 2 commits into from
Dec 16, 2013
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.0.5</version>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.0.5</version>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
Expand Down Expand Up @@ -173,7 +173,7 @@
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.6.0</version>
<version>3.8.0</version>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just 3.8.1?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be. 3.8.1 just came out. I'll make that change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh, didn't notice this was opened a while ago.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

made the change in 66b1a7e . This pull request should fix Spoon for Maven users

<configuration>
<sdk>
<platform>16</platform>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectHelper;
import org.sonatype.aether.RepositorySystem;
import org.sonatype.aether.RepositorySystemSession;
import org.sonatype.aether.collection.CollectRequest;
import org.sonatype.aether.collection.CollectResult;
import org.sonatype.aether.collection.DependencyCollectionException;
import org.sonatype.aether.graph.Dependency;
import org.sonatype.aether.graph.DependencyNode;
import org.sonatype.aether.graph.DependencyVisitor;
import org.sonatype.aether.repository.RemoteRepository;
import org.sonatype.aether.resolution.ArtifactRequest;
import org.sonatype.aether.resolution.ArtifactResolutionException;
import org.sonatype.aether.resolution.ArtifactResult;
import org.sonatype.aether.resolution.DependencyRequest;
import org.sonatype.aether.util.artifact.DefaultArtifact;
import org.eclipse.aether.RepositorySystem;
import org.eclipse.aether.RepositorySystemSession;
import org.eclipse.aether.collection.CollectRequest;
import org.eclipse.aether.collection.CollectResult;
import org.eclipse.aether.collection.DependencyCollectionException;
import org.eclipse.aether.graph.Dependency;
import org.eclipse.aether.graph.DependencyNode;
import org.eclipse.aether.graph.DependencyVisitor;
import org.eclipse.aether.repository.RemoteRepository;
import org.eclipse.aether.resolution.ArtifactRequest;
import org.eclipse.aether.resolution.ArtifactResolutionException;
import org.eclipse.aether.resolution.ArtifactResult;
import org.eclipse.aether.resolution.DependencyRequest;
import org.eclipse.aether.artifact.DefaultArtifact;

import static com.squareup.spoon.SpoonRunner.DEFAULT_OUTPUT_DIRECTORY;
import static org.apache.maven.plugins.annotations.LifecyclePhase.INTEGRATION_TEST;
Expand Down Expand Up @@ -188,7 +188,7 @@ private File getApplicationApk() throws MojoExecutionException {
"Could not find application. Ensure 'apk' dependency on it exists.");
}

private org.sonatype.aether.artifact.Artifact aetherArtifact(Artifact dep)
private org.eclipse.aether.artifact.Artifact aetherArtifact(Artifact dep)
throws MojoExecutionException {
return resolveArtifact(dep.getGroupId(), dep.getArtifactId(), "apk", dep.getVersion());
}
Expand All @@ -199,7 +199,7 @@ private String getSpoonClasspath() throws MojoExecutionException {
String spoonVersion = findMyVersion();
log.debug("[getSpoonClasspath] Plugin version: " + spoonVersion);

org.sonatype.aether.artifact.Artifact spoonRunner =
org.eclipse.aether.artifact.Artifact spoonRunner =
resolveArtifact(SPOON_GROUP_ID, SPOON_RUNNER_ARTIFACT_ID, "jar", spoonVersion);
log.debug("[getSpoonClasspath] Runner artifact: " + spoonRunner);

Expand All @@ -216,7 +216,7 @@ private String findMyVersion() throws MojoExecutionException {
throw new MojoExecutionException("Could not find reference to Spoon plugin artifact.");
}

private org.sonatype.aether.artifact.Artifact resolveArtifact(String groupId, String artifactId,
private org.eclipse.aether.artifact.Artifact resolveArtifact(String groupId, String artifactId,
String extension, String version) throws MojoExecutionException {
ArtifactRequest request = new ArtifactRequest();
request.setArtifact(new DefaultArtifact(groupId, artifactId, extension, version));
Expand All @@ -230,7 +230,7 @@ private org.sonatype.aether.artifact.Artifact resolveArtifact(String groupId, St
}
}

private String createClasspath(org.sonatype.aether.artifact.Artifact artifact)
private String createClasspath(org.eclipse.aether.artifact.Artifact artifact)
throws MojoExecutionException {
// Request a collection of all dependencies for the artifact.
DependencyRequest dependencyRequest = new DependencyRequest();
Expand All @@ -255,9 +255,9 @@ private String createClasspath(org.sonatype.aether.artifact.Artifact artifact)
log.debug("Visiting: " + node);

// Resolve the dependency node artifact into a real, local artifact.
org.sonatype.aether.artifact.Artifact resolvedArtifact;
org.eclipse.aether.artifact.Artifact resolvedArtifact;
try {
org.sonatype.aether.artifact.Artifact nodeArtifact = node.getDependency().getArtifact();
org.eclipse.aether.artifact.Artifact nodeArtifact = node.getDependency().getArtifact();
resolvedArtifact =
resolveArtifact(nodeArtifact.getGroupId(), nodeArtifact.getArtifactId(), "jar",
nodeArtifact.getVersion());
Expand Down