Eclipseが私の.SVNフォルダーをSRCからBINにコピーしようとしているのはなぜですか?どうすれば止めることができますか?

StackOverflow https://stackoverflow.com/questions/1709810

  •  19-09-2019
  •  | 
  •  

質問

Subversion 1.6を使用してJavaコードの束をチェックアウトし、それらのプロジェクトをEclipseにインポートしました。サブクリプス1.6は、いくつかのフォルダーを除き、プラグインがバージョン制御下にあるという事実を取り上げました。

次のようなエラーがたくさんあります。

リソースはsrc/.svn/all-wcpropsの複製であり、出力フォルダーにコピーされていません

(ディスク上ではなくEclipseから)プロジェクトを削除し、それを再輸入すると、問題が約半分の時間を修正します。しかし、私はこの問題を抱えているプロジェクトが何十もいるので、それは私がそれらをすべて機能させる前に10〜20回それらを再輸入することを意味します。これは非常に苦痛であり、誰かがSVNに新しいプラグインを追加するたびに、または何らかの理由でワークスペースを再現する必要があるときにそれをするのにうんざりしています。

これを修正する簡単な方法はありますか?それとも、そもそもこの問題を防ぐ方法はありますか?

役に立ちましたか?

解決

This is happening because you checked out a project using an SVN client other than Eclipse and then imported the project in Eclipse and you haven't notified Eclipse that this is an SVN project (that is, Eclipse doesn't know it has to ignore the SVN meta information).

In order to fix this properly, after you have imported the project in Eclipse, have Eclipse be 'aware' of the SVN nature of the project. Do so by

  1. Select the project and go to the Team > Share section.
  2. A dialog will appear asking weather this is a CVS or SVN project. Select the later.
  3. It will prompt for the credentials, enter them.
  4. When you're done, do a clean build. The problem goes away.

他のヒント

Add the .svn folder to the Excluded list for your Source Folder.

  • Project->Properties
  • Java Build Path
  • Source tab
  • Select 'Excluded'
  • click
  • Click next to the Exclusion patterns section on the bottom
  • Add the .svn folder and any others that do not need to be copied to the output directory

Follow the procedure described by Kelly but define the exclusion pattern as **/.svn/*. This will recursively exclude all .svn directories from the various source folders.

Easier way to do this is:

  • Project > Properties
  • Resource > Resource Filters > Add...
  • Filter type > Exclude all
  • Applies to > Folders
  • Check All children (recursive)
  • File and Folder Attributes > Type ".svn"
  • Hit OK and OK again
  • Clean/build

------------ Simple way of filtering the output folder-------------

Window->Preferences->Java->Compiler->Building
Make sure "Filtered Resources" includes ".svn/"

The "accepted best answer" described the cause to me, but as my project was already shared, I 1. closed the project, 2. opend it again and 3. cleaned it. The .svn folder is gone and does not come back.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top