[nbdev] Re: Custom Build for Modules

  • From: Tomás Lázaro < >
  • To:
  • Subject: [nbdev] Re: Custom Build for Modules
  • Date: Wed, 21 Mar 2012 15:01:09 -0300

For the sake of documentation:

Don't forget failonerror="true" !

<exec dir="${basedir}" executable="sbt" failonerror="true">
...

On Wed, Mar 21, 2012 at 12:03 AM, Tomás Lázaro < "> > wrote:
I finally got away with my hack by just using:


<target name="compile" description="Compile project.">
        <exec dir="${basedir}" executable="sbt">
            <arg value=";compile"></arg>
        </exec>
        <copy> /* code to copy .class and resource files into excepted default java directory */</copy>
</target>

By doing that and not overriding the 'jar' task it allowed Netbeans to package the jar like it usually does. Everything worked fine then :)


On Tue, Mar 20, 2012 at 9:18 AM, Emilian Bold < " target="_blank"> > wrote:
It's understandable. But it's not such a big thing to switch to Maven and it might help your build system if you want to do odd stuff.

--emi

2012/3/20 Tomás Lázaro < " target="_blank"> >
I already have other modules working, I can't change everything to Maven now. :/


On Tue, Mar 20, 2012 at 3:53 AM, Emilian Bold < " target="_blank"> > wrote:
I don't have an ant-based answer, but I think using Maven and nbm-maven-plugin might be better for you.

--emi


2012/3/20 Tomás Lázaro < " target="_blank"> >
Hi everyone,

I'm trying to have a Module inside a Suite to be built using SBT, the Scala build tool.

Adding stuff like this to the build.xml makes it easy to have the ant build call sbt and compile and package my code.

<target name="jar" description="Build JAR.">
        <exec dir="${basedir}" executable="sbt">
            <arg value=";package"></arg>
        </exec>
</target>

<target name="compile" description="Compile project.">
        <exec dir="${basedir}" executable="sbt">
            <arg value=";compile"></arg>
        </exec>
</target>

I get the module compiled and packed but other Modules from the same Suite can't access the code on the module. The problem I'm seeing is that the jar is not getting copied to the "build/cluster/" folder at the root of the suite. I tried manually copying the jar and the config xml but I still can't build the Suite.

How exactly is the process for building Modules and adding them to the Suite? What does Netbeans look for when checking for the code? Am I missing stuff on the MANIFEST? A config file? Copying more stuff to somewhere besides the cluster folder?

Thanks!
Cheers




--
http://www.josekibold.ro : Honesty & well-done software.




--
http://www.josekibold.ro : Honesty & well-done software.




[nbdev] Custom Build for Modules

Tomás Lázaro 03/20/2012

[nbdev] Re: Custom Build for Modules

Emilian Bold 03/20/2012

[nbdev] Re: Custom Build for Modules

Tomás Lázaro 03/20/2012

[nbdev] Re: Custom Build for Modules

Emilian Bold 03/20/2012

[nbdev] Re: Custom Build for Modules

Tomás Lázaro 03/21/2012

[nbdev] Re: Custom Build for Modules

Tomás Lázaro 03/21/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close