Cannot build project locally?

Threads of discussion worthwhile for others are going to be moved here for future reference
alwa83
Posts: 17
Joined: Wed Nov 24, 2010 15:12:58

Cannot build project locally?

Postby alwa83 » Sun Mar 27, 2016 11:41:13

I've updated some translations and wanted to make a local build but the dist folder is populated with empty files.

Has anyone else experienced this? :(

User avatar
nmeier
Site Admin
Posts: 2159
Joined: Mon Feb 02, 2004 21:35:23
Location: Toronto, Canada
Contact:

Re: Cannot build project locally?

Postby nmeier » Sun Mar 27, 2016 15:26:24

Hi

please post the output of running build.sh or build.cmd on your system. There's a tiny bit of trickery involved re JAVA_HOME to make sure it runs. It still works for me.

Cheers
Nils

alwa83
Posts: 17
Joined: Wed Nov 24, 2010 15:12:58

Re: Cannot build project locally?

Postby alwa83 » Sun Mar 27, 2016 15:46:13

Buildfile: build.xml

init:
[echo] Creating output directories

compile.contrib:

compile.core:

compile.report:

compile.launcher:

compile:

version:
[echo] Generating version number
[echo] version=6803:6804M
[echo] build=6803:6804M (6803:6804M) 2016/03/27 21:44:44 Alix

dist.languages:

init:
[echo] Creating output directories

version:
[echo] Generating version number
[echo] version=6803:6804M
[echo] build=6803:6804M (6803:6804M) 2016/03/27 21:44:44 Alix

dist.language:

init:
[echo] Creating output directories

version:
[echo] Generating version number
[echo] version=6803:6804M
[echo] build=6803:6804M (6803:6804M) 2016/03/27 21:44:44 Alix

dist.language:

init:
[echo] Creating output directories

version:
[echo] Generating version number
[echo] version=6803:6804M
[echo] build=6803:6804M (6803:6804M) 2016/03/27 21:44:44 Alix

dist.language:

init:
[echo] Creating output directories

version:
[echo] Generating version number
[echo] version=6803:6804M
[echo] build=6803:6804M (6803:6804M) 2016/03/27 21:44:44 Alix

dist.language:

init:
[echo] Creating output directories

version:
[echo] Generating version number
[echo] version=6803:6804M
[echo] build=6803:6804M (6803:6804M) 2016/03/27 21:44:44 Alix

dist.language:

init:
[echo] Creating output directories

version:
[echo] Generating version number
[echo] version=6803:6804M
[echo] build=6803:6804M (6803:6804M) 2016/03/27 21:44:44 Alix

dist.language:

init:
[echo] Creating output directories

version:
[echo] Generating version number
[echo] version=6803:6804M
[echo] build=6803:6804M (6803:6804M) 2016/03/27 21:44:44 Alix

dist.language:

init:
[echo] Creating output directories

version:
[echo] Generating version number
[echo] version=6803:6804M
[echo] build=6803:6804M (6803:6804M) 2016/03/27 21:44:44 Alix

dist.language:

init:
[echo] Creating output directories

version:
[echo] Generating version number
[echo] version=6803:6804M
[echo] build=6803:6804M (6803:6804M) 2016/03/27 21:44:44 Alix

dist.language:

init:
[echo] Creating output directories

version:
[echo] Generating version number
[echo] version=6803:6804M
[echo] build=6803:6804M (6803:6804M) 2016/03/27 21:44:44 Alix

dist.language:

init:
[echo] Creating output directories

version:
[echo] Generating version number
[echo] version=6803:6804M
[echo] build=6803:6804M (6803:6804M) 2016/03/27 21:44:44 Alix

dist.language:

init:
[echo] Creating output directories

version:
[echo] Generating version number
[echo] version=6803:6804M
[echo] build=6803:6804M (6803:6804M) 2016/03/27 21:44:44 Alix

dist.language:

init:
[echo] Creating output directories

version:
[echo] Generating version number
[echo] version=6803:6804M
[echo] build=6803:6804M (6803:6804M) 2016/03/27 21:44:44 Alix

dist.language:

init:
[echo] Creating output directories

version:
[echo] Generating version number
[echo] version=6803:6804M
[echo] build=6803:6804M (6803:6804M) 2016/03/27 21:44:44 Alix

dist.language:

dist.app:
[delete] Deleting: D:\Repositories\genj\build\lib\genj.jar
[jar] Building jar: D:\Repositories\genj\build\lib\genj.jar
[delete] Deleting: D:\Repositories\genj\build\lib\run.jar
[jar] Building jar: D:\Repositories\genj\build\lib\run.jar
[zip] Updating zip: D:\Repositories\genj\build\dist\genj_app-6803:6804M.zip

dist:

BUILD SUCCESSFUL
Total time: 10 seconds

User avatar
nmeier
Site Admin
Posts: 2159
Joined: Mon Feb 02, 2004 21:35:23
Location: Toronto, Canada
Contact:

Re: Cannot build project locally?

Postby nmeier » Mon Mar 28, 2016 11:56:19

Hi

there might be a problem in how the build determines the current version 6803:6804M and then will end up trying to generate files with that colon in the filename.

Try a

svn update

first, that should get you to

$ svnversion
6805M

The run the build again, the build might proceed correctly (here on Linux I have no problem with a colon in directory names). Alternatively try running ant with

ant -Dversion=devtest

Cheers
Nils

alwa83
Posts: 17
Joined: Wed Nov 24, 2010 15:12:58

Re: Cannot build project locally?

Postby alwa83 » Fri Apr 01, 2016 18:28:59

svn update and build did the trick :-)

