view keyring/pom.xml @ 911:03948c38134a

Introduce Service and ExtensionPoint annotations Thermostat currently has a large number of interfaces that are meant to be used as services (where a client obtains an instance of the interface from OSGi) or as extension points (where a client registers an instance of the interface as an OSGi service and thermostat makes use of it). There is no clear indication of which interfaces are what. Clarify this by introducing two annotations @Service and @ExtensionPoint that should be used to document the purpose of the interface. These annotations do not imply any behaviour and are for documentation purposes only. Also introduce an annotation processor that writes "plugin-docs.xml" files containing some basic documentation about classes marked with @Service or @ExtensionPoint. Nothing explicit needs to be done to invoke the annotation processor, simply including a dependency on thermostat-annotations (needed to use @Service/@ExtensionPoint anyway) is enough. These xml files are not included in the jars. Reviewed-by: ebaron, jerboaa, vanaltj Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2013-January/004983.html PR1255
author Omair Majid <omajid@redhat.com>
date Tue, 15 Jan 2013 13:00:50 -0500
parents cf634ed45556
children ff1e3f5611b0
line wrap: on
line source

<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>

  <parent>
    <artifactId>thermostat</artifactId>
    <groupId>com.redhat.thermostat</groupId>
    <version>0.5.0-SNAPSHOT</version>
  </parent>
  
  <artifactId>thermostat-keyring</artifactId>
  <packaging>bundle</packaging>
  <name>Thermostat Keyring API</name>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Bundle-Activator>com.redhat.thermostat.utils.keyring.activator.Activator</Bundle-Activator>
	        <Bundle-SymbolicName>com.redhat.thermostat.keyring</Bundle-SymbolicName>
	        <Private-Package>com.redhat.thermostat.utils.keyring.activator</Private-Package>
            <Export-Package>com.redhat.thermostat.utils.keyring</Export-Package>
            <Bundle-Vendor>Red Hat, Inc.</Bundle-Vendor>
            <!-- Do not autogenerate uses clauses in Manifests -->
            <_nouses>true</_nouses>
          </instructions>
        </configuration>
      </plugin>
    
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <systemPropertyVariables>
              <com.redhat.thermostat.utils.keyring.provider>com.redhat.thermostat.utils.keyring.MemoryKeyring</com.redhat.thermostat.utils.keyring.provider>
            </systemPropertyVariables>
            <argLine>-Djava.library.path=${project.build.directory}/ ${coverageAgent}</argLine>
          </configuration>
      </plugin>
      
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.2.1</version>
        <executions>  
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>exec</goal>
            </goals>
          </execution>  
        </executions>
        <configuration>
          <executable>make</executable>
          <arguments>
            <argument>all</argument>
          </arguments>
          <systemProperties>
            <systemProperty>
              <key>JAVA_HOME</key>
              <value>${java.home}</value>
            </systemProperty>
          </systemProperties>
        </configuration>
      </plugin>
    </plugins>
    <pluginManagement>
	  <plugins>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <versionRange>[1.2.1,)</versionRange>
                    <goals>
                      <goal>exec</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore></ignore>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.compendium</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.redhat.thermostat</groupId>
      <artifactId>thermostat-annotations</artifactId>
      <version>${project.version}</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
</project>