0

私は Windchill というツールに取り組んでいます。xml ファイルを介していくつかの属性をロードするビルドを準備しました。これらの xml ファイルをロードするには、次のコマンドを使用します。

例: windchill wt.load.LoadFromFile -d C:\ptc\Windchill_10.1\Windchill\loadFiles\pdmlink\itc\attributes\Attributes.xml -u wcadmin -p wcadmin

このように、windchill コマンド プロンプトで手動で実行するコマンドが 100 個ほどあります。したがって、基本的には、手作業をあまり行わずに、MAVEN を使用してこれらのコマンドを順番に実行することにより、プロセスを自動化したいと考えています。

このビルドを展開する方法はありますか。助けてください。

ありがとう。

4

2 に答える 2

2

exec-maven-pluginを確認することをお勧めします。これは、達成したいことにとって正しい選択であると思われます。

<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.2.1</version>
        <executions>
          <execution>
            ...
            <phase>WhatEver</phase>
            <goals>
              <goal>exec</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <executable>windchill </executable>
          <!-- optional -->
          <workingDirectory>/tmp</workingDirectory>
          <arguments>
            <argument>wt.load.LoadFromFile</argument>
            <argument>and so on</argument>
            ...
          </arguments>
        </configuration>
      </plugin>
    </plugins>
  </build>
   ...
</project>
于 2013-06-27T07:14:12.363 に答える
0

    <project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
  http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>Build</groupId>
    <artifactId>Build_SMB</artifactId>
    <packaging>jar</packaging>
    <version>1.0</version>
    <name>SMB PROJECT</name>
    <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.2.1</version>
        <executions>
          <execution>
            <phase>deploy</phase>
            <goals>
              <goal>exec</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <executable>windchill</executable>
          <!-- optional -->
          <workingDirectory>C:/mvn/test</workingDirectory>
          <arguments>
            <argument>wt.load.LoadFromFile</argument>
            <argument>-d</argument>
            <argument>C:/ptc/Windchill_10.1/Windchill/loadFiles/pdmlink/itc/attributes/Attributes.xml</argument>
            <argument>-u</argument>
            <argument>wcadmin</argument>
            <argument>-p</argument>
            <argument>wcadmin</argument>
          </arguments>
           <systemProperties>
            <systemProperty>
              <key>WT_HOME</key>
              <value>${env.WT_HOME}</value>
            </systemProperty>
          </systemProperties>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
于 2013-07-02T06:26:47.787 に答える