Eu estou tentando utilizar o Maven para automatizar o processo de build aqui da empresa, mas, não entendo o que há de errado. O meu problema é para baixar as libs do Hibernate, isto porque eu estou recebendo uma mensagem do tipo Unable to find resource … mas o meu POM esta apontando justamente para o repo do Hibernate e eu consigo navegar normalmente neste repo pelo browser. Troquei as versões várias vezes mas eu não consigo baixar as dependências, para explicar melhor, segue abaixo o POM.
OBS: Vale a pena ressalvar que tem um outro POM aqui com as dependências do Icefaces que roda normal, mesmo com o repo local .m2 vazio, então isto me leva a crer que não é um problema de conexão.
D:\workspace2\TestesHibernate>mvn clean install -e
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - com.vero:Hiber:jar:0.0.1-SNAPSHOT
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\workspace2\TestesHibernate\src\main\resources
Downloading: http://repo1.maven.org/maven2/org/hibernate/hibernate-core/3.5.6-Final/hibernate-core-3.5.6-Final.pom
[INFO] Unable to find resource 'org.hibernate:hibernate-core:pom:3.5.6-Final' in repository jboss-repo (https://repository.jboss.org/nexus/content/repositories/releases/)
Downloading: http://repo1.maven.org/maven2/org/hibernate/hibernate-core/3.5.6-Final/hibernate-core-3.5.6-Final.pom
[INFO] Unable to find resource 'org.hibernate:hibernate-core:pom:3.5.6-Final' in repository JBoss Repository (http://repository.jboss.org/nexus/content/groups/public-jboss)
Downloading: http://repo1.maven.org/maven2/org/hibernate/hibernate-core/3.5.6-Final/hibernate-core-3.5.6-Final.pom
[INFO] Unable to find resource 'org.hibernate:hibernate-core:pom:3.5.6-Final' in repository central (http://repo1.maven.org/maven2)
Downloading: http://repo1.maven.org/maven2/org/hibernate/hibernate-core/3.5.6-Final/hibernate-core-3.5.6-Final.jar
[INFO] Unable to find resource 'org.hibernate:hibernate-core:jar:3.5.6-Final' in repository jboss-repo (https://repository.jboss.org/nexus/content/repositories/releases/)
Downloading: http://repo1.maven.org/maven2/org/hibernate/hibernate-core/3.5.6-Final/hibernate-core-3.5.6-Final.jar
[INFO] Unable to find resource 'org.hibernate:hibernate-core:jar:3.5.6-Final' in repository JBoss Repository (http://repository.jboss.org/nexus/content/groups/public-jboss)
Downloading: http://repo1.maven.org/maven2/org/hibernate/hibernate-core/3.5.6-Final/hibernate-core-3.5.6-Final.jar
[INFO] Unable to find resource 'org.hibernate:hibernate-core:jar:3.5.6-Final' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
Missing:
----------
1) org.hibernate:hibernate-core:jar:3.5.6-Final
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.hibernate -DartifactId=hibernate-core -Dversion=3.5.6-Final -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.hibernate -DartifactId=hibernate-core -Dversion=3.5.6-Final -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) com.vero:Hiber:jar:0.0.1-SNAPSHOT
2) org.hibernate:hibernate-core:jar:3.5.6-Final
----------
1 required artifact is missing.
for artifact:
com.vero:Hiber:jar:0.0.1-SNAPSHOT
from the specified remote repositories:
remote-repos (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Missing:
----------
1) org.hibernate:hibernate-core:jar:3.5.6-Final
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.hibernate -DartifactId=hibernate-core -Dversion=3.5.6-Final -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.hibernate -DartifactId=hibernate-core -Dversion=3.5.6-Final -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) com.vero:Hiber:jar:0.0.1-SNAPSHOT
2) org.hibernate:hibernate-core:jar:3.5.6-Final
----------
1 required artifact is missing.
for artifact:
com.vero:Hiber:jar:0.0.1-SNAPSHOT
from the specified remote repositories:
remote-repos (http://repo1.maven.org/maven2)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:711)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing:
----------
1) org.hibernate:hibernate-core:jar:3.5.6-Final
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.hibernate -DartifactId=hibernate-core -Dversion=3.5.6-Final -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.hibernate -DartifactId=hibernate-core -Dversion=3.5.6-Final -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) com.vero:Hiber:jar:0.0.1-SNAPSHOT
2) org.hibernate:hibernate-core:jar:3.5.6-Final
----------
1 required artifact is missing.
for artifact:
com.vero:Hiber:jar:0.0.1-SNAPSHOT
from the specified remote repositories:
remote-repos (http://repo1.maven.org/maven2)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:360)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:304)
at org.apache.maven.plugin.DefaultPluginManager.resolveTransitiveDependencies(DefaultPluginManager.java:1499)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:442)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Thu Feb 03 11:29:48 BRST 2011
[INFO] Final Memory: 8M/19M
[INFO] ------------------------------------------------------------------------
D:\workspace2\TestesHibernate>