<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.jenkins-ci.plugins</groupId>
    <artifactId>plugin</artifactId>
    <version>1.420</version>
  </parent>

  <groupId>org.jenkins-ci.ruby-plugins</groupId>
  <artifactId><%= @spec.name %></artifactId>
  <version><%= version %></version>
  <name><%= @spec.display_name %></name>
  <description><%= @spec.description %></description>
  <packaging>hpi</packaging>

<% if @spec.url %>
  <url><%= @spec.url %></url>
<% end %>

  <repositories>
    <repository>
      <id>m.g.o-public</id>
      <url>http://maven.glassfish.org/content/groups/public/</url>
    </repository>
  </repositories>

  <developers>
<% each_developer do |id, name, email| %>
    <developer>
      <id><%= id %></id>
      <name><%= name %></name>
<%  if not email.empty? %>
      <email><%= email %></email>
<%  end %>
    </developer>
<% end %>
  </developers>

  <dependencies>
<% @spec.dependencies.each do |k,v| %>
    <dependency>
      <groupId>org.jenkins-ci.plugins</groupId><!-- TODO: needs to figure out correct groupId -->
      <artifactId><%= k %></artifactId>
      <version><%= v %></version>
    </dependency>
<% end %>
  </dependencies>

<% if @spec.repository %>
  <scm>
    <connection>scm:<%= @spec.repository[:type] %>:<%= @spec.repository[:url] %></connection>
  </scm>
<% end %>
</project>
