Re: Trying to make an uberjar

2017-03-04 Thread Cecil Westerhof
2017-03-04 21:15 GMT+01:00 Jeaye :

> > > > ​That was what was needed. Thanks.
> > > >
> > > > And I could remove the added:
> > > > :profiles {
> > > > :uberjar {:aot :all}
> > > >   }
> > >
> > > For the best performance, you likely want AOT (ahead-of-time)
> compilation.
> > > In general, I'd recommend keeping that uberjar profile with `{:aot
> :all}`.
> > >
> >
> > ​That is why it is smart to communicate small non essential changes:
> people
> > can set you on the right track. :-)
> >
> > I put that back. I now removed the ‘:aot [quotes.core]’, or should I keep
> > that also?
>
> There's no need for `:aot [quotes.core]` if you're using `:aot :all` in
> your uberjar profile. The only other reason you'd want it is to AOT that
> namespace outside of the uberjar profile. That's up to you, but typically
> not a concern.
>

​Thank you. I thought so, but it is better to be sure.

-- 
Cecil Westerhof

-- 
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: Trying to make an uberjar

2017-03-04 Thread Jeaye
On Sat, Mar 04, 2017 at 02:44:31PM +0100, Cecil Westerhof wrote:
> 2017-03-04 8:13 GMT+01:00 Jeaye :
> 
> > On Sat, Mar 04, 2017 at 08:09:39AM +0100, Cecil Westerhof wrote:
> > > 2017-03-04 7:44 GMT+01:00 Jeaye :
> > >
> > > > Cecil,
> > > >
> > > > > But when running:
> > > > > lein uberjar
> > > > > I still get:
> > > > > This code is executed when starting Clojure.
> > > > > Compiling quotes.core
> > > > > Warning: The Main-Class specified does not exist within the jar. It
> > may
> > > > not
> > > > > be executable as expected. A gen-class directive may be missing in
> > the
> > > > > namespace which contains the main method, or the namespace has not
> > been
> > > > > AOT-compiled.
> > > > > Created /home/cecil/Clojure/Quotes/target/quotes-0.0.1.jar
> > > > > Created /home/cecil/Clojure/Quotes/target/quotes-0.0.1-
> > standalone.jar
> > > > >
> > > > > What do I need to change to make an uberjar. (Jars are generated, but
> > > > > cannot be used.)
> > > >
> > > > The warning which lein provided is trying to tell you exactly what you
> > > > need to do. In the `ns` form of your quotes.core namespace, you should
> > add
> > > > a (:gen-class). Example:
> > > >
> > > > ```clojure
> > > > (ns quotes.core
> > > >   (:gen-class))
> > > > ```
> > > >
> > >
> > > ​That was what was needed. Thanks.
> > >
> > > And I could remove the added:
> > > :profiles {
> > > :uberjar {:aot :all}
> > >   }
> >
> > For the best performance, you likely want AOT (ahead-of-time) compilation.
> > In general, I'd recommend keeping that uberjar profile with `{:aot :all}`.
> >
> 
> ​That is why it is smart to communicate small non essential changes: people
> can set you on the right track. :-)
> 
> I put that back. I now removed the ‘:aot [quotes.core]’, or should I keep
> that also?
> 
> When I first got the error I found two different pieces of advice. One for
> both changes. When those did not work I asked here.
> 
> 
> I should pick up Clojure again. I only did one little project (long ago) to
> try it out. But that is no way to learn a language. Sadly there is no real
> use here for it. :'-(

There's no need for `:aot [quotes.core]` if you're using `:aot :all` in your 
uberjar profile. The only other reason you'd want it is to AOT that namespace 
outside of the uberjar profile. That's up to you, but typically not a concern.

-- 
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.


signature.asc
Description: PGP signature


Re: Trying to make an uberjar

2017-03-04 Thread Cecil Westerhof
2017-03-04 8:13 GMT+01:00 Jeaye :

> On Sat, Mar 04, 2017 at 08:09:39AM +0100, Cecil Westerhof wrote:
> > 2017-03-04 7:44 GMT+01:00 Jeaye :
> >
> > > Cecil,
> > >
> > > > But when running:
> > > > lein uberjar
> > > > I still get:
> > > > This code is executed when starting Clojure.
> > > > Compiling quotes.core
> > > > Warning: The Main-Class specified does not exist within the jar. It
> may
> > > not
> > > > be executable as expected. A gen-class directive may be missing in
> the
> > > > namespace which contains the main method, or the namespace has not
> been
> > > > AOT-compiled.
> > > > Created /home/cecil/Clojure/Quotes/target/quotes-0.0.1.jar
> > > > Created /home/cecil/Clojure/Quotes/target/quotes-0.0.1-
> standalone.jar
> > > >
> > > > What do I need to change to make an uberjar. (Jars are generated, but
> > > > cannot be used.)
> > >
> > > The warning which lein provided is trying to tell you exactly what you
> > > need to do. In the `ns` form of your quotes.core namespace, you should
> add
> > > a (:gen-class). Example:
> > >
> > > ```clojure
> > > (ns quotes.core
> > >   (:gen-class))
> > > ```
> > >
> >
> > ​That was what was needed. Thanks.
> >
> > And I could remove the added:
> > :profiles {
> > :uberjar {:aot :all}
> >   }
>
> For the best performance, you likely want AOT (ahead-of-time) compilation.
> In general, I'd recommend keeping that uberjar profile with `{:aot :all}`.
>

​That is why it is smart to communicate small non essential changes: people
can set you on the right track. :-)

I put that back. I now removed the ‘:aot [quotes.core]’, or should I keep
that also?

When I first got the error I found two different pieces of advice. One for
both changes. When those did not work I asked here.


I should pick up Clojure again. I only did one little project (long ago) to
try it out. But that is no way to learn a language. Sadly there is no real
use here for it. :'-(

-- 
Cecil Westerhof

-- 
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: Trying to make an uberjar

2017-03-03 Thread Jeaye
On Sat, Mar 04, 2017 at 08:09:39AM +0100, Cecil Westerhof wrote:
> 2017-03-04 7:44 GMT+01:00 Jeaye :
> 
> > Cecil,
> >
> > > But when running:
> > > lein uberjar
> > > I still get:
> > > This code is executed when starting Clojure.
> > > Compiling quotes.core
> > > Warning: The Main-Class specified does not exist within the jar. It may
> > not
> > > be executable as expected. A gen-class directive may be missing in the
> > > namespace which contains the main method, or the namespace has not been
> > > AOT-compiled.
> > > Created /home/cecil/Clojure/Quotes/target/quotes-0.0.1.jar
> > > Created /home/cecil/Clojure/Quotes/target/quotes-0.0.1-standalone.jar
> > >
> > > What do I need to change to make an uberjar. (Jars are generated, but
> > > cannot be used.)
> >
> > The warning which lein provided is trying to tell you exactly what you
> > need to do. In the `ns` form of your quotes.core namespace, you should add
> > a (:gen-class). Example:
> >
> > ```clojure
> > (ns quotes.core
> >   (:gen-class))
> > ```
> >
> 
> ​That was what was needed. Thanks.
> 
> And I could remove the added:
> :profiles {
> :uberjar {:aot :all}
>   }

For the best performance, you likely want AOT (ahead-of-time) compilation. In 
general, I'd recommend keeping that uberjar profile with `{:aot :all}`.

-- 
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.


signature.asc
Description: PGP signature


Re: Trying to make an uberjar

2017-03-03 Thread Cecil Westerhof
2017-03-04 7:44 GMT+01:00 Jeaye :

> Cecil,
>
> > But when running:
> > lein uberjar
> > I still get:
> > This code is executed when starting Clojure.
> > Compiling quotes.core
> > Warning: The Main-Class specified does not exist within the jar. It may
> not
> > be executable as expected. A gen-class directive may be missing in the
> > namespace which contains the main method, or the namespace has not been
> > AOT-compiled.
> > Created /home/cecil/Clojure/Quotes/target/quotes-0.0.1.jar
> > Created /home/cecil/Clojure/Quotes/target/quotes-0.0.1-standalone.jar
> >
> > What do I need to change to make an uberjar. (Jars are generated, but
> > cannot be used.)
>
> The warning which lein provided is trying to tell you exactly what you
> need to do. In the `ns` form of your quotes.core namespace, you should add
> a (:gen-class). Example:
>
> ```clojure
> (ns quotes.core
>   (:gen-class))
> ```
>

​That was what was needed. Thanks.

And I could remove the added:
:profiles {
:uberjar {:aot :all}
  }

-- 
Cecil Westerhof

-- 
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: Trying to make an uberjar

2017-03-03 Thread Jeaye
Cecil,

> But when running:
> lein uberjar
> I still get:
> This code is executed when starting Clojure.
> Compiling quotes.core
> Warning: The Main-Class specified does not exist within the jar. It may not
> be executable as expected. A gen-class directive may be missing in the
> namespace which contains the main method, or the namespace has not been
> AOT-compiled.
> Created /home/cecil/Clojure/Quotes/target/quotes-0.0.1.jar
> Created /home/cecil/Clojure/Quotes/target/quotes-0.0.1-standalone.jar
> 
> What do I need to change to make an uberjar. (Jars are generated, but
> cannot be used.)

The warning which lein provided is trying to tell you exactly what you need to 
do. In the `ns` form of your quotes.core namespace, you should add a 
(:gen-class). Example:

```clojure
(ns quotes.core
  (:gen-class))
