Creating a project interactively Taking a lot of time

I run the Maven the command *mvn archetype:generate* in command Prompt It shows [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Stub Project (No POM) 1 [INFO] ------------------------------------------------------------------------ [INFO] >>> maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom >>> [INFO] <<< maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom <<< [INFO] --- maven-archetype-plugin:2.2:generate (default-cli) @ standalone-pom --- [INFO] Generating project in Interactive mode 

I am using Maven version 3.0.5. It takes a lot of time about 30 minutes to create custom projects from the repository.

I don’t know why it takes so long

+7
repository build maven-3 maven-plugin
source share
2 answers

After entering mvn archetype:generate maven scans remote repositories for all available archetypes, so in the case of a low level of connection, this can take a lot of time.

I did an experiment. I took the Internet channel (downloading the torrent file) and running the command - and it seemed to be hanging. But as soon as I paused the download of maven, a list of 858 available archetypes.

If you know for sure that writing the archetype of -DinteractiveMode=false you can use the -DinteractiveMode=false parameter ( official page ).

Example:
mvn archetype:generate
-DgroupId=my.groupid
-DartifactId=my-artifactId
-DarchetypeArtifactId=archetype-artifactId
-DinteractiveMode=false

+5
source share

Based on my personal experience,


It depends on the speed / bandwidth of your internet connection. You may try to close other applications that are blocking bandwidth.

If you are a Windows user, follow these steps:

To check which other applications are obstructing your Internet connection, run the following command at a command prompt:

"netstat -a -n -o"

It will provide you with a list of processes that use your connection.

Try to terminate other processes not related to the process (with the exception of system processes and the maven process) through the task manager. This will solve the problem.

+1
source share

All Articles