Re: is there a way I can use a co-worker's uberjar without unpacking it to ./.m2?

2015-09-14 Thread Lawrence Krubner
James, thank you for this. I understood that the local repo was not in 
~/.m2, I was simply hoping for a way to avoid having to install into ~/.m2. 

I did not know that I could use fictitious names for artifactId. I am 
grateful for the example you have posted. 



On Monday, September 14, 2015 at 10:56:46 AM UTC-4, James Elliott wrote:
>
> To hopefully help address another aspect of your question:
>
> This local repo is *not* inside ~/.m2
>
> It is a directory that can be part of your project, and checked into git 
> along with it. You just tell Leiningen where to find it using something 
> like this:
>
> :repositories {"project" "file:repo"}
>
> And then Leiningen will look for artifacts in the directory "repo" at the 
> project root.
>
> So, you do not have to put things into your actual local Maven repository. 
> But you *do* have to put artifacts into a properly structured Maven 
> repository (even if it is entirely fictitious, using made up artifact names 
> and versions), to use them with Leiningen.
>
> I do this in my project afterglow-max, for example, to build against an 
> API that is provided by its vendor as a jar file but not as a Maven 
> artifact. You can find the full project here, if it helps:
>
> https://github.com/brunchboy/afterglow-max#afterglow-max
>
> I hope this helps!
>   -James
>
> On Monday, September 14, 2015 at 3:48:24 AM UTC-5, Ralf Schmitt wrote:
>>
>> Lawrence Krubner  writes: 
>>
>> >> lein-localrepo helps with installing jar files into the 
>> >> local maven repository 
>> > 
>> > But they give examples like this: 
>> > 
>> > lein localrepo install foo-1.0.6.jar com.example/foo 1.0.6 
>> > 
>> > If I had that info I probably would not need to ask any questions 
>> > here. 
>>
>> I'm using lein localrepo to install a jar file with a completely made up 
>> version and group id. you just need to use the same values in 
>> project.clj. 
>>
>> -- 
>> Cheers 
>> Ralf 
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: is there a way I can use a co-worker's uberjar without unpacking it to ./.m2?

2015-09-14 Thread Lawrence Krubner
> I'm using lein localrepo to install a jar file with a completely made up 
> version and group id. you just need to use the same values in 
> project.clj. 

Fantastic! Thank you so much for this tip! This is exactly what I was 
looking for!


On Monday, September 14, 2015 at 4:48:24 AM UTC-4, Ralf Schmitt wrote:
>
> Lawrence Krubner > writes: 
>
> >> lein-localrepo helps with installing jar files into the 
> >> local maven repository 
> > 
> > But they give examples like this: 
> > 
> > lein localrepo install foo-1.0.6.jar com.example/foo 1.0.6 
> > 
> > If I had that info I probably would not need to ask any questions 
> > here. 
>
> I'm using lein localrepo to install a jar file with a completely made up 
> version and group id. you just need to use the same values in 
> project.clj. 
>
> -- 
> Cheers 
> Ralf 
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: is there a way I can use a co-worker's uberjar without unpacking it to ./.m2?

2015-09-14 Thread James Elliott
To hopefully help address another aspect of your question:

This local repo is *not* inside ~/.m2

It is a directory that can be part of your project, and checked into git 
along with it. You just tell Leiningen where to find it using something 
like this:

:repositories {"project" "file:repo"}

And then Leiningen will look for artifacts in the directory "repo" at the 
project root.

So, you do not have to put things into your actual local Maven repository. 
But you *do* have to put artifacts into a properly structured Maven 
repository (even if it is entirely fictitious, using made up artifact names 
and versions), to use them with Leiningen.

I do this in my project afterglow-max, for example, to build against an API 
that is provided by its vendor as a jar file but not as a Maven artifact. 
You can find the full project here, if it helps:

https://github.com/brunchboy/afterglow-max#afterglow-max

I hope this helps!
  -James

On Monday, September 14, 2015 at 3:48:24 AM UTC-5, Ralf Schmitt wrote:
>
> Lawrence Krubner > writes: 
>
> >> lein-localrepo helps with installing jar files into the 
> >> local maven repository 
> > 
> > But they give examples like this: 
> > 
> > lein localrepo install foo-1.0.6.jar com.example/foo 1.0.6 
> > 
> > If I had that info I probably would not need to ask any questions 
> > here. 
>
> I'm using lein localrepo to install a jar file with a completely made up 
> version and group id. you just need to use the same values in 
> project.clj. 
>
> -- 
> Cheers 
> Ralf 
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: is there a way I can use a co-worker's uberjar without unpacking it to ./.m2?

2015-09-14 Thread Ralf Schmitt
Lawrence Krubner  writes:

>> lein-localrepo helps with installing jar files into the 
>> local maven repository
>
> But they give examples like this:
>
> lein localrepo install foo-1.0.6.jar com.example/foo 1.0.6
>
> If I had that info I probably would not need to ask any questions
> here.

I'm using lein localrepo to install a jar file with a completely made up
version and group id. you just need to use the same values in
project.clj.

