Skip to content

Instantly share code, notes, and snippets.

@davido
Last active December 31, 2015 23:39
Show Gist options
  • Select an option

  • Save davido/8061413 to your computer and use it in GitHub Desktop.

Select an option

Save davido/8061413 to your computer and use it in GitHub Desktop.
make singleusergroup plugin to compile aganst 2.8 stable
diff --git a/pom.xml b/pom.xml
index 7336fbe..53d0088 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@ limitations under the License.
<properties>
<Gerrit-ApiType>plugin</Gerrit-ApiType>
- <Gerrit-ApiVersion>2.9-SNAPSHOT</Gerrit-ApiVersion>
+ <Gerrit-ApiVersion>2.8</Gerrit-ApiVersion>
</properties>
<build>
@@ -85,7 +85,7 @@ limitations under the License.
<repositories>
<repository>
<id>gerrit-api-repository</id>
- <url>https://gerrit-api.commondatastorage.googleapis.com/snapshot/</url>
+ <url>https://gerrit-api.commondatastorage.googleapis.com/release/</url>
</repository>
</repositories>
</project>
@nnutter
Copy link
Copy Markdown

nnutter commented Dec 20, 2013

I tried that but it still can't find com.google.gerrit:gerrit-plugin-api:jar:2.8:

$ mvn package -U
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building singleusergroup 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://gerrit-api.commondatastorage.googleapis.com/release/com/google/gerrit/gerrit-plugin-api/2.8/gerrit-plugin-api-2.8.pom
Downloading: http://repo.maven.apache.org/maven2/com/google/gerrit/gerrit-plugin-api/2.8/gerrit-plugin-api-2.8.pom
[WARNING] The POM for com.google.gerrit:gerrit-plugin-api:jar:2.8 is missing, no dependency information available
Downloading: https://gerrit-api.commondatastorage.googleapis.com/release/com/google/gerrit/gerrit-plugin-api/2.8/gerrit-plugin-api-2.8.jar
Downloading: http://repo.maven.apache.org/maven2/com/google/gerrit/gerrit-plugin-api/2.8/gerrit-plugin-api-2.8.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.129s
[INFO] Finished at: Fri Dec 20 15:22:03 CST 2013
[INFO] Final Memory: 7M/17M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project singleusergroup: Could not resolve dependencies for project com.googlesource.gerrit.plugins.singleusergroup:singleusergroup:jar:1.0-SNAPSHOT: Could not find artifact com.google.gerrit:gerrit-plugin-api:jar:2.8 in gerrit-api-repository (https://gerrit-api.commondatastorage.googleapis.com/release/) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

@davido
Copy link
Copy Markdown
Author

davido commented Dec 20, 2013

Works here, something is wrong on your site:

wget https://gerrit-api.commondatastorage.googleapis.com/release/com/google/gerrit/gerrit-plugin-api/2.8/gerrit-plugin-api-2.8.pom--2013-12-20 23:43:13--  https://gerrit-api.commondatastorage.googleapis.com/release/com/google/gerrit/gerrit-plugin-api/2.8/gerrit-plugin-api-2.8.pom
Resolving gerrit-api.commondatastorage.googleapis.com (gerrit-api.commondatastorage.googleapis.com)... 173.194.69.132, 2a00:1450:4008:c01::84
Connecting to gerrit-api.commondatastorage.googleapis.com (gerrit-api.commondatastorage.googleapis.com)|173.194.69.132|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 442 [application/octet-stream]
Saving to: `gerrit-plugin-api-2.8.pom'

100%[============================================================================================================================================>] 442         --.-K/s   in 0s

2013-12-20 23:43:14 (83.6 MB/s) - `gerrit-plugin-api-2.8.pom' saved [442/442]

@nnutter
Copy link
Copy Markdown

nnutter commented Dec 20, 2013

Strange I can get both the POM and the JAR with curl/wget. I found I can install the file to the local repository manually:

wget https://gerrit-api.commondatastorage.googleapis.com/release/com/google/gerrit/gerrit-plugin-api/2.8/gerrit-plugin-api-2.8.jar
mvn install:install-file \
    -DgroupId=com.google.gerrit \
    -DartifactId=gerrit-plugin-api \
    -Dversion=2.8 \
    -Dpackaging=jar \
    -Dfile=gerrit-plugin-api-2.8.jar

And now I can build singleusergroup! Thanks for your help!

@davido
Copy link
Copy Markdown
Author

davido commented Dec 20, 2013

weird.

@davido
Copy link
Copy Markdown
Author

davido commented Dec 20, 2013

You are wellcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment