Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Refer service builder jar in many portlet in Liferay 6.2 using maven
Hello All,
Am trying to refer the service builder jar in other portlet module.
project-a
project-a-portlet
project-a-portlet-service.
in project project-b pom.xml i have provided below dependency.
<dependency>
<groupId>some group id</groupId>
<artifactId>project-a-portlet-service</artifactId>
<version>1.0.0</version>
</dependency>
I observed a strage behaviour. project-a-portlet-service.jar is including at runtime but not at compile time.
When I extract the project-b.war could see the project-a-portlet-service.jar in web-inf/lib folder. But it is not there at compile time.
Please let me know If am missing anything in project-b pom.xml
Am trying to refer the service builder jar in other portlet module.
project-a
project-a-portlet
project-a-portlet-service.
in project project-b pom.xml i have provided below dependency.
<dependency>
<groupId>some group id</groupId>
<artifactId>project-a-portlet-service</artifactId>
<version>1.0.0</version>
</dependency>
I observed a strage behaviour. project-a-portlet-service.jar is including at runtime but not at compile time.
When I extract the project-b.war could see the project-a-portlet-service.jar in web-inf/lib folder. But it is not there at compile time.
Please let me know If am missing anything in project-b pom.xml
It should not be there either at compile time nor runtime, there is nothing magical about service builder with respect to maven.
Maven looks up and includes artifacts from a repository.
To share your service jar, you need to publish it to a local repository. If you are a sole developer, you can just use the mvn install command to push the artifacts to the .m2 local cache. If you are a team, then you need a nexus or artifactory to be your local repository.
Maven looks up and includes artifacts from a repository.
To share your service jar, you need to publish it to a local repository. If you are a sole developer, you can just use the mvn install command to push the artifacts to the .m2 local cache. If you are a team, then you need a nexus or artifactory to be your local repository.
Hello David,
Thanks a lot for your quick reply ....
Its was a basic mistake from my end. I did not do the maven update for my project.
I did , now I could see the jar in maven dependency.
Thanks a lot for your quick reply ....
Its was a basic mistake from my end. I did not do the maven update for my project.
I did , now I could see the jar in maven dependency.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™