Setting up project from GitHub

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Setting up project from GitHub

bkerr
Hello,

I'm beginning work with the CE of Orbeon Forms and having difficulty getting it up and running. I have downloaded the distribution from Orbeon's main site and am able to run it in Tomcat, but I need to be able to change some of the source code, to customize to meet my client's needs. I have gone through the page on Java Development and IDE Settings, but I still have not been able to get the project to build. I downloaded the zip from GitHub and simply used the existing IntelliJ project within. I began using a brand new installation of IntelliJ, so it picked up the Scala dependencies and installed itself into the IDE. My problem is that when I try to run any of ant commands like orbeon-war, I get multiple errors caused by
taskdef class org.orbeon.oxf.util.CoffeeScriptTask cannot be found
Has anyone come across this issue when starting up, and does anyone know what I need to do to get it going?

I originally tried this with Eclipse in Kubuntu 13.10, but in an attempt to be more consistent with my team members, I'm trying this with IntelliJ IDEA 13 CE, Tomcat 7, on Windows 7 x64.

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: Setting up project from GitHub

Erik Bruchez
Administrator
We also use IntelliJ. You should be able to:

- point IntelliJ to the project file and open it
- run Make Project or Rebuild Project, which should compile the Java/Scala files
- then run the orbeon-war ant task

If that fails, does the orbeon-war ant task work from the command line?

-Erik
Reply | Threaded
Open this post in threaded view
|

Re: Setting up project from GitHub

bkerr
Thank you for your help Erik. When I try to Make Project or Rebuild Project, I get "Ant build completed with one error and no warnings" with the only information to from stating that Compilation was aborted.

I tried using ant from the command line, and when I try to simply "ant orbeon-war", it fails as well. I am however, able to build if I just call "ant" and have it build everything. It takes a while, but it at least works. If you have any ideas from that, I'd appreciate any other help to get things working properly, but I'm glad that I can at least move forward now.

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Setting up project from GitHub

Alessandro  Vernet
Administrator
So running Ant from the command line works, but not from IntelliJ? Are you running Ant from IntelliJ from the "Ant Build" window, which you can open from View / Tool Windows? Running Ant from the command line or IntelliJ should really be the same.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Setting up project from GitHub

bkerr
Hi Alex,

That is exactly right. I have been running Ant from IntelliJ just as you outlined, both with the bundled Ant and the standalone installed on the machine. The results are always the same: Ant build completed with 5 errors, all "Caused by: java.lang.ClassNotFoundException: org.orbeon.oxf.util.CoffeeScriptTask". Using the command line and building with Ant works properly, though.
Reply | Threaded
Open this post in threaded view
|

Re: Setting up project from GitHub

Alessandro  Vernet
Administrator
I see: this is because in IntelliJ we set Ant to use the skip.compilation=true property. And of course, if Orbeon isn't compiled, Ant won't find the org.orbeon.oxf.util.CoffeeScriptTask class. So you can either:

- In IntelliJ edit the Ant properties, and in the Properties tab remove the skip.compilation=true property.
- In IntelliJ, first compile the project with IntelliJ (Build / Make Project, or F7 with my setup), then run the Ant task orbeon-war from IntelliJ.

The reason we setup Ant this way by default with IntelliJ is that when using IntelliJ we want to leave IntelliJ doing the compilation. This leverage IntelliJ's incremental compilation, which is especially useful with Scala code, and if you're connected to Tomcat with a debugger, will enable IntelliJ to inject new classes without having to restart Tomcat (this doesn't always work, but when it does is quite a time saver).

I hope this helps,

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet