File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes Problem with the Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Problem with the "mvn test" command missing EJB client jar artifact" Watch "Problem with the "mvn test" command missing EJB client jar artifact" New topic
Author

Problem with the "mvn test" command missing EJB client jar artifact

Arun Merum
Greenhorn

Joined: Aug 31, 2010
Posts: 7
Hi,
I have a multi module project where in my webModule depends on the ejbModule's ejb-client jar file.

While the mvn package and mvn release commands seem to be okay, mvn test gives me the cannot-find-the-artifact error that too after running all the test cases.

However if I modify the dependency type from ejb-client to client in the webModule's pom.xml file, the mvn test command works fine. But even with the mvn surefire-report report command would give me the cannot-find-the-artifact error for the ejbModule.

I had had enough googling and donno what to do. Is there anybody who had faced this error before? Thanks in advance.

Webmodule's pom.xml file

ejbModule's pom.xml file

parent pom.xml file



Regards,
Arun
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi Arun and welcome to Javaranch! Would it be possible for you to edit your post and UseCodeTags? Thanks!

In terms of mvn test, are you running mvn clean test?


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Arun Merum
Greenhorn

Joined: Aug 31, 2010
Posts: 7
Hi,
I'm afraid I am pretty new to both javaranch and maven. Thanks for pointing out. I have corrected it.

Yes I'm using mvn clean test command.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

OK, the best thing to do is to read the free online PDF "Maven the Definitive Guide" by Sonatype (who have many Maven core committers working for them).

In particular take a look at what the different scopes mean (compile, test, provided etc).

Hint: You might need to change one of the compile scopes to a runtime scope....
Arun Merum
Greenhorn

Joined: Aug 31, 2010
Posts: 7
Hi,
Anyways thanks for your concern. I am done with my analysis with the scopes and the maven complete guide book. I had tried setting the scope of the ejb-client to test, runtime, provided and compile but without success.

Merci beaucoup
Arun
Arun Merum
Greenhorn

Joined: Aug 31, 2010
Posts: 7
Hi,
Anyways thanks for your concern. I am done with my analysis with the scopes and the maven complete guide book. I had tried setting the scope of the ejb-client to test, runtime, provided and compile but without success.

Merci beaucoup
Arun
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with the "mvn test" command missing EJB client jar artifact