Вопрос

I'll like to know, what's the recommended way of updating maven repository metadata?

The scenario I'm working with is such that the content of maven-cargo plugin metadata is stale and does not reflect an updated repository metadata, hence, my reason to change it.

For example, I have this in maven-metadata-central.xml for the maven-cargo plugin:

<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-cargo-plugin</artifactId>
</metadata>

Whereas the updated version should be this:

<?xml version="1.0" encoding="UTF-8"?>
<metadata>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>cargo-maven2-plugin</artifactId>
</metadata>

How do I go about this?

Thanks

Это было полезно?

Решение

Add below into settings.xml (This makes maven to use the specified group first.

<pluginGroups>
      <!-- pluginGroup
      | Specifies a further group identifier to use for plugin lookup.
      <pluginGroup>com.your.plugins</pluginGroup>
      -->
      <pluginGroup>org.codehaus.cargo</pluginGroup>
  </pluginGroups>

And add below into your pom.xml

<configuration>
   <container>
     <containerId>jetty6x</containerId>
     <type>embedded</type>
   </container>
 </configuration>

see http://maven.apache.org/guides/introduction/introduction-to-plugin-prefix-mapping.html

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top