0

I have a maven based project, which after execution I want to install all the generated jars to the maven repository. I cannot add additional jar details in the pom.xml because the additional jars are not static.

The only option for me to add them through a custom mojo. I have created my own mojo and installed the main project jars.

What would be the best way to attach the additional generated jars. I tried the method, addAttachedArtifact(..) in MavenProject and it installed the additional jar files but not generating a default pom.xml for the additional jar files.

I m not sure what would be the best way to indicate to generate default pom.xml for additional jars while installing into the maven repository.

Thanks in advance!

Daisy
  • 1
  • 2
  • It would be helpful if there is a way for me to indicate to generate the default pom.xml for each additional jar – Daisy Nov 23 '17 at 10:28
  • What do you mean the additional jar's are not static? You need them to compile and unit test the project ? Can you explain more in detail what your problem is... – khmarbaise Nov 23 '17 at 10:30
  • In my application, I get certain inputs from the user and generate java files and finally jar files based on the inputs. The name of the jars will vary based in user inputs. And I need them during overall build of the project. I will have the information about the generated jars. But when installing in the maven repository I know only the jar. If I install the jars in the repository through my mojo, the default pom.xml is not generated for the additional jars. – Daisy Nov 25 '17 at 07:07

0 Answers0