openworm / org.geppetto

Geppetto is an open-source platform to build web-based applications to visualize and simulate neuroscience data and models.
http://geppetto.org
Other
209 stars 50 forks source link

Maven misses StringUtils class file when building org.geppetto.core #153

Closed jrieke closed 10 years ago

jrieke commented 10 years ago

Encountered this issue with @Allysquad when trying to set up the Geppetto source code on his machine (Windows 7).

Steps done before: We set up everything according to my instructions here (they work on my machine), except for installing OpenCL. Then we ran mvn install (with Maven 3.2.2). Expected: Maven builds all modules Observed: Maven fails on building org.geppetto.core and shows this error. It seems like the jsonschema2pojo plugin misses the class org.apache.commons.lang.StringUtils, which seems to be involved in the string parsing of the config.json file. We looked into .m2\repository\org\apache\commons on Allis machine and indeed the folder commons-lang3 was missing in comparison with my computer. We copied it over manually from my machine, tried reinstalling Maven, rebooting, but nothing worked.

tarelli commented 10 years ago

@jrieke @Allysquad can you guys trying adding to the pom.xml of org.geppetto.core the following on Alli's machine and try again doing mvn install? Before doing it delete the apache commons folder in the local maven repo.

<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-lang3</artifactId>
    <version>3.3.2</version>
</dependency>
Allysquad commented 10 years ago

I will try it when I get home, please be aware I will only make the last 15 minutes of the meeting as I work to 5pm. If I can listen in on my phone at work I will try to.

Allysquad commented 10 years ago

Hi,

I now have the following issue neuromldependencyissue

Dependencies missing for org.geppetto:model.neuroml:bundle:0.1.5 Artifacts could not be resolved or found.

I have tried deleting the neuroml folder inside the maven local repository to force it to re-download the files but this hasn't made any difference.

I have also tried adding in the 3 packages missing from the org.geppetto POM but this did not make any difference.

I have also tried adding this into the geppetto.core POM

<dependency>
            <groupId>org.geppetto</groupId>
            <artifactId>model.neuroml</artifactId>
            <version>0.1.5</version>
</dependency>

But that also didnt make any difference.

As you can tell i'm just guessing at things cause i'm not sure what i'm doing yet so any help would be nice :D @tarelli wink you seen this coming haha.

jrieke commented 10 years ago

Hey @Allysquad , I think I also had this issue once. Could you try setting up your Geppetto repositories (this step) with

git clone https://github.com/openworm/org.geppetto.git -b development

(Probably it's best to delete the previous contents of your geppetto-sources folder before). With the command above, you clone the repositories from the development branch. Make sure to add the org.apache.commons dependency again in the org.geppetto.core/pom.xml file.

If that doesn't help it already, open the org.geppetto/pom.xml file (not the one in org.geppetto.core!) and add this to the section:

<module>../org.neuroml.model.injectingplugin</module>
Allysquad commented 10 years ago

I still get the same error after trying all of these fixes in every different possible combination. @jrieke could you please email me a copy of your org.neuroml.model folder and org.neuroml.model.injectingplugin folder so that I can try over-writing to see if anything changes ?

jrieke commented 10 years ago

@Allysquad Sure, I have sent you a zip. I will try to go through the whole setup process tomorrow again with the newest version of Geppetto and look if I have missed anything in the instructions...

Allysquad commented 10 years ago

@Jrieke I have been through everything now.

Both of those folders you sent me contain the exact same POM.xml files to mine. I moved:-

<module>../org.geppetto.model.neuroml</module>

To the bottom of the packaging order and everything else builds correctly.

So there must be something going wrong outwith those two POM's that is causing the JAR errors.

Screenshot of error

Link to the apache Exception page.

I noticed that your org.neuroml.model-1.2.1.jar file is 226KB where as mines is only 2KB. so it has to be that? Something i've not set up yet ?

You also have a target folder in your org.neuroml.model folder which i am missing.

jrieke commented 10 years ago

@Allysquad , good news, I have been able to replicate your error on a brand new installation on another Windows 7 machine! However, if I make a fresh clone of the repos on my own machine, mvn install completes successful. Hence, I think the error has something to do with the Maven installation, I will now investigate what's different between my 2 machines...

jrieke commented 10 years ago

@Allysquad , ah, now I've got it :) Looks like I already pointed you in the right direction, but not completely... Do everything as described in the docs (so just the regular clone command without the -b development), and add both

<module>../org.neuroml.model</module>
<module>../org.neuroml.model.injectingplugin</module>

to the pom.xml file in org.geppetto. I think that should do the trick for you, let me know what you get! (Btw, the fact that it worked on my machine without adding these lines is probably due to the fact that the jar files were already there from old builds).

@tarelli I think this isn't Windows specific - possibly the two lines above got lost at any stage in the master branch? It would be great if you could add them in the repo (unless there are no reasons against that)!

jrieke commented 10 years ago

Furthermore, I had to add

<module>../org.geppetto.testbackend</module>

eventually to make Geppetto run on Virgo. Basically, make sure that the pom.xml file in org.geppetto contains all modules (directories) in your geppetto-sources folder (except for org.geppetto itself, of course).

For the future, I think it would be great to have a short test in the utilities scripts that checks whether all modules are present (for example the update_server.py file could run a sanity check that all directories contain jars).

Allysquad commented 10 years ago

Words cannot describe how good this feels right now .

http://prntscr.com/43pfjg

tarelli commented 10 years ago

:D ᐧ

On 17 July 2014 22:10, Alli Love notifications@github.com wrote:

Words cannot describe how good this feels right now .

http://prntscr.com/43pfjg

— Reply to this email directly or view it on GitHub https://github.com/openworm/org.geppetto/issues/153#issuecomment-49366212 .

Matteo Cantarelli

email: matteo.cantarelli@gmail.com mobile : +44 (0)74 47540306 skype: tarelli1138 http://it.linkedin.com/in/matteocantarelli

gidili commented 10 years ago

Been there! every spike my heart skips a beat :)

Thanks for being so persistent, and thanks to Matteo and Johannes.

Thanks to you guys the next guy on the same setup will cruise smooth waters!

On 17 Jul 2014, at 22:10, Alli Love notifications@github.com wrote:

Words cannot describe how good this feels right now .

http://prntscr.com/43pfjg

— Reply to this email directly or view it on GitHub https://github.com/openworm/org.geppetto/issues/153#issuecomment-49366212.

jrieke commented 10 years ago

Haha, awesome that it worked out Alli!

jrieke commented 10 years ago

@tarelli Could you please include the 3 missing modules (org.neuroml.model, org.neuroml.model.injectingplugin, org.geppetto.testbackend) into the pom.xml file (preferrably in the master branch) so that there is no obstacle for any new volunteers? If there's any reason against this at the moment, please tell me and I'll add a remark in the source setup instructions.

tarelli commented 10 years ago

@jrieke org.geppetto.testbackend should be added (and I will add it although I was initially conflicted since it's a test bundle) but the org.neuroml ones shouldn't be needed as we are now taking them down from the Maven repository as opposed to what we were doing before which was treating them as Geppetto bundles as they were not deployed anywhere. There shouldn't even be sources for these (sources should be there only for these). What is the error that goes away when you add those in the module section?

jrieke commented 10 years ago

@tarelli I ran mvn install 1) without both modules 2) without org.neuroml.model 3) without org.neuroml.model.injectingplugin in the pom.xml file. The output from the command prompt is up here: https://drive.google.com/folderview?id=0B2xSDxvcBl6KdnBiTjlzR2ZaMUk&usp=sharing

tarelli commented 10 years ago

@jrieke I think the problem comes from the fact that neuroml and injectplugin were present in the config.json to begin with. I removed them. If you remove them from yours too (or pull down the latest), remove them from virgo (clean up the repository/usr and do an update_server again) I think it should work, let me know!

jrieke commented 10 years ago

@tarelli Cloned from the development branch and it works! Perfect, thanks for that!