1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
|
---
layout: default
class: Header
title: Bundle-Developers ...
summary: Lists the bundle developers according to the Maven bundle-developers pom entry
---
/*
* Bundle-Developers header
*/
private void doBundleDevelopers(BundleDevelopers annotation) throws IOException {
StringBuilder sb = new StringBuilder(annotation.value());
if (annotation.name() != null) {
sb.append(";name='");
escape(sb, annotation.name());
sb.append("'");
}
if (annotation.roles() != null) {
sb.append(";roles='");
escape(sb,annotation.roles());
sb.append("'");
}
if (annotation.organizationUrl() != null) {
sb.append(";organizationUrl='");
escape(sb,annotation.organizationUrl());
sb.append("'");
}
if (annotation.organization() != null) {
sb.append(";organization='");
escape(sb,annotation.organization());
sb.append("'");
}
if (annotation.timezone() != 0)
sb.append(";timezone=").append(annotation.timezone());
add(Constants.BUNDLE_DEVELOPERS, sb.toString());
}
/**
* Maven defines developers and developers in the POM. This annotation will
* generate a (not standardized by OSGi) Bundle-Developers header.
* <p>
* A deve
* <p>
* This annotation can be used directly on a type or it can 'color' an
* annotation. This coloring allows custom annotations that define a specific
* developer. For example:
*
* <pre>
* @BundleContributor("Peter.Kriens@aQute.biz")
* @interface pkriens {}
*
* @pkriens
* public class MyFoo {
* ...
* }
* </pre>
*
* Duplicates are removed before the header is generated and the coloring does
* not create an entry in the header, only an annotation on an actual type is
* counted. This makes it possible to make a library of developers without
* then adding them all to the header.
* <p>
* {@see https://maven.apache.org/pom.html#Developers}
*/
@Retention(RetentionPolicy.CLASS)
@Target({
ElementType.ANNOTATION_TYPE, ElementType.TYPE
})
public @interface BundleDevelopers {
/**
* The email address of the developer.
*/
String value();
/**
* The display name of the developer. If not specified, the {@link #value()}
* is used.
*/
String name() default "";
/**
* The roles this developer plays in the development.
*/
String[] roles() default {};
/**
* The name of the organization where the developer works for.
*/
String organization() default "";
/**
* The url of the organization where the developer works for.
*/
String organizationUrl() default "";
/**
* Time offset in hours from UTC without Daylight savings
*/
int timezone() default 0;
}
|