2017-05-24 15 views
0

私はWebSphereの自由で動作しているアプリケーションを持っています。 mvn installコマンド私はdropinsディレクトリを使用していないので、appsディレクトリに自由にアプリケーションを配備する必要があります。WebSphere Liberty MavenプラグインからWebSphere Liberty appsディレクトリにデプロイする方法は?

ベローは、dropinsディレクトリに展開できる作業用プラグインのコードです。

 <plugin> 
      <groupId>net.wasdev.wlp.maven.plugins</groupId> 
      <artifactId>liberty-maven-plugin</artifactId> 
      <version>1.2.1</version> 
      <executions> 
       <execution> 
        <id>start-server</id> 
        <phase>pre-integration-test</phase> 
        <goals> 
         <goal>start-server</goal> 
        </goals> 
        <configuration> 
         <verifyTimeout>60</verifyTimeout> 
        </configuration> 
       </execution> 
       <execution> 
        <id>deploy</id> 
        <phase>install</phase> 
        <goals> 
         <goal>deploy</goal> 
        </goals> 
       </execution> 
      </executions> 
      <configuration> 
       <serverHome>${wlp.dir}</serverHome> 
       <serverName>${server}</serverName> 
       <appArtifact> 
        <groupId>${project.groupId}</groupId> 
        <artifactId>${project.artifactId}</artifactId> 
        <version>${project.version}</version> 
        <type>${project.packaging}</type> 
       </appArtifact> 
       <appDeployName>${project.artifactId}.${project.packaging}</appDeployName> 
      </configuration> 
     </plugin> 

アプリをアプリケーションディレクトリに直接配備するには、追加/変更が必要な設定が見つかりませんでした。誰かが私にここで不足していることを教えてもらえますか?

+0

を参照してください。 'dropins'。 'dropins'の代わりに' apps'ディレクトリに展開する必要があるのはなぜですか?共有のlibか何か? –

+0

はい。私はlibを共有することはできませんし、私のアプリケーションでいくつかの問題が発生します。したがって、私はappsディレクトリに行く以外に選択肢がありません – Roshanck

+0

この場所にjarを置くことによって、 "dropin apps"に共有ライブラリを適用することができます: '$ {shared.config.dir}/lib/global'または' $ {server.config .dir}/lib/global'を実行します。この文書を参照してください。https://www.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.wlp.nd.doc/ae/cwlp_sharedlibrary.html –

答えて

0

(展開実行ステップのみdropinsフォルダにアプリケーションをデプロイします)ステップは、問題を解決しますインストール-のアプリを実行ステップの代わりにデプロイを追加します。コードをプラグインhttps://github.com/WASdev/ci.maven/blob/master/docs/install-apps.md

全達人として怒鳴る

<plugin> 
     <groupId>net.wasdev.wlp.maven.plugins</groupId> 
     <artifactId>liberty-maven-plugin</artifactId> 
     <version>1.3</version> 
     <executions> 
      <execution> 
       <id>start-server</id> 
       <phase>pre-integration-test</phase> 
       <goals> 
        <goal>start-server</goal> 
       </goals> 
       <configuration> 
        <verifyTimeout>60</verifyTimeout> 
       </configuration> 
      </execution> 
      <execution> 
       <id>install-apps</id> 
       <phase>pre-integration-test</phase> 
       <goals> 
        <goal>install-apps</goal> 
       </goals> 
       <configuration> 
        <appsDirectory>apps</appsDirectory> 
        <installAppPackages>project</installAppPackages> 
       </configuration> 
      </execution> 
     </executions> 
     <configuration> 
      <serverHome>${wlp.dir}</serverHome> 
      <serverName>${server}</serverName> 
      <appArtifact> 
       <groupId>${project.groupId}</groupId> 
       <artifactId>${project.artifactId}</artifactId> 
       <version>${project.version}</version> 
       <type>${project.packaging}</type> 
      </appArtifact> 
      <appDeployName>${project.artifactId}.${project.packaging}</appDeployName> 
     </configuration> 
    </plugin> 
0

ます。また、現在の2.0-を試すことができようになります。バージョンは今

refはのように最新である1.3に更新する必要がありましたSNAPSHOTバージョンのプラグイン。親のpomと、プラグインの設定を少し入れてください。バージョン2.0は6月上旬にリリースされる予定です。

親のpomを含めたくない場合は、liberty-maven-pluginの目標とMavenのデフォルトビルドライフサイクルのバインディングを含む親のpomから<pluginManagement/>セクションをコピーすることができます。それが展開するだけで可能だように聞こえるGitHubのレポDOC(https://github.com/WASdev/ci.maven/blob/master/docs/deploy.md#deploy)に基づいてhttps://github.com/WASdev/ci.maven/blob/master/docs/parent-pom.md

<parent> 
    <groupId>net.wasdev.wlp.maven.parent</groupId> 
    <artifactId>liberty-maven-app-parent</artifactId> 
    <version>2.0-SNAPSHOT</version> 
</parent> 

<repositories> 
    <repository> 
     <id>sonatype-nexus-snapshots</id> 
     <name>Sonatype Nexus Snapshots</name> 
     <url>https://oss.sonatype.org/content/repositories/snapshots/ 
     </url> 
     <releases> 
      <enabled>false</enabled> 
     </releases> 
     <snapshots> 
      <enabled>true</enabled> 
     </snapshots> 
    </repository> 
</repositories> 
<pluginRepositories> 
    <pluginRepository> 
     <id>sonatype-nexus-snapshots</id> 
     <name>Sonatype Nexus Snapshots</name> 
     <url>https://oss.sonatype.org/content/repositories/snapshots/ 
     </url> 
     <releases> 
      <enabled>false</enabled> 
     </releases> 
     <snapshots> 
      <enabled>true</enabled> 
     </snapshots> 
    </pluginRepository> 
</pluginRepositories> 

... 

<build> 
    <finalName>${project.artifactId}</finalName> 
    <plugins> 
     ... 
     <plugin> 
      <groupId>net.wasdev.wlp.maven.plugins</groupId> 
      <artifactId>liberty-maven-plugin</artifactId> 
      <version>2.0-SNAPSHOT</version> 
      <configuration> 
       <assemblyArtifact> 
        <groupId>com.ibm.websphere.appserver.runtime</groupId> 
        <artifactId>wlp-webProfile7</artifactId> 
        <version>17.0.0.1</version> 
        <type>zip</type> 
       </assemblyArtifact> 
       <serverName>${project.artifactId}Server</serverName> 
       <configFile>src/main/liberty/config/server.xml</configFile> 
      </configuration> 
     </plugin> 
    </plugins> 

    ... 
</build> 
関連する問題