You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ro...@apache.org on 2007/07/21 14:29:51 UTC
svn commit: r558325 - in /jakarta/httpcomponents/httpclient/trunk: ./
module-client/src/main/java/org/apache/http/client/
module-client/src/main/java/org/apache/http/impl/client/
module-client/src/main/resources/org/apache/http/auth/ module-client/src/...
Author: rolandw
Date: Sat Jul 21 05:29:49 2007
New Revision: 558325
URL: http://svn.apache.org/viewvc?view=rev&rev=558325
Log:
HTTPCLIENT-674: use VersionInfo from core
Added:
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/auth/
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/auth/version.properties (with props)
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/conn/
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/conn/version.properties (with props)
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/cookie/
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/cookie/version.properties (with props)
Removed:
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/client/VersionInfo.java
Modified:
jakarta/httpcomponents/httpclient/trunk/RELEASE_NOTES.txt
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java
jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/client/version.properties
Modified: jakarta/httpcomponents/httpclient/trunk/RELEASE_NOTES.txt
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/RELEASE_NOTES.txt?view=diff&rev=558325&r1=558324&r2=558325
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/RELEASE_NOTES.txt (original)
+++ jakarta/httpcomponents/httpclient/trunk/RELEASE_NOTES.txt Sat Jul 21 05:29:49 2007
@@ -1,5 +1,8 @@
Changes since release 4.0 Alpha 1
+* [HTTPCLIENT-674] use org.apache.http.util.VersionInfo instead of a local one
+ Contributed by Roland Weber <rolandw at apache.org>
+
* [HTTPCLIENT-666] Replaced HttpState with CredentialsProvier and CookieStore interfaces
Contributed by Oleg Kalnichevski <olegk at apache.org>
Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java?view=diff&rev=558325&r1=558324&r2=558325
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/java/org/apache/http/impl/client/DefaultHttpClient.java Sat Jul 21 05:29:49 2007
@@ -43,7 +43,6 @@
import org.apache.http.client.HttpRequestRetryHandler;
import org.apache.http.client.RedirectHandler;
import org.apache.http.client.RoutedRequest;
-import org.apache.http.client.VersionInfo;
import org.apache.http.client.params.AuthPolicy;
import org.apache.http.client.params.CookiePolicy;
import org.apache.http.client.params.HttpClientParams;
@@ -79,6 +78,7 @@
import org.apache.http.protocol.RequestTargetHost;
import org.apache.http.protocol.RequestUserAgent;
import org.apache.http.protocol.SyncBasicHttpContext;
+import org.apache.http.util.VersionInfo;
@@ -127,10 +127,17 @@
HttpVersion.HTTP_1_1);
HttpProtocolParams.setContentCharset(params,
HTTP.DEFAULT_CONTENT_CHARSET);
- HttpProtocolParams.setUserAgent(params,
- "Apache-HttpClient/" + VersionInfo.getReleaseVersion() + " (java 1.4)");
HttpProtocolParams.setUseExpectContinue(params,
true);
+
+ // determine the release version from packaged version info
+ final VersionInfo vi = VersionInfo.loadVersionInfo
+ ("org.apache.http.client", getClass().getClassLoader());
+ final String release = (vi != null) ?
+ vi.getRelease() : VersionInfo.UNAVAILABLE;
+ HttpProtocolParams.setUserAgent(params,
+ "Apache-HttpClient/" + release + " (java 1.4)");
+
return params;
}
Added: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/auth/version.properties
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/auth/version.properties?view=auto&rev=558325
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/auth/version.properties (added)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/auth/version.properties Sat Jul 21 05:29:49 2007
@@ -0,0 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+#
+info.module = HttpClient/auth
+info.release = ${pom.version}
+info.timestamp = ${mvn.timestamp}
+# timestamp requires Maven 2.1
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/auth/version.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/auth/version.properties
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/auth/version.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/client/version.properties
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/client/version.properties?view=diff&rev=558325&r1=558324&r2=558325
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/client/version.properties (original)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/client/version.properties Sat Jul 21 05:29:49 2007
@@ -16,5 +16,7 @@
# specific language governing permissions and limitations
# under the License.
#
-
-httpclient.release=${pom.version}
+info.module = HttpClient
+info.release = ${pom.version}
+info.timestamp = ${mvn.timestamp}
+# timestamp requires Maven 2.1
Added: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/conn/version.properties
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/conn/version.properties?view=auto&rev=558325
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/conn/version.properties (added)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/conn/version.properties Sat Jul 21 05:29:49 2007
@@ -0,0 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+#
+info.module = HttpClient/conn
+info.release = ${pom.version}
+info.timestamp = ${mvn.timestamp}
+# timestamp requires Maven 2.1
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/conn/version.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/conn/version.properties
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/conn/version.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/cookie/version.properties
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/cookie/version.properties?view=auto&rev=558325
==============================================================================
--- jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/cookie/version.properties (added)
+++ jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/cookie/version.properties Sat Jul 21 05:29:49 2007
@@ -0,0 +1,22 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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.
+#
+info.module = HttpClient/cookie
+info.release = ${pom.version}
+info.timestamp = ${mvn.timestamp}
+# timestamp requires Maven 2.1
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/cookie/version.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/cookie/version.properties
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: jakarta/httpcomponents/httpclient/trunk/module-client/src/main/resources/org/apache/http/cookie/version.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain