Hi mark, I am curious about why you need to convert. I am thinking of using 
TC again myself soon.

Currently in hudson I just do lein commands and use lein test-out plugin so 
the test reports can be shown as they would do from junit tests.

you could do the same with TC or failing that have a first build step that 
does lein pom and then the main build step uses the output of that? or are 
there other particular advantages of maven on TC? or some feature lein pom 
does not handle that you need?

Thanks,
Henry

On Friday, June 13, 2014 4:34:54 PM UTC+1, Mark Watson wrote:
>
> Hey guys,
>
> New to Maven and need to convert my leiningen project to Maven to 
> integrate with TeamCity.
>
> I can run:
>
> mvn clean install
>
>
> and it builds the .jar file.
>
> However, when I try to run the jar file: 
>
> java -jar target/my-app-jar-with-dependencies.jar
>
>
> I get the error: 
>
> Error: Could not find or load main class my-namespace.core
>
>
> My namespace definition looks like:
>
> (ns my-namespace.core
>   (:gen-class))
>
> My pom.xml looks like:
>
>     <build>
>         <plugins>
>             <plugin>
>                 <groupId>com.theoryinpractise</groupId>
>                 <artifactId>clojure-maven-plugin</artifactId>
>                 <version>1.3.20</version>
>                 <configuration>
>                     <script>src/my-namespace/run.clj</script>
>                     <testscript>test/my-namespace/run_test.clj</testscript>
>                 </configuration>
>             </plugin>
>
>             <plugin>
>                 <artifactId>maven-jar-plugin</artifactId>
>                 <version>2.4</version>
>                 <configuration>
>                     <archive>
>                         <manifest>
>                             <mainClass>my-namespace.core</mainClass>
>                         </manifest>
>                     </archive>
>                 </configuration>
>             </plugin>
>
>             <plugin>
>                 <artifactId>maven-assembly-plugin</artifactId>
>                 <executions>
>                     <execution>
>                         <phase>package</phase>
>                         <goals>
>                             <goal>single</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>                 <configuration>
>                     <archive>
>                         <manifest>
>                             <mainClass>my-namespace.core</mainClass>
>                         </manifest>
>                     </archive>
>                     <descriptorRefs>
>                         <descriptorRef>jar-with-dependencies</descriptorRef>
>                     </descriptorRefs>
>                 </configuration>
>             </plugin>
>
>         </plugins>
>     </build>
>
> What am I doing wrong? Thanks!
>

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

Reply via email to