This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Problem while Creating Project by using mvn archetype:create -DgroupId=com.mycompany Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Problem while Creating Project by using mvn archetype:create -DgroupId=com.mycompany" Watch "Problem while Creating Project by using mvn archetype:create -DgroupId=com.mycompany" New topic
Author

Problem while Creating Project by using mvn archetype:create -DgroupId=com.mycompany

Ceenu Reddy
Greenhorn

Joined: Nov 16, 2006
Posts: 9
Hi,

I have installed(Version 2.0.4-maestro-1.1) and trying to create Project by using: mvn archetype:create -DgroupId=com.mycompany. But I am getting following problem:

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'archetype'.
[INFO] org.apache.maven.plugins: checking for updates from central
[WARNING] repository metadata for: 'org.apache.maven.plugins' could not be retri
eved from repository: central due to an error: Error transferring file
[INFO] Repository 'central' will be blacklisted
Downloading: http://repo.mergere.com/maven2/org/apache/maven/plugins/maven-compi
ler-plugin/2.0/maven-compiler-plugin-2.0.pom
[WARNING] Unable to get resource from repository central (http://repo.mergere.co
m/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: org.apache.maven.plugins
ArtifactId: maven-compiler-plugin
Version: 2.0

Reason: Unable to download the artifact from any repository

org.apache.maven.plugins:maven-compiler-plugin om:2.0

from the specified remote repositories:
central (http://repo.mergere.com/maven2)


[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 42 seconds
[INFO] Finished at: Thu Nov 16 15:11:43 IST 2006
[INFO] Final Memory: 1M/2M
[INFO] ------------------------------------------------------------------------

Please help friends.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16091
    
  21

It looks like Maven could not download needed components from the mergere repository. I checked, and I got the indicated file to download myself, so mostly likely you had network issues. Try it again and see if the problem still exists. If so, get ahold of a network tech and ask why you can't get access to that location.


Customer surveys are for companies who didn't pay proper attention to begin with.
Ceenu Reddy
Greenhorn

Joined: Nov 16, 2006
Posts: 9
Actually we are behind a firewall in my office, we will have to set up Maven to understand that. To do this, I have changed <your-homedirectory>/.m2/settings.xml file with the following content:

<settings>
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxy.mycompany.com</host>
<port>8080</port>
<username>your-username</username>
<password>your-password</password>
</proxy>
</proxies>
</settings>

Thank you very much Tim.
Vincent Zhao
Greenhorn

Joined: Jul 09, 2008
Posts: 28
No luck for me! Can anybody help me out? Thanks in advance.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5835
    
    7

Vincent, it might help if you described your situation a little more, including what you have tried (post any config changes) and what errors you got. Otherwise, all we can say is do what Ceenu did to get around the proxy server issues.


JBoss In Action
Jayaraj Jaganathan
Ranch Hand

Joined: Jun 29, 2009
Posts: 70
Ceenu Reddy wrote:Actually we are behind a firewall in my office, we will have to set up Maven to understand that. To do this, I have changed <your-homedirectory>/.m2/settings.xml file with the following content:

<settings>
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxy.mycompany.com</host>
<port>8080</port>
<username>your-username</username>
<password>your-password</password>
</proxy>
</proxies>
</settings>

Thank you very much Tim.


the above solution works for me. thanks
Aditya Narayan
Greenhorn

Joined: Sep 17, 2012
Posts: 17
Dear Vincent.
I had similar problem. I reconfigured the settings.xml file too.But nothing worked till i switched off the windows firewall . After that the things were working smoothly
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem while Creating Project by using mvn archetype:create -DgroupId=com.mycompany