deploy artifacts to multiple maven repositories

Hi All,
Is there any way that I can deploy maven artifacts to multiple central maven repositories, means say if I have 2 maven repositories “A”  and “B” so when I do ‘mvn deploy’ will it be possible to deploy artifacts to these two repositories simultaneously.

Any help in this regard will be highly appertiated.

Thanks,
sahareyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rumi78Commented:
Configure deploy plugin multiple times:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<executions>
<execution>
  <phase>deploy</phase>
    <goals>
      <goal>deploy-file</goal>
    </goals>
    <configuration>
      <packaging>jar</packaging>
      <generatePom>true</generatePom>
      <url>${project.distributionManagement.repository.url}</url>
      <artifactId>${project.artifactId}</artifactId>
      <groupId>${project.groupId}</groupId>
      <version>${project.version}</version>
      <file>${project.build.directory}/${project.build.finalName}.jar</file>
    </configuration>
  </execution>
</executions>
</plugin>

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sahareyAuthor Commented:
I am looking into this solution, but did not find feasible as I did not have to deploy the artifacts only to 2 repo but to 3, and also this operation will increase my build time drastically.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.