Skip to content

Instantly share code, notes, and snippets.

@mosabua
Created November 9, 2012 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mosabua/4048052 to your computer and use it in GitHub Desktop.
Save mosabua/4048052 to your computer and use it in GitHub Desktop.
Creating a new Nexus Plugin with the Archetype
No repo hooked in, empty local repository, Maven 3.0.4
mvn archetype:generate -Dfilter=nexus-plugin-archetype
[INFO] Scanning for projects...
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom (5 KB at 11.6 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/18/maven-plugins-18.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/18/maven-plugins-18.pom (13 KB at 127.0 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/16/maven-parent-16.pom
.....
ownloaded: http://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy/1.8.3/groovy-1.8.3.jar (5394 KB at 128.7 KB/sec)
[INFO] Generating project in Interactive mode
[INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1: remote -> org.sonatype.nexus.archetypes:nexus-plugin-archetype (-)
Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 1
Choose org.sonatype.nexus.archetypes:nexus-plugin-archetype version:
1: 1.0
2: 1.1
3: 1.2
4: 2.1-RC1
5: 2.1
6: 2.1.1
7: 2.1.2
8: 2.2-SNAPSHOT
9: 2.2
10: 2.2-01
11: 2.2.1
Choose a number: 11:
Downloading: http://repo.maven.apache.org/maven2/org/sonatype/nexus/archetypes/nexus-plugin-archetype/2.2.1/nexus-plugin-archetype-2.2.1.jar
Downloaded: http://repo.maven.apache.org/maven2/org/sonatype/nexus/archetypes/nexus-plugin-archetype/2.2.1/nexus-plugin-archetype-2.2.1.jar (7 KB at 29.0 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/sonatype/nexus/archetypes/nexus-plugin-archetype/2.2.1/nexus-plugin-archetype-2.2.1.pom
Downloaded: http://repo.maven.apache.org/maven2/org/sonatype/nexus/archetypes/nexus-plugin-archetype/2.2.1/nexus-plugin-archetype-2.2.1.pom (3 KB at 18.2 KB/sec)
Define value for property 'groupId': : com.simpligility.nexus.plugins
Define value for property 'artifactId': : nexus-sample-plugin
Define value for property 'version': 1.0-SNAPSHOT: :
Define value for property 'package': com.simpligility.nexus.plugins: :
[INFO] Using property: nexusVersion = 2.2.1
Confirm properties configuration:
groupId: com.simpligility.nexus.plugins
artifactId: nexus-sample-plugin
version: 1.0-SNAPSHOT
package: com.simpligility.nexus.plugins
nexusVersion: 2.2.1
Y: :
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: nexus-plugin-archetype:2.2.1
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.simpligility.nexus.plugins
[INFO] Parameter: artifactId, Value: nexus-sample-plugin
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: com.simpligility.nexus.plugins
[INFO] Parameter: packageInPathFormat, Value: com/simpligility/nexus/plugins
[INFO] Parameter: package, Value: com.simpligility.nexus.plugins
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: nexusVersion, Value: 2.2.1
[INFO] Parameter: groupId, Value: com.simpligility.nexus.plugins
[INFO] Parameter: artifactId, Value: nexus-sample-plugin
[INFO] project created from Archetype in dir: /Volumes/mac-data/dev/nexus-sample-plugin
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:54.507s
[INFO] Finished at: Fri Nov 09 12:28:07 PST 2012
[INFO] Final Memory: 15M/247M
[INFO] ------------------------------------------------------------------------
Manfreds-MacBook-Pro:dev manfred$
Now here comes the problem..
Manfreds-MacBook-Pro:dev manfred$ cd nexus-sample-plugin/
Manfreds-MacBook-Pro:nexus-sample-plugin manfred$ mvn clean install
[INFO] Scanning for projects...
Downloading: http://repo.maven.apache.org/maven2/org/sonatype/plugins/app-lifecycle-maven-plugin/1.4/app-lifecycle-maven-plugin-1.4.pom
Downloaded: http://repo.maven.apache.org/maven2/org/sonatype/plugins/app-lifecycle-maven-plugin/1.4/app-lifecycle-maven-plugin-1.4.pom (10 KB at 24.9 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/sonatype/plugin
....
at 15.2 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/emma/emma/2.0.5312/emma-2.0.5312.jar (419 KB at 98.2 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/com/google/guava/guava/10.0.1/guava-10.0.1.jar (1467 KB at 129.9 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/2.2.1/apache-maven-2.2.1-bin.tar.gz (2775 KB at 189.2 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3:17.804s
[INFO] Finished at: Fri Nov 09 12:32:03 PST 2012
[INFO] Final Memory: 13M/119M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project nexus-sample-plugin: Could not resolve dependencies for project com.simpligility.nexus.plugins:nexus-sample-plugin:nexus-plugin:1.0-SNAPSHOT: The following artifacts could not be resolved: commons-httpclient:commons-httpclient:jar:3.1.SONATYPE, org.restlet:org.restlet:jar:1.1.6-SONATYPE-5348-V4, org.restlet:org.restlet.ext.fileupload:jar:1.1.6-SONATYPE-5348-V4, org.restlet:org.restlet.ext.velocity:jar:1.1.6-SONATYPE-5348-V4, org.restlet:org.restlet.ext.jaxrs:jar:1.1.6-SONATYPE-5348-V4, com.noelios.restlet:com.noelios.restlet:jar:1.1.6-SONATYPE-5348-V4, com.noelios.restlet:com.noelios.restlet.ext.httpclient:jar:1.1.6-SONATYPE-5348-V4, com.noelios.restlet:com.noelios.restlet.ext.servlet:jar:1.1.6-SONATYPE-5348-V4, com.carrotsearch:junit-benchmarks:jar:0.3.0-SONATYPE, org.apache.maven.indexer:indexer-artifact:jar:4.1.3-SONATYPE, org.apache.maven.indexer:indexer-core:jar:4.1.3-SONATYPE, com.googlecode.junit-ext:junit-ext:jar:junit45:1.0-RC3: Could not find artifact commons-httpclient:commons-httpclient:jar:3.1.SONATYPE in central (http://repo.maven.apache.org/maven2) -> [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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment