Skip to content

Commit

Permalink
Generating Bill of Material
Browse files Browse the repository at this point in the history
  • Loading branch information
velo committed Nov 23, 2018
1 parent e186003 commit fb600b2
Show file tree
Hide file tree
Showing 2 changed files with 124 additions and 0 deletions.
34 changes: 34 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@
<exclude>mvnw*</exclude>
<exclude>etc/header.txt</exclude>
<exclude>**/.idea/**</exclude>
<exclude>**/target/**</exclude>
<exclude>LICENSE</exclude>
<exclude>**/*.md</exclude>
<exclude>bnd.bnd</exclude>
Expand Down Expand Up @@ -505,6 +506,39 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>io.sundr</groupId>
<artifactId>sundr-maven-plugin</artifactId>
<version>0.14.3</version>
<inherited>false</inherited>
<configuration>
<bomTemplateUrl>file://${project.basedir}/src/config/bom.xml</bomTemplateUrl>
<boms>
<bom>
<artifactId>feign-bom</artifactId>
<name>Feign (Bill Of Materials)</name>

<modules>
<includes>
<include>io.github.openfeign:*</include>
</includes>
<excludes>
<exclude>*:feign-example-*</exclude>
<exclude>*:feign-benchmark</exclude>
</excludes>
</modules>
</bom>
</boms>
</configuration>
<executions>
<execution>
<goals>
<goal>generate-bom</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand Down
90 changes: 90 additions & 0 deletions src/config/bom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2012-2018 The Feign Authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License
is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
or implied. See the License for the specific language governing permissions and limitations under
the License.
-->
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>${model.groupId}</groupId>
<artifactId>${model.artifactId}</artifactId>
<version>${model.version}</version>
<name>${model.name}</name>
<packaging>pom</packaging>
<description>Bill of material</description>
#if ($model.url)

<url>${model.url}</url>#end
#if ($model.licenses && !$model.licenses.isEmpty())

<licenses>#foreach($l in $model.licenses)

<license>
<name>${l.name}</name>
<url>${l.url}</url>
<distribution>${l.distribution}</distribution>
</license>#end

</licenses>
#end

#if ($model.developers && !$model.developers.isEmpty())
<developers>#foreach($d in $model.developers)

<developer>
<id>${d.id}</id>
<name>${d.name}</name>#if($d.email)

<email>${d.email}</email>#end#if($d.url)

<url>${d.url}</url>#end#if($d.organization)

<organization>${d.organization}</organization>#end#if($d.organizationUrl)

<organizationUrl>${d.organizationUrl}</organizationUrl>#end

</developer>#end

</developers>
#end

<dependencyManagement>
<dependencies>#foreach($d in $model.dependencyManagement.dependencies)

<dependency>
<groupId>${d.groupId}</groupId>
<artifactId>${d.artifactId}</artifactId>
<version>${d.version}</version>#if( $d.scope && $!d.scope != '' )

<scope>${d.scope}</scope>#end#if( $d.type && $!d.type != '' && $!d.type != 'jar' && $!d.type != 'bundle')

<type>${d.type}</type>#end#if( $d.classifier && $!d.classifier != '' )

<classifier>${d.classifier}</classifier>#end#if( $d.exclusions && $d.exclusions.size() > 0 )

<exclusions>#foreach( $e in $d.exclusions )

<exclusion>
<groupId>${e.groupId}</groupId>
<artifactId>${e.artifactId}</artifactId>
</exclusion>#end

</exclusions>#end

</dependency>#end

</dependencies>
</dependencyManagement>

</project>

0 comments on commit fb600b2

Please sign in to comment.