Ah, forgot about that.

Still having the same issue with that resolved unfortunately.



On Friday, June 13, 2014 12:08:00 PM UTC-4, Alex Miller wrote:
>
> Not sure if this is the only thing to change, but :
>
>    <mainClass>my-namespace.core</mainClass>
>
> should be:
>
>
>    <mainClass>my_namespace.core</mainClass>
>
> While Clojure uses -'s in namespace names, they are always _'s in the 
> output package/class names.
>
>
> On Friday, June 13, 2014 10:34:54 AM UTC-5, 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