Fórum

Liferay Portal Plugin using Maven - ArtifactTransferException

Ranjith M Nair, modificado 8 Anos atrás.

Liferay Portal Plugin using Maven - ArtifactTransferException

New Member Postagens: 9 Data de Entrada: 15/12/12 Postagens Recentes
Hi,
I was in the process of setting and develop a poc using Liferay 7x.
And i downloaded liferay 7 tomcat bundle and it is running fine along with that i downloaded eclipse Mars.1 based liferay IDE.
When i tried to create a new liferay maven plugin project using wizard, it is throwing an error like "Error creating liferay plugin project, Please see eclipse error log for more details" and noticed below mentioned error in the logs.

This is what i tried, File->New->Liferay->Liferay Plugin Project. And In the wizard,
I gave the project name and display name as well as chose Maven as build type.
I provided the artifact version and group id and selected Liferay runtime and provided profile version.
And selected the profile version as Liferay.7x.
Then selected the profile location as "Project Pom.xml".
Plugin type is Portlet and clicked on finish.
And at this point, i am getting "Error creating liferay plugin project, Please see eclipse error log for more details" and below is the stack from the logs.

One more thing, i tried from office by setting proper proxy in settings.xml and from home with out any proxy, and both results the same error.
In the eclipse's maven setting of Liferay, the artifact for this is given as com.liferay.maven.archetypes:liferay-portlet-spring-mvc-archetype:7.0.0-m5.

If anybody faced this issue, please help on this. I went through many forums with similar issues, but most of times issues were on the proxy settings. But for me other maven arch downloads works fine since my proxy seems fine, but still this one is failing.
Any help is appreciated.

Below is the stack from log
STACK FROM ERROR LOG

org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer com.liferay.maven.archetypes:liferay-portlet-spring-mvc-archetype:pom:7.0.0-m5 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact com.liferay.maven.archetypes:liferay-portlet-spring-mvc-archetype:pom:7.0.0-m5 from/to central (https://repo.maven.apache.org/maven2): connect timed out
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:238)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:206)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:585)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:503)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)
at org.eclipse.m2e.core.internal.embedder.MavenImpl$5.call(MavenImpl.java:753)
at org.eclipse.m2e.core.internal.embedder.MavenImpl$5.call(MavenImpl.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:112)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.resolve(MavenImpl.java:743)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.resolve(MavenImpl.java:720)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.resolveArchetype(ProjectConfigurationManager.java:870)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.createArchetypeProjects0(ProjectConfigurationManager.java:784)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$5.call(ProjectConfigurationManager.java:760)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager$5.call(ProjectConfigurationManager.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:176)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:151)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:99)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1355)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.createArchetypeProjects(ProjectConfigurationManager.java:758)
at com.liferay.ide.maven.core.NewMavenPluginProjectProvider.createNewProject(NewMavenPluginProjectProvider.java:179)
at com.liferay.ide.maven.core.NewMavenPluginProjectProvider.createNewProject(NewMavenPluginProjectProvider.java:1)
at com.liferay.ide.project.core.model.NewLiferayPluginProjectOpMethods.execute(NewLiferayPluginProjectOpMethods.java:93)
at com.liferay.ide.project.core.model.NewLiferayPluginProjectOp$Impl.execute(Unknown Source)
at org.eclipse.sapphire.ui.forms.swt.SapphireWizard.performFinish(SapphireWizard.java:370)
at org.eclipse.sapphire.ui.forms.swt.SapphireWizard$3.run(SapphireWizard.java:334)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
thumbnail
Gregory Amerson, modificado 8 Anos atrás.

RE: Liferay Portal Plugin using Maven - ArtifactTransferException (Resposta)

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
That version of the spring mvc archetype doesn't exist. So you will need to change the archetype version that is used in the preferences

Preferences > Liferay > Maven

and set the spring mvc archetype to this
com.liferay.maven.archetypes:liferay-portlet-spring-mvc-archetype:6.2.5
Ranjith M Nair, modificado 8 Anos atrás.

RE: Liferay Portal Plugin using Maven - ArtifactTransferException

New Member Postagens: 9 Data de Entrada: 15/12/12 Postagens Recentes
Thank you very much, it worked.
Francesco Savino, modificado 7 Anos atrás.

RE: Liferay Portal Plugin using Maven - ArtifactTransferException

New Member Postagens: 20 Data de Entrada: 22/02/17 Postagens Recentes
Hi I am in the same situation , downloaded the IDE with Liferay 7 installed , but creating a Liferay Plugin Project I got :

!MESSAGE Could not resolve archetype com.liferay.maven.archetypes:liferay-portlet-archetype:6.2.5 from any of the configured repositories.
!STACK 1
org.eclipse.core.runtime.CoreException: Could not resolve artifact com.liferay.maven.archetypes:liferay-portlet-archetype:pom:6.2.5
at org.eclipse.m2e.core.internal.embedder.MavenImpl$5.call(MavenImpl.java:776)

can you help me ?

thanks
thumbnail
Andy Wu, modificado 7 Anos atrás.

RE: Liferay Portal Plugin using Maven - ArtifactTransferException

Regular Member Postagens: 195 Data de Entrada: 05/05/15 Postagens Recentes
hey Francessco, can you try to create maven portlet via command line (e.g. mvn archetype:generate ...) to see it is network problem.