提案をありがとう、私は近いと思います。たぶん私が尋ねるべき質問は、.HTMLファイルをtarget / classes /サブディレクトリの正しい場所に配置する方法ですか?target / classesフォルダーに.htmlファイルを取得できる場合は、package(:jar)がそれらをアーカイブすることを確認しました。私はそれを見始めるつもりです。
あなたがやりたいことは、Javaソースパスをリソースパスとして扱うことのように聞こえます。すでにかなり大きくなった後でビルダーに変換したプロジェクトで、これを行う方法は次のとおりです。
# Uses before_define to default all projects to including their resources from
# src/main/java instead of src/main/resources (& similar for test) if
# those source directories exist
module InlineResources
include Buildr::Extension
before_define do |p|
[
[p.resources, p._("src/main/java")],
[p.test.resources, p._("src/test/java")]
].each do |res, path|
if File.exist?(path)
res.from(path).exclude("**/*.java")
end
end
end
end
class Buildr::Project
include InlineResources
end
これにより、*。htmlファイルtarget/resources
がそこに配置され、そこからパッケージに追加されます。