当执行buildr eclipse命令时,并不像书中所说的会在当前工程的子工程中创建 .classpath 和 .project 文件。
看了buildr官方的User Guide是这样描述的:
The eclipse task will generate a .classpath and .project file for each of projects
(and sub-project) that compiles source code. It will not generate files for other
projects, for examples, projects you use strictly for packaging a distribution, or
creating command line scripts, etc.
项目的目录结构是这样的,
CODE:
D:\JRUBY_WORK\CH03\BUILDR-JRUBY
│ buildfile
│
└─m_buildrbuildfile是这样的CODE:
# Generated by Buildr 1.3.3, change to your liking
# Version number for this release
VERSION_NUMBER = "1.0.0"
# Group identifier for your projects
GROUP = "buildr-jruby"
COPYRIGHT = ""
# Specify Maven 2.0 remote repositories here, like this:
repositories.remote << "http://www.ibiblio.org/maven2/"
desc "The Buildr-jruby project"
define "buildr-jruby" do
project.version = VERSION_NUMBER
project.group = GROUP
manifest["Implementation-Vendor"] = COPYRIGHT
define "m_buildr" do
compile
package :jar
end
end运行buildr eclipse 后不会在m_buildr目录下产生 .classpath 和 .project 文件。请高人指点,谢谢
最新回复
要在m_buildr目录下放有,java文件,
目录为 scr\main\java下,再运行 buildr eclipse 就自动生成 需要的2个文件了。
刚开始直接在m_buildr目录下放java文件,终不得解。最后想起了,应该要放在规定的目录下。一个问题解决~~