Eclipse clojure & maven

72 views
Skip to first unread message

Zlatko Josic

unread,
Mar 2, 2011, 5:37:07 AM3/2/11
to clo...@googlegroups.com
Hi,

I use eclipse clojure & maven for developing applications. I have clojure maven plugin installed.  
I start script with clojure:run goal. The script creates server socket. After i terminate script from
eclipse the socket is stil alive. When I start script again I got address already in use error.

Am I doing something wrong? Is there other way to start clojure script/program from maven?


Thanks

Zlaja

P.S


This is may script :

(ns clojure.examples.example5)

(import (java.net ServerSocket))


(def server-socket (new ServerSocket 5432))


;Creates programs loop and prints message every second

(loop
  []
  (println "server waits for a client")
  (let [client-socket (.accept server-socket)]
  (println "client accepted")
  (recur)))


and this is may pom.xml file :

<modelVersion>4.0.0</modelVersion>
<groupId>com.amsi</groupId>
<artifactId>module-server</artifactId>
<version>0.1</version>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>

<groupId>com.theoryinpractise</groupId>

<artifactId>clojure-maven-plugin</artifactId>

<version>1.3.2</version>
<configuration>
<script>src/clojure/examples/example5.clj</script>
</configuration>

<executions>

<execution>

<id>compile-clojure</id>

<phase>compile</phase>

<goals>

<goal>compile</goal>

</goals>

</execution>

</executions>

</plugin>

</plugins>
</build>

<dependencies>

<dependency>

<groupId>org.clojure</groupId>

<artifactId>clojure</artifactId>

<version>1.2.0</version>

</dependency>

<dependency>

<groupId>org.clojure</groupId>

<artifactId>clojure-contrib</artifactId>

<version>1.2.0</version>

</dependency>

</dependencies>


<repositories>
<repository>
<id>clojure-releases</id>
</repository>

<repository>
<id>clojars</id>
</repository>
</repositories>
</project>




Laurent PETIT

unread,
Mar 2, 2011, 6:35:11 AM3/2/11
to clo...@googlegroups.com, Zlatko Josic
Hi,

It's not clear to me, from the subject of your email nor its content, whether this is a pure "clojure-maven-plugin" issue, or also related to Eclipse, and/or related to Counterclockwise.

Cheers,

--
Laurent

2011/3/2 Zlatko Josic <zlatko...@gmail.com>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply all
Reply to author
Forward
0 new messages