diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2012-11-12 17:12:47 +0100 |
---|---|---|
committer | Julien HENRY <julien.henry@sonarsource.com> | 2012-11-12 17:16:42 +0100 |
commit | 66beca8acfc87f94d343765d630a7cee986a04a4 (patch) | |
tree | 7759813e69ffd1d768ddfbc32bcff48e4375f366 /sonar-ws-client | |
parent | 5bf38605be76726351c0831cc67d7141952e4a2e (diff) | |
download | sonarqube-66beca8acfc87f94d343765d630a7cee986a04a4.tar.gz sonarqube-66beca8acfc87f94d343765d630a7cee986a04a4.zip |
SONAR-3950 Make pom.xml of ws-client more maintainable
- Fix indent
- Use property to enforce same version of Maven deps and OSGI Resuire-Bundle
- remove scope=provided as optional=true is enough
Diffstat (limited to 'sonar-ws-client')
-rw-r--r-- | sonar-ws-client/pom.xml | 83 |
1 files changed, 44 insertions, 39 deletions
diff --git a/sonar-ws-client/pom.xml b/sonar-ws-client/pom.xml index 435db7abccf..0ff26169da5 100644 --- a/sonar-ws-client/pom.xml +++ b/sonar-ws-client/pom.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<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"> +<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> <groupId>org.codehaus.sonar</groupId> @@ -11,7 +12,13 @@ <name>Sonar :: Web Service Client</name> <description>Java library to request Sonar web services</description> + <properties> + <httpclient4.version>4.2.2</httpclient4.version> + </properties> + <dependencies> + <!-- Don't forget to update configuration of the m-bundle-p (especially Require-Bundle) + according to changes you make on dependencies --> <dependency> <groupId>com.googlecode.json-simple</groupId> <artifactId>json-simple</artifactId> @@ -20,14 +27,12 @@ <groupId>commons-httpclient</groupId> <artifactId>commons-httpclient</artifactId> <version>3.1</version> - <scope>provided</scope> <optional>true</optional> </dependency> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> - <version>4.2.1</version> - <scope>provided</scope> + <version>${httpclient4.version}</version> <optional>true</optional> </dependency> @@ -82,41 +87,41 @@ <build> <plugins> - <plugin> - <groupId>org.apache.felix</groupId> - <artifactId>maven-bundle-plugin</artifactId> - <version>2.3.7</version> - <extensions>true</extensions> - <configuration> - <instructions> - <Import-Package>!*</Import-Package> - <Require-Bundle>org.apache.httpcomponents.httpclient;bundle-version="4.2.2";optional="true", - org.apache.httpcomponents.httpcore;bundle-version="4.2.2";optional="true", - com.googlecode.json-simple - </Require-Bundle> - <Export-Package>!.,org.sonar.wsclient, - org.sonar.wsclient.connectors, - org.sonar.wsclient.services</Export-Package> - </instructions> - </configuration> - <executions> - <execution> - <id>bundle-manifest</id> - <phase>process-classes</phase> - <goals> - <goal>manifest</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <artifactId>maven-jar-plugin</artifactId> - <configuration> - <archive> - <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile> - </archive> - </configuration> - </plugin> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <version>2.3.7</version> + <extensions>true</extensions> + <configuration> + <instructions> + <Import-Package>!*</Import-Package> + <Require-Bundle>org.apache.httpcomponents.httpclient;bundle-version="${httpclient4.version}";optional="true", + org.apache.httpcomponents.httpcore;bundle-version="${httpclient4.version}";optional="true", + com.googlecode.json-simple + </Require-Bundle> + <Export-Package>!.,org.sonar.wsclient, + org.sonar.wsclient.connectors, + org.sonar.wsclient.services</Export-Package> + </instructions> + </configuration> + <executions> + <execution> + <id>bundle-manifest</id> + <phase>process-classes</phase> + <goals> + <goal>manifest</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-jar-plugin</artifactId> + <configuration> + <archive> + <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile> + </archive> + </configuration> + </plugin> </plugins> </build> </project> |