Generuję projekt w InteliJ IDEA 14.
File -> New -> Project -> Maven -> Create from archetype -> wybieram maven-archetype-quickstart
Następnie wybieram Maven 3, który mam na dysku (nie wybieram tego "bundled"). Podanie groupId, artifactId itd.
I dostaję taki komunikat:
"C:\Program Files\Java\jdk1.8.0_73\bin\java" "-Dmaven.home=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.1.4\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.1.4\plugins\maven\lib\maven3\bin\m2.conf" -Dfile.encoding=windows-1250 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.1.4\plugins\maven\lib\maven3\boot\plexus-classworlds-2.4.jar" org.codehaus.classworlds.Launcher -Didea.version=14.1.4 -DinteractiveMode=false -DgroupId=com.app -DartifactId=FirstApp -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=RELEASE org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.4:generate (default-cli) @ standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.4:generate (default-cli) @ standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.4:generate (default-cli) @ standalone-pom ---
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/archetype/archetype-descriptor/2.4/archetype-descriptor-2.4.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25.373s
[INFO] Finished at: Wed Aug 03 11:48:43 CEST 2016
[INFO] Final Memory: 8M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-archetype-plugin:2.4:generate failed: Plugin org.apache.maven.plugins:maven-archetype-plugin:RELEASE or one of its dependencies could not be resolved: Could not transfer artifact org.apache.maven.archetype:archetype-descriptor:jar:2.4 from/to central (http://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:80 [repo.maven.apache.org/151.101.12.215] failed: Connection timed out: connect -> [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/PluginResolutionException
[ERROR] Maven execution terminated abnormally (exit code 1)
I w zasadzie nie tworzy się żadna struktura typu src/java itd.
a pom.xml wygląda tak:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.app</groupId>
<artifactId>FirstApp</artifactId>
<version>1.0-SNAPSHOT</version>
</project>