-- 
Cheers
Ralf

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: is there a way I can use a co-worker's uberjar without unpacking it to ./.m2?

2015-09-14 Thread Lawrence Krubner
> lein-localrepo helps with installing jar files into the 
> local maven repository

But they give examples like this:

lein localrepo install foo-1.0.6.jar com.example/foo 1.0.6

If I had that info I probably would not need to ask any questions here. But 
more to the point, I'm asking if I can avoid putting stuff in ~/.m2



On Monday, September 14, 2015 at 3:56:23 AM UTC-4, Ralf Schmitt wrote:
>
> Alex Miller > writes: 
>
> > Something like this can work but you need to have the proper path in the 
> > local maven_repository. You have the repository named local. Inside the 
> > repo, every artifact has a groupID (the first part of the dependency), 
> the 
> > artifactID, and the version. If you had a dependency like: 
> > 
> > [SSAM "0.1.0"] 
> > 
> > the jar should be at: 
> > 
> > 
> /Users/rollio/projects/rollio/nlp-housing/maven_repository/SSAM/SSAM/0.1.0/SSAM-0.1.0.jar
>  
>
> > 
> > where under the repo, it's at groupID/artifactID/artifactID-version.jar 
> > 
> > You don't need to specify that SSAM is in local - Maven will check all 
> > repos for it and find it in local. 
> > 
> > I've gotten this to work before and it's definitely possible. I feel 
> like 
> > I'm forgetting some other detail though. I'm not sure if you need a 
> pom.xml 
> > or any of the other repo metadata in that directory structure. 
>
> lein-localrepo helps with installing jar files into the local maven 
> repository: 
>
> https://github.com/kumarshantanu/lein-localrepo 
>
> -- 
> Cheers 
> Ralf 
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: is there a way I can use a co-worker's uberjar without unpacking it to ./.m2?

2015-09-14 Thread Ralf Schmitt
Alex Miller  writes:

> Something like this can work but you need to have the proper path in the 
> local maven_repository. You have the repository named local. Inside the 
> repo, every artifact has a groupID (the first part of the dependency), the 
> artifactID, and the version. If you had a dependency like:
>
> [SSAM "0.1.0"]
>
> the jar should be at:
>
> /Users/rollio/projects/rollio/nlp-housing/maven_repository/SSAM/SSAM/0.1.0/SSAM-0.1.0.jar
>
> where under the repo, it's at groupID/artifactID/artifactID-version.jar
>
> You don't need to specify that SSAM is in local - Maven will check all 
> repos for it and find it in local. 
>
> I've gotten this to work before and it's definitely possible. I feel like 
> I'm forgetting some other detail though. I'm not sure if you need a pom.xml 
> or any of the other repo metadata in that directory structure.

lein-localrepo helps with installing jar files into the local maven
repository:

https://github.com/kumarshantanu/lein-localrepo

-- 
Cheers
Ralf

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: is there a way I can use a co-worker's uberjar without unpacking it to ./.m2?

2015-09-13 Thread Alex Miller
Something like this can work but you need to have the proper path in the 
local maven_repository. You have the repository named local. Inside the 
repo, every artifact has a groupID (the first part of the dependency), the 
artifactID, and the version. If you had a dependency like:

[SSAM "0.1.0"]

the jar should be at:

/Users/rollio/projects/rollio/nlp-housing/maven_repository/SSAM/SSAM/0.1.0/SSAM-0.1.0.jar

where under the repo, it's at groupID/artifactID/artifactID-version.jar

You don't need to specify that SSAM is in local - Maven will check all 
repos for it and find it in local. 

I've gotten this to work before and it's definitely possible. I feel like 
I'm forgetting some other detail though. I'm not sure if you need a pom.xml 
or any of the other repo metadata in that directory structure.


On Sunday, September 13, 2015 at 6:54:34 PM UTC-5, Lawrence Krubner wrote:
>
> I am lazy so I was hoping to find a simple way to do this. My co-worker 
> has written a complex app in Java which does natural language processing. 
> He delivered it to me as an uberjar. My app is suppose to call his app as a 
> library. 
>
> The path to the file is: 
>
> /Users/rollio/projects/rollio/nlp-housing/maven_repository/SSAM.jar
>
> I was hoping I could do something like this in my project.clj:
>
> [local/SSAM]
>
> and: 
>
>   :repositories {"local" ~(str (.toURI (java.io.File. 
> "maven_repository")))}
>
> but when I do: 
>
> lein uberjar
>
> I get: 
>  
> (Could not find artifact SSAM:SSAM:jar:jar in central (
> http://repo1.maven.org/maven2/))
> (Could not find artifact SSAM:SSAM:jar:jar in clojars (
> https://clojars.org/repo/))
> (Could not find artifact SSAM:SSAM:jar:jar in local 
> (file:/Users/rollio/projects/rollio/nlp-housing/maven_repository/))
>
> Is there a way I can simply consume that, or do I have to unpack it and 
> install it to ./.m2 and all of that jazz? 
>
>
>
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.