drip icon indicating copy to clipboard operation
drip copied to clipboard

drip doesn't work with maven

Open sanel opened this issue 13 years ago • 10 comments

Hi,

I'm trying to force maven to work with drip. Exporting JAVACMD to drip path will instruct maven to use drip; however, on each 'mvn' call new java instance will be started but not reused existing one.

sanel avatar Dec 17 '12 09:12 sanel

I suspect that maven is calling drip with different arguments every time. To test this, do:

drip kill
less ~/.drip/0.1.8/*/opts

ninjudd avatar Dec 19 '12 03:12 ninjudd

I forgot to say, run some maven commands between those two commands.

ninjudd avatar Dec 19 '12 03:12 ninjudd

Hm... AFAICS opts file remains the same. However, I noticed the daemon would use (I thing it is pid) different each time, e.g. ~/.drip/0.1.8/874419bce03d5ddc469f97bbf1e2c2a6f404e7e3/3901-1 and ~/.drip/0.1.8/874419bce03d5ddc469f97bbf1e2c2a6f404e7e3/3614-1

Any idea?

sanel avatar Dec 20 '12 14:12 sanel

Is someone looking at this? To me, maven integration is the sole purpose of using drip. I've noticed that if an mvn command failed pressing ctrl-c and trying again works. And it doesn't fail every second time. But I'm unsure if drip is in action or not (I've followed the instructions on enabling drip for maven and I see the several drip processes alive).

emilb avatar Jan 21 '13 22:01 emilb

Detailed instructions for how to reproduce this would be a good place to start.

ninjudd avatar Jan 21 '13 22:01 ninjudd

Sorry, since it happened to me (i.e the process hanging) just by following the instructions I thought it was a clear case. I understand though, reproducible instructions are best. I'll get an example going within a week from now. That will include checking out a Java and Maven project, building it and then some operation that causes the failure.

emilb avatar Jan 21 '13 23:01 emilb

@emilb I didn't realize someone added Maven instructions to the Wiki.

https://github.com/flatland/drip/wiki/Maven

Going to check if these are enough to reproduce the problem for me.

ninjudd avatar Jan 21 '13 23:01 ninjudd

I believe that drip 0.2.0 fixes this issue. Now drip spins up a spare jvm for maven:

fallout:~ master$ drip ps
69837 org.flatland.drip.Main org.codehaus.plexus.classworlds.launcher.Launcher /Users/justin/.drip/0.2.0/eba2694002382a580c7f29668b178cd3a774c859/69808-1 -ea -Xmx512m -XX:PermSize=256m -Dclassworlds.conf=/usr/share/maven/bin/m2.conf -Dmaven.home=/usr/share/maven -Djava.awt.headless=true

However, it doesn't speed up maven much at all:

fallout:~ master$ time mvn
[INFO] Scanning for projects...
...
real    0m1.319s
user    0m1.898s
sys 0m0.136s
fallout:~ master$ time mvn
[INFO] Scanning for projects...
...
real    0m1.294s
user    0m0.065s
sys 0m0.066s

If someone wants to take a look at possible default values for DRIP_INIT_CLASS and DRIP_INIT that will make maven faster, I'd be happy to add them to bin/drip.

ninjudd avatar Jan 26 '13 02:01 ninjudd

For more information, read the "Pre-Initialization" section of the README.

ninjudd avatar Jan 26 '13 02:01 ninjudd

Was this issue ever resolved?

evnm avatar Aug 04 '15 00:08 evnm