• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

 
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
 
author
Posts: 3281
8
Mac OS X Eclipse IDE Java
  • 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
Posts: 3281
8
Mac OS X Eclipse IDE Java
  • 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
 
And tomorrow is the circus! We can go to the circus! I love the circus! We can take this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic