0

I have maven mojo plugin to get all Absolute path for module. I have sample application with 3 modules and each module has 3 sub modules example.

--Parent module--
             Module 1---  --> In this pom i dont have Parent Artifacts.
                  Child1 Module1 -->
                  Child2 Module1 -->
                  Child3 Module1 --> 

             Module 2 ---  has parent Artifact 
                  Child1 Module2 -->
                  Child2 Module2 -->
                  Child3 Module2 --> 
             Module 3  ---- POM Has parent artifcat   
                   Child1 Module3 -->
                   Child2 Module3 -->
                   Child3 Module3 --> 

When mojo exection starts when it reaches Module1 how to get Parent Artifact in Module1 and i can get Parent Artifact in Module 2 and Module 3 but not inside module 1 please help. Note: I cant able to add Parent Artifact in Module 1 if i added i can get but i need without adding Parent Artifact

chethan
  • 25
  • 7
  • Simple answer. No. If you don't add the parent in module1 you won't get the reactor. And that's the reason why you don't get those informations. I'm just curious what are you trying to accomplish? – khmarbaise Aug 07 '15 at 09:19
  • Actually my plugin needs to get AbsolutePath of all modules and write into xml files and stores and it should be in order of Parent path(Main Application ) --> module 1 --> child module 1 -->Module 2 -->Child Module2 --> Module 3 --> Child Module 3 like this, but Mojo execution takes on Module 1 instead of Parent because Module 1 doesnt have Parent Artifact so Absolute path taking as Module1 --> Child 1Module 1 --> Parent --> Module2 -->Child 2 Module2 like this .I need in correct formate so how to make Mojo works on Parent to child when child doesnt have Parent Artifact. – chethan Aug 07 '15 at 09:29
  • The reactor does not work work that way. The reactor is ordered based on the dependencies between the modules...What would you like to achieve? Why do you need this xml file? For what purpose? – khmarbaise Aug 07 '15 at 13:58

0 Answers0