简体   繁体   English

Liferay-Maven-在默认portlet中缺少工件com.liferay.portal

[英]Liferay - Maven -Missing artifact com.liferay.portal in default portlet

I'm creating a liferay portlet using IDE. 我正在使用IDE创建liferay portlet。 When I create a new portlet using eclipse and select maven, the project which is generated by default gives following error. 当我使用eclipse创建一个新的portlet并选择maven时,默认情况下生成的项目给出以下错误。

PS: I haven't done any modification in it. PS:我没有做任何修改。

 Failed to execute goal on project HelloWorldLR: Could not resolve dependencies for project com.st.nidhi:HelloWorldLR:war:1.0.0-SNAPSHOT: The following artifacts could not be resolved: com.liferay.portal:portal-service:jar:6.2, com.liferay.portal:util-bridges:jar:6.2, com.liferay.portal:util-taglib:jar:6.2, com.liferay.portal:util-java:jar:6.2: Failure to find com.liferay.portal:portal-service:jar:6.2 in 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 -> [Help 1] 

Here is pom.xml fragment where I get error: 这是我收到错误的pom.xml片段:

Missing artifact com.liferay.portal 缺少工件com.liferay.portal

  <dependency> <groupId>com.liferay.portal</groupId> <artifactId>portal-service</artifactId> <version>${liferay.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.liferay.portal</groupId> <artifactId>util-bridges</artifactId> <version>${liferay.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.liferay.portal</groupId> <artifactId>util-taglib</artifactId> <version>${liferay.version}</version> <scope>provided</scope> </dependency> 

I'm using 我正在使用

  • Liferay version: 6.2 Liferay版本:6.2
  • Maven: 3 专家:3
  • Eclipse Luna 蚀月神

Any idea why?? 知道为什么吗?

I had created the properties tag on the pom like this and everything run OK 我像这样在pom上创建了properties标签,一切正常

<properties>
     <liferay.version>6.2.1</liferay.version>
</properties>

We just get the jars from Liferay and install them using "mvn install" command. 我们只是从Liferay中获取jar,然后使用“ mvn install”命令进行安装。 After that make sure you are not using "embeded" maven. 之后,请确保您没有使用“嵌入式” Maven。 Instead use the maven from your maven folder. 而是使用maven文件夹中的maven。 Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM