greptilian logo

IRC log for #sourcefu, 2013-01-29

http://sourcefu.com

| Channels | #sourcefu index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

All times shown according to UTC.

Time S Nick Message
02:02 pdurbin Skeleton: Beautiful Boilerplate for Responsive, Mobile-Friendly Development - http://www.getskeleton.com
02:03 pdurbin recommended in http://creativecodingpodcast.com/?p=250
02:06 semiosis nice
02:28 pdurbin they're talking about osc as the new midi
02:28 pdurbin http://opensoundcontrol.org/what-difference-between-osc-and-midi
02:33 pdurbin semiosis: +1 on throwing away the first version
02:34 pdurbin spilth: regarding ruby testing i could probably drag this guy in here: https://github.com/seanhussey/woulda ... he's a friend of mine
13:47 pdurbin ooo, i like --quiet with mvn
14:15 pdurbin helpful: git howto: revert a commit already pushed to a remote repository - Christoph Rüegg - http://christoph.ruegg.name/blog/2010/5/5/git-howto-revert-a-commit-already-pushed-to-a-remote-reposit.html
14:16 pdurbin i just re-wrote history at https://github.com/pdurbin/maven-hello-world :)
14:19 pdurbin as that blog post says... "you should do it rather fast before anyone fetches the bad commits"
15:09 spilth joined #sourcefu
15:13 spilth I remember the first time I heard about MIDI. I thought it was the coolest thing ever. Still use it today :-)
15:14 spilth semiosis: Thanks for the discussion on TDD. Had to run off last night.
15:15 spilth On the way in I decided I was going to take care of a few things and then spend a good chunk of my day digging into RSpec more (http://rspec.info/) which is what I'm using.
15:15 spilth We'll see how reality plays out
15:18 pdurbin it was some good chatter
15:18 pdurbin i'm obviously confused about maven and dependencies. i just voted up java - NoClassDefFoundError on Maven dependency - Stack Overflow - http://stackoverflow.com/questions/10568275/noclassdeffounderror-on-maven-dependency/10569417#10569417
15:19 pdurbin "This plugin provides the capability to package the artifact in an uber-jar, including its dependencies and to shade - i.e. rename - the packages of some of the dependencies" -- http://maven.apache.org/plugins/maven-shade-plugin/
15:20 spilth Are you having the same problem as that question?
15:21 pdurbin kind of :)
15:21 spilth Duh, this release notes page I update every release should just be a Markdown file... stupid manual HTML editing...
15:21 pdurbin at a high level i'm trying to get "Search using SolrJ" working from http://www.solrtutorial.com/solrj-tutorial.html
15:24 spilth And what's the error/problem you have?
15:25 pdurbin one sec
15:27 pdurbin \o/
15:27 pdurbin westmaas: i think i got \o/ from you
15:27 spilth Does that mean you figured it out?
15:28 spilth looks like victory arms...
15:28 pdurbin yes. victory: http://en.wikipedia.org/wiki/%5Co/
15:28 pdurbin bu
15:28 pdurbin but
15:28 pdurbin this thing is a mess
15:28 pdurbin let me throw it on github so you can see it
15:30 westmaas haha
15:30 pdurbin wikipedia says it can mean exasperation too but f that
15:37 spilth Huh, 128GB iPad released.
15:38 pdurbin spilth: add solrj search example · bdb91ef · dvn/solrpoc - https://github.com/dvn/solrpoc/commit/bdb91ef
15:40 spilth fyi - http://mojo.codehaus.org/exec-maven-plugin/usage.html
15:40 spilth which I think would then allow you to just do: mvn clean exec
15:41 pdurbin yeah, i saw that. thanks. was thinking of trying that
15:41 spilth what is the error you're getting though?
15:44 pdurbin if i get rid of the whole plugins sections in my pom.xml (maven-shade-plugin) and run go.sh, i get this: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/solr/common/params/SolrParams
15:48 ben_e joined #sourcefu
15:50 larsks joined #sourcefu
15:55 spilth but why are you getting rid of the plugins section?
15:55 pdurbin well, i only added it to get the damn thing to run
15:56 pdurbin is there another way?
15:57 spilth Your project is relying on a library from Solr... how are you specifying that?
15:57 pdurbin in my pom.xml
15:58 spilth <scope>compile</scope>
15:58 semiosis welcome to maven
15:58 pdurbin yeah, i tried changing compile to other things
15:58 spilth Haven't read this yet, but it was in DevOps Weekly - http://nealford.com/memeagora/2013/01/22/why_everyone_eventually_hates_maven.html
15:59 spilth Did you try "runtime"?
15:59 semiosis "Q: What's the difference between Ant and Maven? A: The creator of Ant has apologized." https://twitter.com/technomancy/status/10994115673
16:00 pdurbin spilth: yeah
16:00 spilth oof
16:00 pdurbin semiosis: keep the links comin'
16:00 pdurbin spilth: can you git clone my repo and try it?
16:00 spilth I did
16:00 pdurbin cool!
16:00 pdurbin i'm all about executable troubleshooting :)
16:01 pdurbin spilth: so it compiled and ran?
16:01 spilth I have to do a deploy right now
16:01 spilth no, just got the vagrant box up so far
16:01 pdurbin ok
16:01 pdurbin for this you can ignore vagrant...
16:02 pdurbin you can just cd to the solr-search director and run to go.sh script
16:02 pdurbin run the
16:02 spilth ok
16:02 spilth will do that in the background. deploy time
16:02 semiosis pdurbin: whats the problem?
16:02 pdurbin thanks :)
16:03 pdurbin semiosis: http://irclog.greptilian.com/sourcefu/2013-01-29#i_2276
16:03 semiosis yeah that looked to me like the middle of troubleshooting something
16:04 semiosis btw, you can combine maven lifecycles "mvn clean && mvn package" => "mvn clean package"
16:04 semiosis s/lifecycles/phases/
16:04 spilth symbol  : method set(java.lang.String,java.lang.String)
16:04 spilth location: class org.apache.solr.common.params.ModifiableSolrParams
16:04 semiosis i'm still not 100% with the terms
16:05 pdurbin semiosis: ah, `mvn clean package`. thanks
16:06 spilth that's what I was trying to say above with `mvn clean exec`. exec likely depends on `package`
16:06 pdurbin semiosis: so that repo works. it's post-troubleshooting, i guess. but i don't understand why i had to throw maven-shade-plugin into https://github.com/dvn/solrpoc/blob/master/solr-search/pom.xml
16:07 spilth https://github.com/spilth/maven-book/blob/master/src/pragmatic-guide-to-maven.md#part-3-building-projects-with-maven (lifecycle/phase descriptions)
16:07 pdurbin i though maven would help with with classpath stuff and let me run the program
16:08 spilth It can't build a classpath for a library you have't declared you're using?
16:08 * pdurbin sends the ant vs maven tweet to my team
16:08 pdurbin spilth: i did declare it in my pom.xml
16:08 pdurbin maven correctly downloads the solrj jars
16:08 pdurbin and i can compile
16:08 pdurbin i just can't run it
16:09 semiosis pdurbin: you need the shade plugin to bundle the dependency jars into the build jar
16:09 semiosis and you can use maven-jar-plugin to specify the name of the class with the main method to use when executing the jar as in 'java -jar uber-my-project.jar'
16:10 pdurbin crimsonfubot: lucky maven-jar-plugin
16:10 crimsonfubot pdurbin: http://maven.apache.org/plugins/maven-jar-plugin/
16:10 pdurbin hmm
16:11 pdurbin maybe i *should* have looked into that exec plugin first... maybe it handles the classpath stuff
16:11 semiosis http://pastie.org/5939837
16:11 semiosis exec plugin is for running things before packaging afaict
16:12 pdurbin that's fine. i don't particularly care about packaging. i just want to run it
16:12 semiosis mvn exec:java <-- runs the compiled project from target, produced by build phase, not package phase
16:12 semiosis or exec:exec
16:13 pdurbin i guess i need a mainClass
16:13 semiosis +1
16:13 spilth heh
16:16 semiosis http://pastie.org/5939945
16:17 semiosis that previous pastie uses a literal classname but really both of these pasties could be in the same project, and use a property to fill in the mainclass in both plugin configs
16:17 semiosis a project i have been working on lately has both, so i use mvn exec:java to run & debug iteratively while i work, then build an executable jar (shade+jar) to distribute to my users
16:18 pdurbin hmm, <mainClass>edu.harvard.iq.pdurbi​n.solrjsearcher.App</mainClass> doesn't work. i'm looking at http://mojo.codehaus.org/exec-maven-plugin/usage.html
16:18 pdurbin semiosis: so you *do* use this shade thing
16:19 semiosis yes, in several projects... anywhere i want to have an executable jar to give out
16:19 semiosis a couple projects are desktop swing apps, at least one more is a daemon i deploy to servers
16:20 semiosis pdurbin: check target/build, does that App.class file exist there?
16:21 pdurbin target/classes/edu/harvard/iq/p​durbin/solrjsearcher/App.class
16:21 semiosis yeah classes not build
16:21 pdurbin classes not build?
16:22 semiosis i said target/build but target/classes is right
16:23 pdurbin wait. now it's working maybe. hmm. also: 3 ways to run Java main from Maven | Vineet Manohar's blog - http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/
16:24 pdurbin ah. ok. works fine. awesome
16:24 semiosis great
16:26 pdurbin use exec-maven-plugin and `mvn exec:java` · de614cb · dvn/solrpoc - https://github.com/dvn/solrpoc/commit/de614cb5902b1504b8385d435425b706f84a5a34
16:27 pdurbin heh. i guess i put some extra cruft in there. "argument1". oh well
16:29 semiosis pdurbin: curious how this app is deployed/distributed and run
16:29 pdurbin semiosis: oh, that git repo is a mess. i'm just trying to feed data into solr and later use solrj to search it
16:30 pdurbin this is my data so far: https://github.com/dvn/solrpoc/blob/master/data/1.xml
16:30 semiosis are you using netbeans to develop this?
16:30 pdurbin which gets created from https://github.com/dvn/solrpoc/blob/master/perl/api.pl
16:31 pdurbin nope. vim :)
16:31 pdurbin but man i need to learn netbeans better
16:32 pdurbin anyway, all this chatter was very helpful. thanks!
16:32 semiosis yw
16:32 pdurbin so yeah, now that i can get solrj to do a search i'll start thinking about how to put this into our java ee app (dataverse network)
16:56 spilth http://www.infoq.com/presentations/Simple-Made-Easy "Rich Hickey emphasizes simplicity’s virtues over easiness’, showing that while many choose easiness they may end up with complexity, and the better way is to choose easiness along the simplicity path. "
17:04 spilth "If you want everything to be familiar you will never learn anything new"
17:13 spilth lots of good insight in this presentation
17:49 pdurbin keep it simple stupid
17:54 ben_e simplicity is the most difficult thing to secure in this world; it is the last limit of experience and the last effort of genius. --george sand
17:54 ben_e stuck in my sigfile many years ago
17:55 ben_e still sounds right to me
17:55 pdurbin +1

| Channels | #sourcefu index | Today | | Search | Google Search | Plain-Text | plain, newest first | summary

http://sourcefu.com