Maven: Class ‘org.apache.maven.artifact.repository.ArtifactRepository’ cannot be instantiated
1 Comment Published June 17th, 2008 in Java Tags: .This errors could happen executing the release:perform goal in Maven:
[ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Failed to configure plugin parameters for: org.apache.maven.plugins:maven-deploy-plugin:2.2.1 [INFO] check that the following section of the pom.xml is present and correct: [INFO] [INFO] <distributionManagement> [INFO] <!-- use the following if you're not using a snapshot version. --> [INFO] <repository> [INFO] <id>repo</id> [INFO] <name>Repository Name</name> [INFO] <url>scp://host/path/to/repo</url> [INFO] </repository> [INFO] <!-- use the following if you ARE using a snapshot version. --> [INFO] <snapshotRepository> [INFO] <id>repo</id> [INFO] <name>Repository Name</name> [INFO] <url>scp://host/path/to/repo</url> [INFO] </snapshotRepository> [INFO] </distributionManagement> [INFO] Cause: Class 'org.apache.maven.artifact.repository.ArtifactRepository' cannot be instantiated [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch
The funny thing is that I already had the listed section <distributionManagement> in the .pom file.
To fix it, try redoing the release:prepare specifying to the mvn command line “-Dresume=false” as in following:
$ mvn release:prepare -Dresume=false
In my case, the release:prepare was failing at the first time (because I was missing unit tests) and from then on the relese:perform was unsuccesful giving that misleading error. That’s one of the (many) Maven bugs.
Search
Calendar
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « May | Jul » | |||||
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | ||||||
Archives
Categories
- Android (3)
- Apple (27)
- Books (7)
- Eclipse (14)
- Errors (4)
- Firefox (7)
- Git (2)
- Hardware (17)
- Horror Code (8)
- Internet (21)
- Java (102)
- JavaScript (9)
- Life, universe and everything (46)
- Lifehacks (25)
- Linux (51)
- Opinions (26)
- OSX (6)
- Python (1)
- Software (31)
- Speeches and Conferences (8)
- Unix (4)
- Web (23)
- Windows (19)
Tag Cloud
Android apple architecture Bash configuration CSS Development Düsseldorf Eclipse Git Google Hardware hdr How-To Java JAXB job junit Karmic Linux lion MacBook music Open Source Opinion oracle OSX patterns Pitfalls Practices Resume Security Software Suspend TDD Testing tip tonemapped Tricks Ubuntu unix video Web Workaround XML
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.
Blog License
Blogs I like
Books on the desk
Friends' Blogs
- Antonio Terreno & Valter Bernardini
- Bruno Bossola
- Daniele Galluccio
- Domenico Ventura
- Ed Schepis
- Fabrizio Gianneschi
- Luca Grulla
- Luigi Zanderighi
- Marcello Teodori
- Mida Boghetich
- Muralidharan Chandrasekaran
- Piero Ricca
- Renzo Borgatti
- Simone Bordet
- Simone Bruno
- Uberto Barbini
- Valvolog
- Webtide blogs (Greg Wilkins & Jan Bartel)
Links




















In my case, the I’m doing this through Hudson/Jenkins but when I specify the “release version” to do a “tag”, it still gets the branch number and increments that. Annoying!