2011-10-29 11 views
0

用のbuild.xml私は作業ディレクトリのエラー - classpathref

//以下のTomcatが

When I run **tomcat-stop** task, instead of picking up the lib folder from tomcat server, it is trying to take my working directory. 

I have set the project basedir as basedir=".". All my other tasks in the build file are working as expected but only in this scenario (tomcat-stop) I am finding an issue. 

Error: 

**C:\Dev\WebDev\XYZ\build.xml:103: C:\Dev\WebDev\XYZ\${build.tomcat.dir}\lib does not exist.** 

I am using property file and everything from the property file is taken as expected. Also in the build.xml when I hover my mouse at the **classpathref="tomcat.class.path"**, it is showing all the files from tomcat lib but when I run the task I am getting the above error. 

Entry in property file: 
build.tomcat.dir=C:/TomcatServer 

Any help is appreciated. 

Thanks, 
Antスクリプトを停止するなどのタスクを持っているビルドファイルを持っています
+0

あなたのビルドファイルの多くを投稿することができますか?特に、tomcat-stopターゲットとプロパティファイルのインポート。 –

+0

優秀 – RKV

答えて

0

あなたのプロパティファイルを「クリーン」ターゲットの内側にロードされているように見えます。 'tomcat-stop'ターゲットを単独で呼び出すと、プロパティーファイルはロードされません。他のターゲットは「クリーン」に依存しているため、他のターゲットは機能しています。

は、それがルート要素の直接の子であるように、あなたのプロパティファイルをロードする行を移動してみてください。すなわち、ターゲット内にネストされていない。

+0

を更新し、問題のファイルのコンテンツを見つけてください...私はそれは私がやったことが愚かな何かを知っていたが、それを推測することができませんでした。あなたの親切な助けをありがとう。 – RKV

+0

もう1つの説明...私はtomcat-startタスクを実行すると正常に起動しますが、このtomcat-startターゲットの後に他のtargerがある場合、他のタスクは実行されません。これについてのアイデアとtomcat-startの後に他のタスクを実行する方法は? – RKV

+0

私は停止し、起動の両方で真のフォーク=を使用して、...私はその後、別のtarger、すなわちでTomcatをストップして、Tomcatのスタート順を展開して呼び出しています。必要な私の明確化へのノート。 – RKV

関連する問題