With a storm-starter, when trying to build a package using maven, The twitter4j-core and twitter4j-stream are always not found, reporting Failure to transfer org. twitter4j: twitter4j-core: 2.2.6-SNAPSHOT ................
The reason is that Storm-starter uses the twitter4j warehouse to download the two packages of twitter4j-core, and twitter4j is already under great wall shield.
I tried to use a proxy to solve this problem because some problems occurred in the virtual machine environment.
Later, I found a solution on the official website of twitter4j. Modify the pom file and download it from the maven main repository.
The procedure is as follows:
Modify the pom file m2-pom.xml for Storm-Starter and modify the dependency versions of the twitter4j-core and twitter4j-stream packages in dependency, as shown below:
<Dependency>
<GroupId> org. twitter4j </groupId>
<ArtifactId> twitter4j-core </artifactId>
<Version> [2.2,) </version>
</Dependency>
<Dependency>
<GroupId> org. twitter4j </groupId>
<ArtifactId> twitter4j-stream </artifactId>
<Version> [2.2,) </version>
</Dependency>
The reason is that the original snapshot version is not available in the central repository.
In addition, the twitter4j.org repository can be deleted from the configuration file to speed up download.