0

Is it possible for a maven wagon jar to also be a plugin. To achieve this requires to set the packaging to maven-plugin. Is this going to cause any repercussions with regards to the wagon?

gkatzioura
  • 2,655
  • 2
  • 26
  • 39
  • Can you explain more in detail what you like to achieve ? – khmarbaise Jan 12 '19 at 09:14
  • I have developed a maven wagon. I want to add some maven mojos to my wagon project. Wagons are in the form of jars. In order to make this plugin operating as a plugin I need to change the packaging to maven-plugin. Thus are there gonna be any repercussions on the wagon usage due to changing the packaging? – gkatzioura Jan 12 '19 at 09:48
  • Can you please add an example project to show what you are doing? What kind of Wagon have you developed? For what purpose? – khmarbaise Jan 12 '19 at 09:53
  • Edited the original question. Added the wagon project on the feature branch that also implements the plugin functionality. The wagon uploads artefacts to s3. I also added plugin functionality to upload/download files to s3 (thus the need for a plugin). – gkatzioura Jan 12 '19 at 10:42
  • You know that many of them already exist for example: https://github.com/spring-projects/aws-maven ? – khmarbaise Jan 12 '19 at 10:52
  • Yes I know. The project I implemented gives support on google, aws and azure and also gives some extra configuration options. – gkatzioura Jan 12 '19 at 11:02
  • In any case, is having a plugin that is simultaneously a wagon a bad practise according to the maven standards? – gkatzioura Jan 12 '19 at 14:04

1 Answers1

0

From a technical perspective a maven wagon can be a maven plugin simultaneously and it shall operate as expected wether used as a wagon or a plugin.

gkatzioura
  • 2,655
  • 2
  • 26
  • 39