kopia lustrzana https://github.com/gaul/s3proxy
Prepend S3Proxy version in User-Agent header
This only includes the version in the main package and not the unit test. Fixes #136.pull/190/head
rodzic
62b7c53eae
commit
5ee5cf6c53
12
pom.xml
12
pom.xml
|
|
@ -119,6 +119,18 @@
|
|||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
|
||||
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ import com.google.inject.Module;
|
|||
|
||||
import org.jclouds.Constants;
|
||||
import org.jclouds.ContextBuilder;
|
||||
import org.jclouds.JcloudsVersion;
|
||||
import org.jclouds.blobstore.BlobStore;
|
||||
import org.jclouds.blobstore.BlobStoreContext;
|
||||
import org.jclouds.location.reference.LocationConstants;
|
||||
|
|
@ -251,6 +252,12 @@ public final class Main {
|
|||
Constants.PROPERTY_CREDENTIAL + "\n");
|
||||
}
|
||||
|
||||
properties.setProperty(Constants.PROPERTY_USER_AGENT,
|
||||
String.format("s3proxy/%s jclouds/%s java/%s",
|
||||
Main.class.getPackage().getImplementationVersion(),
|
||||
JcloudsVersion.get(),
|
||||
System.getProperty("java.version")));
|
||||
|
||||
ContextBuilder builder = ContextBuilder
|
||||
.newBuilder(provider)
|
||||
.credentials(identity, credential)
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ import org.eclipse.jetty.util.component.AbstractLifeCycle;
|
|||
|
||||
import org.jclouds.Constants;
|
||||
import org.jclouds.ContextBuilder;
|
||||
import org.jclouds.JcloudsVersion;
|
||||
import org.jclouds.blobstore.BlobStore;
|
||||
import org.jclouds.blobstore.BlobStoreContext;
|
||||
import org.jclouds.logging.slf4j.config.SLF4JLoggingModule;
|
||||
|
|
@ -184,6 +185,12 @@ final class TestUtils {
|
|||
String virtualHost = info.getProperties().getProperty(
|
||||
S3ProxyConstants.PROPERTY_VIRTUAL_HOST);
|
||||
|
||||
info.getProperties().setProperty(Constants.PROPERTY_USER_AGENT,
|
||||
String.format("s3proxy/%s jclouds/%s java/%s",
|
||||
TestUtils.class.getPackage().getImplementationVersion(),
|
||||
JcloudsVersion.get(),
|
||||
System.getProperty("java.version")));
|
||||
|
||||
ContextBuilder builder = ContextBuilder
|
||||
.newBuilder(provider)
|
||||
.credentials(identity, credential)
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue