I have created 2 applications:
And then I have created a hello-world-service.jar file for the hello-world-service package in my hello-world application.
I cd into hello-world-service-impl directory and execute the maven command "mvn clean package", it thrown the following exception:
I am wondering how to configure maven to get a local copy of my hello-world-service-SNAPSHOT.jar file, rather than going to grab it from my local repository ?
When you created hello-world-service, did you run "mvn install"? That will place the JAR into your local repository. And the local repository is the proper place for the JAR; that is the only place where Maven will look for it.
How is the hello-world-service declared in its POM? And how is it referenced in the hello-world-service-impl POM? If they are short, please post them. If they are long, please attach them.
Also, it appears that Maven can't find two of the Liferay JARs. Have you configured the build to look in the correct repository for those JARs? (I don't know which repository would have those JARs, you might have to look on the Liferay website. If nothing else you can install the JARs in your local repository.
The problem with building hello-world-service-impl is that Maven cannot find the parent POM. Did you build the parent POM using "mvn install"? Doing so will place the parent POM into the local repository so that all the builds can see it.
By the way, where is the parent pom.xml file located? Is it in the same directory as the hello-world-service POM?
Joined: Feb 18, 2011
Your solution works.
Thank you very much indeed for the precise suggestion.