```

Cheers,
Jeaye

-- 
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.


signature.asc
Description: PGP signature


Trying to make an uberjar

2017-03-03 Thread Cecil Westerhof
Until now I can run my project without a problem with:
lein trampoline run &

But I was told that I should use an uberjar.

My project.clj was:
(defproject quotes "0.0.1"
  :description "Initial quotes application"
  :url "http://example.com/FIXME;
  :dependencies [[org.clojure/clojure"1.8.0"]
 [clj-time   "0.12.0"]
 [com.h2database/h2  "1.3.176"]
 [instaparse "1.4.2"]
 [org.clojure/math.numeric-tower "0.0.4"]
 [seesaw "1.4.5"]
 [yesql  "0.5.3"]]
  :main quotes.core
  :jvm-opts ["-Xmx320m"]
)

That did not work. So I changed it to:
(defproject quotes "0.0.1"
  :description "Initial quotes application"
  :url "http://example.com/FIXME;
  :dependencies [[org.clojure/clojure"1.8.0"]
 [clj-time   "0.12.0"]
 [com.h2database/h2  "1.3.176"]
 [instaparse "1.4.2"]
 [org.clojure/math.numeric-tower "0.0.4"]
 [seesaw "1.4.5"]
 [yesql  "0.5.3"]]
  :main quotes.core
  :aot [quotes.core]
  :profiles {
:uberjar {:aot :all}
  }
  :jvm-opts ["-Xmx320m"]
)

But when running:
lein uberjar
I still get:
This code is executed when starting Clojure.
Compiling quotes.core
Warning: The Main-Class specified does not exist within the jar. It may not
be executable as expected. A gen-class directive may be missing in the
namespace which contains the main method, or the namespace has not been
AOT-compiled.
Created /home/cecil/Clojure/Quotes/target/quotes-0.0.1.jar
Created /home/cecil/Clojure/Quotes/target/quotes-0.0.1-standalone.jar

What do I need to change to make an uberjar. (Jars are generated, but
cannot be used.)

-- 
Cecil Westerhof

-- 
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.