English 中文(简体)
1. 建设者产生双倍结构
原标题:buildr generate folder structure
  • 时间:2012-04-28 13:48:34
  •  标签:
  • buildr

I m starting to use Apache buildr. As far as I understand, I always have to create the default folder structure (src/main/java etc) on my own? Is there a way to let buildr to this job for me?

感谢

最佳回答
  • Use Maven 2 archetype generation
  • Run Buildr from the project dir. it sees the pom.xml and asks if you want to create a basic Buildr script from it.
  • Run buildr eclipse to generate .classpath and .project
  • In Eclipse, import from a existing project in file system
问题回答

建设者只是一个建构工具,其目的不是产生陈旧的类型或建立一个网站。

但是,你很正确,有时你需要产生一个新项目,因此,我写了一幅剪辑(,你可以在上找到该牙。

如何运作:

$ ./createBuildrProject.sh jptest
Please answer  1  to the next question
To use Buildr you need a buildfile. Do you want me to create one?:
1. From directory structure
2. Cancel
?  1
Created /home/jp/src/perso/774597/jptest/buildfile
(in /home/jp/src/perso/774597/jptest, development)
Building jptest
Compiling jptest into /home/jp/src/perso/774597/jptest/target/classes
Compiling jptest:test into /home/jp/src/perso/774597/jptest/target/test/classes
Completed in 2.130s
./createBuildrProject.sh: ligne 17 : cd: jptest: Aucun fichier ou dossier de ce type
(in /home/jp/src/perso/774597/jptest, development)
Generating Eclipse project for jptest
Writing /home/jp/src/perso/774597/jptest/.classpath
Writing /home/jp/src/perso/774597/jptest/.project
Completed in 0.025s

产出目录如下:

$ tree jptest/
jptest/
├── buildfile
├── reports
│   └── junit
│       └── last_successful_run
├── src
│   ├── main
│   │   └── java
│   │       └── Empty.java
│   └── test
│       └── java
│           └── EmptyTest.java
└── target
    ├── classes
    │   └── Empty.class
    ├── jptest-1.0.0.pom
    └── test
        └── classes
            └── EmptyTest.class

11 directories, 7 files

希望这一帮助。





相关问题
How to develop a gem in staging environment?

I am trying to hack through a forked gem (buildr). As such I cloned it from github and began to butcher the code. The official gem is installed on my system (under /usr/lib/ruby.../gems/buildr...). ...

Choosing a scripting/build tool [closed]

We are currently working on a project with both actionscript and Java. Up to now, we were using Ant as our main build tool, but the dumb amount of duplication it implies and the lack of flexibility (...

Package method having no effect in Buildr

I m trying to package a scala project into a jar and write properties to the Manifest using Buildrs package() method. The package seems to have no affect on the Manifest. Here s the build file: ...

Apache Buildr issue with ant task / Hash.from_java_properties

I have a buildr script that first loads a java properties file, then creates an ant task. I m getting an abort error: Buildr aborted! org/apache/tools/ant/DefaultLogger when running buildr. Here s ...

importing maven dependencies into intellij s classpath

I am using Buildr with a java/scala project. Dependencies are descried in the buildfile. An as you may know, Buildr downloads dependencies into ~.m2 folder (as maven2 does). I am wondering how can I ...

Compile Scala 2.8.x code with Apache Buildr

I have been struggling to get Buildr to compile my Scala 2.8 project and I was hoping someone might have figured this out already. Currently I have the standard HelloWorld application with a ...

• 如何增加当地对建筑的依赖

对于一个java/scala项目,我有一些附属设施,不是在遥远的存放处,而是我档案系统中的其他地方。 我有两种选择,导致问题:

热门标签