掲示板

Liferay Portal Plugin using Maven - ArtifactTransferException

8年前 に Ranjith M Nair によって更新されました。

Liferay Portal Plugin using Maven - ArtifactTransferException

New Member 投稿: 9 参加年月日: 12/12/15 最新の投稿
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
8年前 に Gregory Amerson によって更新されました。

RE: Liferay Portal Plugin using Maven - ArtifactTransferException (回答)

Liferay Legend 投稿: 1123 参加年月日: 10/02/16 最新の投稿
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
8年前 に Ranjith M Nair によって更新されました。

RE: Liferay Portal Plugin using Maven - ArtifactTransferException

New Member 投稿: 9 参加年月日: 12/12/15 最新の投稿
Thank you very much, it worked.
7年前 に Francesco Savino によって更新されました。

RE: Liferay Portal Plugin using Maven - ArtifactTransferException

New Member 投稿: 20 参加年月日: 17/02/22 最新の投稿
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
7年前 に Andy Wu によって更新されました。

RE: Liferay Portal Plugin using Maven - ArtifactTransferException

Regular Member 投稿: 195 参加年月日: 15/05/05 最新の投稿
hey Francessco, can you try to create maven portlet via command line (e.g. mvn archetype:generate ...) to see it is network problem.