0

In Maven target directory is where all the output of a build is held. This convention is also followed in many others build systems (like sbt, scala build tool).

The question that arises is "Why is the target directory called so?". Is it because this directory is the 'target' of the build process or what?

4

2 に答える 2

1

私の推測では、ビルドだけでなく、ターゲットディレクトリでもさまざまなことが起こります。たとえば、mvn jetty:runを実行すると、ターゲットのクラスとmavenプロジェクトのファイルを使用してjettyWebサーバーが実行されます。

于 2013-01-14T14:12:18.630 に答える
1

target は、かなり長い間、コンピューター サイエンスにおけるさまざまなクリエイティブ アクションの宛先フォルダーとして使用されてきたと思います。多くの Linux コマンドのドキュメントでは、この用語が使用されています。ビルドのほとんどはファイルのコピーまたはフォルダーの作成を行っているため、命名法がこれらのコマンドに似ていることは理にかなっています。

MV情報ページより

The mv command is used to rename and move files and directories. Its general syntax is:

mv [options] argument(s)

The arguments are names of files and directories. If two file names are provided as arguments, mv renames the first as the second. If a list of arguments is provided and the final argument in the sequence is the name of an existing directory, mv moves all of the other items into that directory. If the final argument is not an existing directory and more than two arguments are provided, an error message is returned.

mv's syntax can also be expressed in a less general form as:

mv [options] source target

If the target file is located in the same directory as the source file, then the source file can only be renamed. If both are in different directories, then the source file is moved to the directory named in the target argument, in which it can keep its original name or be assigned a new name. If the target is a directory, then the source file or directory is moved into that directory and retains its original name.
于 2013-01-14T15:55:57.060 に答える