---
title: "Cannot create instance of interface org.apache.maven.artifact.repository.Artifac"
author: "nomandia"
date: "2016-02-26T18:09:52Z"
tags: []
categories: ["企业架构"]
slug: "cannot-create-instance-of-interface-org-apache-maven-artifact-repository-artifac"
draft: false
lastmod: "2016-02-26T18:09:52Z"
id: 2279158
url: "https://nomandia.iteye.com/blog/2279158"
---

maven构建子模块时报错，cmd如下：

mvn archetype:create -DgroupId=com.niciware -DartifactId=upt-web -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false

 

\[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:create (default-cli) on project upt: Unable to parse configuration of mojo org.apache.maven.plugins:maven-archetype-plugin:2.4:create for parameter #: Cannot create instance of interface org.apache.maven.artifact.repository.ArtifactRepository: org.apache.maven.artifact.repository.ArtifactRepository.&lt;init&gt;() -&gt; \[Help 1]

 

很简单，只要吧 create 换成 generate

mvn archetype:generate -DgroupId=com.niciware -DartifactId=upt-web -DarchetypeArtifactId=maven-archetype-webapp -DinteractiveMode=false