Build Error with Labkey Trunk - Server

LabKey Support Forum (Inactive)
Build Error with Labkey Trunk - Server lewis j mcgibbney  2015-03-16 12:26
Status: Closed
 
Hi Folks,
I am struggling to build server out of trunk at the following version

lmcgibbn@LMC-032857 /usr/local/labkey/server(master) $ svn info
Path: .
Working Copy Root Path: /usr/local/labkey
URL: https://hedgehog.fhcrc.org/tor/stedi/trunk/server
Relative URL: ^/trunk/server
Repository Root: https://hedgehog.fhcrc.org/tor/stedi
Repository UUID: a4ab64de-fbdc-0310-83ae-be1847ca59a0
Revision: 37086
Node Kind: directory
Schedule: normal
Last Changed Author: a.galuhn
Last Changed Rev: 37085
Last Changed Date: 2015-03-16 11:37:17 -0700 (Mon, 16 Mar 2015)

I've attached by build log where it complains about config.properties not being present... which is true. I don't know what this file is meant to look like.
I'm using the following JDK and Apache Ant version

lmcgibbn@LMC-032857 /usr/local/labkey/server(master) $ ant -version
Apache Ant(TM) version 1.9.4 compiled on April 29 2014
lmcgibbn@LMC-032857 /usr/local/labkey/server(master) $ java -version
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)

Does anyone have an idea what is meant to go into config.properties?
Thanks
Lewis
 
 
Jon (LabKey DevOps) responded:  2015-03-16 12:37
Hi Lewis,

Have you had an opportunity to review our developer documentation on setting up a development machine?

https://www.labkey.org/wiki/home/Documentation/page.view?name=build

The config.properties file is the file that your dev instance will use to create its build.xml from. That config.properties file is located under the LABKEY_ROOT/server/ directory and it relies on the properties files that are within the LABKEY_ROOT/server/configs/ subdirectory. If you go into configs, you'll see two .properties files - one called pg.properties, the other mssql.properties. The pg one is for PostgreSQL while mssql is for Microsoft SQL. Depending on which version of SQL you're using, you want to edit the appropriate file and enter in your information (e.g. Database Name, database username, database password, port number, host address, etc). So when you run ant in the server directory, you would use either "ant pick_pg" or "ant pick_mssql" to have it pick the specific properties file in the configs directory, which will then write to the config.properties file. This will then eventually create your build.xml file and labkey.xml file for your dev instance to start working.

Does this make sense?

Regards,

Jon
 
lewis j mcgibbney responded:  2015-03-16 12:39
Hi Folks,
In the /server/configs/ directory I saw both pg.properties and mssql.properties.
I copied the former to /server, this worked.
Please see the attached log file.
 
Jon (LabKey DevOps) responded:  2015-03-16 13:03
Hi Lewis,

Copying the pg.properties file to the server directory and renaming it config.properties is fine, but for future we recommend you using the ant command instead. This allows you to be able to switch between different databases if you have both MS SQL and PostgreSQL databases to access or if you have multiple databases within PostgreSQL or MS SQL. I have several different properties files that are for both PostgreSQL and MS SQL that I use for testing and I end up copying one of them to my pg.properties or mssql.properties file and then running the "ant pick_pg" or "ant pick_mssql" command for it to build my labkey.xml file and point to the correct server and database.

All of this information is within our dev machine instructions here: https://www.labkey.org/wiki/home/Documentation/page.view?name=build

Regards,

Jon
 
lewis j mcgibbney responded:  2015-03-16 14:18
Hi Jon,
Thanks for your feedback. Greatly appreciated.
Additionally, I had to set the following Ant optional configuration
export ANT_OPTS="-Xms1536m -Xmx1536m -XX:PermSize=1024m -XX:MaxPermSize=2048m"
Once that was done, everything build perfectly from trunk.
Thanks very much again.
Lewis