Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Arun Merum
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Arun Merum
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic