2017-05-18 9 views
1

私のテストではJavaサンプラーを使用しようとしています。 拡張機能を作成する別のmavenプロジェクトがあります。プロジェクトをビルドした後、私は.jar libを取得します。私は拡張機能のpom.xmlから除外いくつか無効推移的な依存を持っている私の拡張機能でLazerycode jmeter maven plugin Java拡張機能をダウンロードしない依存関係

<dependencies> 
    <dependency> 
     <groupId>com.lazerycode.jmeter</groupId> 
     <artifactId>jmeter-maven-plugin</artifactId> 
     <version>2.2.0</version> 
    </dependency> 
    <dependency> 
     <groupId>com.qiagen</groupId> 
     <artifactId>qa_toolkit</artifactId> 
     <version>RELEASE</version> 
    </dependency> 
    <dependency> 
     <groupId>com.qiagen</groupId> 
     <artifactId>JMeterExtensions</artifactId> 
     <version>jmeter3.2.3</version> 
    </dependency> 
</dependencies> 

<build> 
    <plugins> 
     <plugin> 
      <groupId>com.lazerycode.jmeter</groupId> 
      <artifactId>jmeter-maven-plugin</artifactId> 
      <version>2.2.0</version> 
      <executions> 
       <execution> 
        <id>jmeter-tests</id> 
        <phase>verify</phase> 
        <goals> 
         <goal>jmeter</goal> 
        </goals> 
       </execution> 
      </executions> 
      <configuration> 
       <testFilesDirectory>${basedir}/src/test/jmeter/</testFilesDirectory> 
       <testFilesIncluded> 
        <jMeterTestFile>${jmxTest}</jMeterTestFile> 
       </testFilesIncluded> 
       <jmeterDirectory>${jmeter.home}</jmeterDirectory> 
       <jmeterExtensions> 
        <artifact>com.qiagen:JMeterExtensions:jmeter3.2.3</artifact> 
       </jmeterExtensions> 
       <propertiesUser> 
        <csvData>${basedir}/src/test/jmeter/${csvData}</csvData> 
        <threads>${threads}</threads> 
        <rampTime>${rampTime}</rampTime> 
        <loopCount>${loopCount}</loopCount> 
        <options>${options}</options> 
        <server>${server}</server> 
        <port>${port}</port> 
        <sleep>${sleep}</sleep> 
        <inputXmlFileDir>${inputXmlFileDir}</inputXmlFileDir> 
        <templatesCsv>${templatesCsv}</templatesCsv> 
        <xmlInputsCsv>${xmlInputsCsv}</xmlInputsCsv> 
        <reportScenariosCsv>${reportScenariosCsv}</reportScenariosCsv> 
       </propertiesUser> 
       <jMeterProcessJVMSettings> 
        <xms>2048</xms> 
        <xmx>2048</xmx> 
        <arguments> 
         <argument>-Xprof</argument> 
         <argument>-Xfuture</argument> 
        </arguments> 
       </jMeterProcessJVMSettings> 
      </configuration> 
     </plugin> 
    </plugins> 
</build> 

:私はこのように私のMavenプラグインに含めます。私は依存関係のツリーでそれらを見ません。

私はフラグをテスト、真にdownloadExtensionDependenciesを実行すると、それはすべての依存関係(も除外されたもの)をダウンロードしようとすると、テストはそのせいで無効な依存関係の失敗したように、それが見えます。

Failed to collect dependencies at org.springframework:spring-webmvc:jar:3.1.1.RELEASE -> jasperreports:jasperreports:jar:2.0.5 -> commons-collections:commons-collections:jar:3.2.1.redhat-7: Failed to read artifact descriptor for commons-collections:commons-collections:jar:3.2.1.redhat-7: Could not transfer artifact org.apache.commons:commons-parent:pom:22-redhat-2 from/to jaspersoft (http://www.jasperforge.org/maven2): www.jasperforge.org: Unknown host www.jasperforge.org -> [Help 1] 

あなたはプラグインがも除外依存関係をダウンロードしようとしている理由を任意のアイデアを持っていますか?

+0

あなたはそれらの依存関係を除外言うとき、あなたはあなたの 'pom.xml'でそれらを除外意味ですか?あなたはそれらの除外を示すためにポンのその部分を分かち合うことができますか? – palimpsestor

+0

あなたはどのプラグインのバージョンを使用していますか?あなたは完全なポンを見せてくれますか? –

+0

私の拡張機能のpom.xmlの依存関係を除外しました。メインプロジェクトのpom.xmlからそれらも除外する方法はありますか?私はバージョン2.2.0を使用しています –

答えて

1

pluginのバージョン2.6.0を使用してください。デフォルトの値は、オプションの依存関係をダウンロードしないようになっています。

そして壊れたか、除外の依存性を除外するために、これを使用します。

<excludedArtifacts> 
    <exclusion>commons-pool2:commons-pool2</exclusion> 
    <exclusion>commons-math3:commons-math3</exclusion> 
    <exclusion>com.sun.jdmk:jmxtools</exclusion> 
    <exclusion>com.sun.jmx:jmxri</exclusion> 
</excludedArtifacts> 
関連する問題