Thank you!

alwa83
Posts: 17
Joined: Wed Nov 24, 2010 15:12:58

Re: Cannot build project locally?

Postby alwa83 » Sat Apr 02, 2016 4:00:06

I'm trying to implement the Swedish Calendar, https://en.wikipedia.org/wiki/Swedish_calendar

but when I tried to run my unit tests I get compilation errors for missing classes:

com.hp.hpl.jena.rdf...

I've added \contrib\ and \lib\ to the project as dependencies but this was not enough. What am I missing?

User avatar
nmeier
Site Admin
Posts: 2159
Joined: Mon Feb 02, 2004 21:35:23
Location: Toronto, Canada
Contact:

Re: Cannot build project locally?

Postby nmeier » Sat Apr 02, 2016 23:05:18

Hi

the RDF report needs some libraries that are not checked in or resolved externally (the way it should be really).

How exactly are you invoking the test compilation/run?

I've excluded the RDF report from the eclipse settings so it's not being picked up when running unittests in Eclipse itself. The compilation of the unittest from ant has an issue with a report-based test that didn't have classpath access to the report classes itself.

That should be fixed (svn update)

Nils

alwa83
Posts: 17
Joined: Wed Nov 24, 2010 15:12:58

Re: Cannot build project locally?

Postby alwa83 » Sun Apr 03, 2016 4:12:53

Hi,
I'm using a different IDE than Eclipse (IntelliJ IDEA), the whole project is included as sources by default but when I exclude src\tst\report and src\report I could run the tests.

Thanks!

alwa83
Posts: 17
Joined: Wed Nov 24, 2010 15:12:58

Re: Cannot build project locally?

Postby alwa83 » Sun Apr 03, 2016 6:00:52

Hmm, my tests show strange results so I made a test for the previously implemented julian calendar.

PointInTime.JULIAN.toJulianDay(29, 2, 1700) returns 2342072

PointInTime.JULIAN.toJulianDay(1, 3, 1700) returns 2342075

I would expect that the diff is only 1 (since february only has 29 days in a leap year) but in fact it is 3. Do you know what could be wrong?

User avatar
nmeier
Site Admin
Posts: 2159
Joined: Mon Feb 02, 2004 21:35:23
Location: Toronto, Canada
Contact:

Re: Cannot build project locally?

Postby nmeier » Mon Apr 04, 2016 21:10:05

Hi alwa83

very old code but you're right, the formula assumes 30.x days per month which doesn't work well on feb 28/29 to mar 1 delta. I've plugged in another formula from wikipedida and added a unittest.

Cheers
Nils


Return to “Dev - FAQ”

Who is online

Users browsing this forum: No registered users and 1 guest