Skip to content

Commit

Permalink
Fix maven broken link (apache#6068)
Browse files Browse the repository at this point in the history
Signed-off-by: xiaolong.ran [email protected]

Motivation
maven broken link:
Currently, maven requires all links that start with https to download the required lib.

Same issue reference to: https://support.sonatype.com/hc/en-us/articles/360041287334

lookup pulsar-io-solr package error as follows:
2020-01-16T11:39:08.1688765Z [ERROR] Failed to execute goal on project pulsar-io-solr: Could not resolve dependencies for project org.apache.pulsar:pulsar-io-solr:jar:2.5.0: Failed to collect dependencies at org.apache.solr:solr-core:jar:7.5.0 -> org.restlet.jee:org.restlet:jar:2.3.0: Failed to read artifact descriptor for org.restlet.jee:org.restlet:jar:2.3.0: Could not transfer artifact org.restlet.jee:org.restlet:pom:2.3.0 from/to maven-restlet (http://maven.restlet.org): Authorization failed for http://maven.restlet.org/org/restlet/jee/org.restlet/2.3.0/org.restlet-2.3.0.pom 403 Forbidden -> [Help 1]
Modifications
Replace
http://central.maven.org/maven2/org/apache/pulsar/pulsar-common/1.22.0-incubating/pulsar-common-1.22.0-incubating.jar
with
https://repo1.maven.org/maven2/org/apache/pulsar/pulsar-common/2.4.2/pulsar-common-2.4.2.jar in FunctionCommonTest.java

add a new address for pulsar-io-solr

* Fix maven broken link

Signed-off-by: xiaolong.ran <[email protected]>

* fix ci error

Signed-off-by: xiaolong.ran <[email protected]>

* fix repository id of spring

Signed-off-by: xiaolong.ran <[email protected]>

* fix other links

Signed-off-by: xiaolong.ran <[email protected]>
  • Loading branch information
wolfstudy authored Jan 17, 2020
1 parent 97f9431 commit 8cf56f2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1686,5 +1686,9 @@ flexible messaging model and an intuitive client API.</description>
<name>bintray</name>
<url>https://yahoo.bintray.com/maven</url>
</repository>
<repository>
<id>spring-plugins-release</id>
<url>https://repo.spring.io/plugins-release/</url>
</repository>
</repositories>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void testValidateLocalFileUrl() throws Exception {
@Test
public void testValidateHttpFileUrl() throws Exception {

String jarHttpUrl = "http://central.maven.org/maven2/org/apache/pulsar/pulsar-common/1.22.0-incubating/pulsar-common-1.22.0-incubating.jar";
String jarHttpUrl = "https://repo1.maven.org/maven2/org/apache/pulsar/pulsar-common/2.4.2/pulsar-common-2.4.2.jar";
FunctionCommon.extractClassLoader(jarHttpUrl);

jarHttpUrl = "http://_invalidurl_.com";
Expand All @@ -72,7 +72,7 @@ public void testValidateHttpFileUrl() throws Exception {

@Test
public void testDownloadFile() throws Exception {
String jarHttpUrl = "http://central.maven.org/maven2/org/apache/pulsar/pulsar-common/1.22.0-incubating/pulsar-common-1.22.0-incubating.jar";
String jarHttpUrl = "https://repo1.maven.org/maven2/org/apache/pulsar/pulsar-common/2.4.2/pulsar-common-2.4.2.jar";
String testDir = FunctionCommonTest.class.getProtectionDomain().getCodeSource().getLocation().getPath();
File pkgFile = new File(testDir, UUID.randomUUID().toString());
FunctionCommon.downloadFromHttpUrl(jarHttpUrl, pkgFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1432,7 +1432,7 @@ public void testListFunctionsSuccess() {

@Test
public void testDownloadFunctionHttpUrl() throws Exception {
String jarHttpUrl = "http://central.maven.org/maven2/org/apache/pulsar/pulsar-common/1.22.0-incubating/pulsar-common-1.22.0-incubating.jar";
String jarHttpUrl = "https://repo1.maven.org/maven2/org/apache/pulsar/pulsar-common/2.4.2/pulsar-common-2.4.2.jar";
String testDir = FunctionApiV2ResourceTest.class.getProtectionDomain().getCodeSource().getLocation().getPath();
FunctionsImplV2 function = new FunctionsImplV2(() -> mockedWorkerService);
StreamingOutput streamOutput = (StreamingOutput) function.downloadFunction(jarHttpUrl, null).getEntity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,7 @@ public void testOnlyGetSources() {

@Test
public void testDownloadFunctionHttpUrl() throws Exception {
String jarHttpUrl = "http://central.maven.org/maven2/org/apache/pulsar/pulsar-common/1.22.0-incubating/pulsar-common-1.22.0-incubating.jar";
String jarHttpUrl = "https://repo1.maven.org/maven2/org/apache/pulsar/pulsar-common/2.4.2/pulsar-common-2.4.2.jar";
String testDir = FunctionApiV3ResourceTest.class.getProtectionDomain().getCodeSource().getLocation().getPath();
WorkerService worker = mock(WorkerService.class);
doReturn(true).when(worker).isInitialized();
Expand Down
2 changes: 1 addition & 1 deletion site2/docs/io-kafka-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Here is an example of using the Kafka source connecter with the configuration fi
1. Download a Kafka client and a Kafka connector.

```bash
$ wget http://central.maven.org/maven2/org/apache/kafka/kafka-clients/0.10.2.1/kafka-clients-0.10.2.1.jar
$ wget https://repo1.maven.org/maven2/org/apache/kafka/kafka-clients/0.10.2.1/kafka-clients-0.10.2.1.jar

$ wget https://archive.apache.org/dist/pulsar/pulsar-2.4.0/connectors/pulsar-io-kafka-2.4.0.nar
```
Expand Down

0 comments on commit 8cf56f2

Please sign in to comment.