Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document mvn caching #6583

Closed
scottdraves opened this issue Jan 3, 2018 · 14 comments
Closed

document mvn caching #6583

scottdraves opened this issue Jan 3, 2018 · 14 comments

Comments

@scottdraves
Copy link
Contributor

#6340
location of cache, as well as how to override it with an envar.

@benmccann
Copy link
Contributor

Is it possible for me to publish a jar locally from another project and then consume it in Beakerx with the recent Maven improvements?

@holgerbrandl
Copy link

I'd also be curious about such a feature. With https://github.com/ligee/kotlin-jupyter it's possible to use gradle like locators to fetch maven artifacts (including sub-dependencies if present) with

@file:DependsOnMaven(“de.mpicbg.scicomp:krangl:0.7”)

import krangl.*

irisData.glimpse()

I wonder if a similar functionality is planned for beakerx or already built-in?

@scottdraves
Copy link
Contributor Author

scottdraves commented Mar 15, 2018

Hi Holger thank you for your question.
BeakerX has maven support via a magic @classpath add mvn, see http://nbviewer.jupyter.org/github/twosigma/beakerx/blob/master/doc/groovy/ClasspathMagicCommands.ipynb

What Ben is asking for (?) is the ability to load not from maven central but a local package under development.

That's something I would like to support but I don't fully understand it yet.
If kotlin-jupyter does that I would like to know how, or if anyone can specify the needed API or magic then I can look into making it happen.

@scottdraves
Copy link
Contributor Author

That said, there seems to be a problem loading your library:
#6979
I think we have already seen this bug and I expect it to be addressed shortly.

@scottdraves
Copy link
Contributor Author

scottdraves commented Mar 16, 2018

@benmccann can you say exactly what you mean by "publish a jar locally"? https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html ?

@benmccann
Copy link
Contributor

benmccann commented Mar 17, 2018

Usually I'm installing a first party jar locally (vs a 3rd party jar as mentioned in that article). I.e. I'm developing a library and want to see the latest changes in BeakerX by running mvn install, gradle publishToMavenLocal, or sbt publishLocal

@jpallas
Copy link
Contributor

jpallas commented Mar 18, 2018

@benmccann Per the discussion at #6340 I think this does what you want:

%classpath config resolver local file:/Users/joe/.m2/repository

… with the understanding that, unless your artifact is versioned as a SNAPSHOT, you will not be able to get the latest changes unless you manually clear the BeakerX maven cache.

@holgerbrandl
Copy link

How can I clear the beakerx cache?

@scottdraves
Copy link
Contributor Author

Currently you would have to do it manually,

rm -rf $CONDA_PREFIX/share/beakerx/maven

and then restart your kernel. but yea there should be a magic for this, one that removes any repos as well: #6987.

@scottdraves
Copy link
Contributor Author

related: #6994

@scottdraves
Copy link
Contributor Author

include %classpath config resolver mvnLocal

@holgerbrandl
Copy link

Cool thanks!

@benmccann
Copy link
Contributor

@jpallas yes, that looks like it would do what I want. Though the last comment from @scottdraves looks like an even nicer way to do that

Typically that's done automatically when using Maven, SBT, etc. and doesn't require an extra step from the user. It would be nice to consider including the local repo by default

scottdraves added a commit that referenced this issue Apr 1, 2018
scottdraves added a commit that referenced this issue Apr 1, 2018
* #6994 document loading pom-type deps

* #6583 document location of maven cache, M2_HOME envar, classpath reset, local repositories
@30atm
Copy link

30atm commented Jul 22, 2020

beakerx does not seem to honour my .m2/settings.xml configuration
It is downloading to C drive only, even though I configured to use D drive

<settings  xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
  <localRepository>d:/Users/me/.m2/repository</localRepository>
</settings>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants