Export コマンドは ksh および bash でのみ動作します。csh の場合は、代わりに setenv を使用してください。
コマンドプロンプトで次のコマンドを実行します。
Export ANT_HOME=path Export JAVA_HOME=path dos2unix ant ant dos2unix build.xml build.xml dos2unix build.properties build.properties |
commandlinecodegen ディレクトリで build.properties ファイルを見つけます。
テキストエディタを使用してこのファイルを開きます。内容は次のとおりです。
commandline.rep.url=http://host:port/repositoryname commandline.rep.user= commandline.rep.pass= commandline.rep.dir=localrepository commandline.rep.projectName= commandline.rep.projectDeployName= commandline.rep.projectDeploymentTag= commandline.rep.projectBranchName= |
表 1–1 の説明に従ってプロパティーの値を入力します (省略可能なプロパティーは空白のままでもよい)。
commandlinecodegen ディレクトリでコマンド行プロンプトから次のコマンドを発行して、commandline codegen を実行します。
sh ant –propertyfile build.properties |
コマンドプロンプトで次のコマンドを実行します。
コマンドプロンプトで次のコマンドを実行します。
Export ANT_HOME=path Export JAVA_HOME=path dos2unix ant ant dos2unix build.xml build.xml dos2unix build.properties build.properties |
commandlinecodegen ディレクトリでコマンドプロンプトから次のコマンドを発行して、commandline codegen を実行します (表 1–1 を参照)。
sh ant "-D{propertyname1}={propertyvalue1}" "-D{propertyname2}= {propertyvalue2}" … "-D{propertynameN}={propertyvalueN}" |
コマンド行プロパティーの方法を使用する場合は、すべての必須プロパティーの値を指定する必要があります。必要に応じて、省略可能なプロパティーの値も指定できます。
コマンドプロンプトで次のコマンドを実行します。
Export ANT_HOME=path Export JAVA_HOME=path dos2unix ant ant dos2unix build.xml build.xml dos2unix build.properties build.properties |
commandlinecodegen ディレクトリで build.properties ファイルを見つけます。
メモ帳などのテキストエディタを使用してこのファイルを開きます。内容は次のとおりです。
commandline.rep.url=http://host:port/repositoryname commandline.rep.user= commandline.rep.pass= commandline.rep.dir=localrepository commandline.rep.projectName= commandline.rep.projectDeployName= commandline.rep.projectDeploymentTag= commandline.rep.projectBranchName= |
表 1–1 の説明に従ってプロパティーの値を入力します。
commandlinecodegen ディレクトリでコマンド行プロンプトから次のコマンドを発行して、commandline codegen を実行します。
sh ant -propertyfile build.properties "-D{propertyname1}={propertyvalue1}" "-D{propertyname2}={propertyvalue2}" … "-D{propertynameN}={propertyvalueN}" |
プロパティーファイルとコマンド行プロパティーを組み合わせて使用する場合は、プロパティーファイルに指定されているプロパティーよりもコマンド行プロパティーが優先されます。優先させるプロパティーだけを指定する必要があります。