私はMavenプロジェクトをうまく構築していますが、私はtwitter4jへの参照を追加しようとしています。maven-bundle-pluginを使用したエラー埋め込み依存
だから私はPOMにこれを追加します。
<dependency>
<groupId>org.twitter4j</groupId>
<artifactId>twitter4j-core</artifactId>
<version>[2.2,)</version>
<type>jar</type>
<optional>false</optional>
<scope>compile</scope>
</dependency>
私は(MVNクリーンインストール)を構築すると私が取得:
[ERROR] Error building bundle net.stevex.tweetfetcher:tweetfetcher-bundle:bundle:1.0-SNAPSHOT : Unresolved references to [twitter4j] by class(es) on the Bundle-Classpath[Jar:dot]: [net/stevex/tweetfetcher/impl/TweetFetcherImpl.class]
これは理にかなって... twitter4jパッケージが中に埋め込まれていませんバンドル。
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
そして、私が構築したときに、今、私が手::だから私は、Mavenのバンドル・プラグインの指示に埋め込み、依存関係を追加
[ERROR] Error building bundle net.stevex.tweetfetcher:tweetfetcher-bundle:bundle:1.0-SNAPSHOT : Unresolved references to [dalvik.system, javax.crypto, javax.crypto.spec, javax.management, javax.management.openmbean, org.apache.commons.logging, org.apache.log4j, org.slf4j.impl, twitter4j.internal.http.alternative] by class(es) on the Bundle-Classpath[Jar:dot, Jar:twitter4j-core-2.2.3.jar]: [twitter4j/internal/logging/CommonsLoggingLogger.class, twitter4j/internal/logging/Log4JLoggerFactory.class, twitter4j/auth/OAuthToken.class, twitter4j/internal/http/HttpClientFactory.class, twitter4j/auth/OAuthAuthorization.class, twitter4j/internal/logging/Log4JLogger.class, twitter4j/conf/ConfigurationBase.class, twitter4j/TwitterAPIMonitor.class, twitter4j/internal/logging/CommonsLoggingLoggerFactory.class, twitter4j/management/APIStatisticsOpenMBean.class, twitter4j/internal/logging/Logger.class]
twitter4jクラスが欠落している理由を私は理解していません、私はdalvik.system、javax.cryptoなどへの参照を理解していません。何が間違っていますか?
twitter4jが探していたパッケージは不要なので、import-packageにimportステートメントを追加しました。オプションとしてマークされています:twitter4j.internal.http.alternative; resolution:= optional(など)。 – stevex