Here's my sequence and results:

[INFO] --- maven-resources-plugin:2.4.3:resources (default-resources)
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile)
[INFO] --- clojure-maven-plugin:1.3.4:compile (clojure-compile)
[INFO] --- maven-resources-plugin:2.4.3:testResources 
(default-testResources)
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile)
[INFO] --- maven-surefire-plugin:2.7.2:test (default-test)
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Results :

Tests in error: 
XXX_test(com.company.bank.AccountReaderTest): Unresolved compilation 
problem:
    NumberValidator cannot be resolved

I think the problem might also be that the failing tests are Java tests 
calling Java code, which is trying to call Clojure.

On Wednesday, May 16, 2012 12:02:51 PM UTC-4, Armando Blancas wrote:
>
> Can you post the error? It's hard to tell without looking at the details. 
> As you've may have seen, the order is this:
> [INFO] [resources:resources {execution: default-resources}]
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] [clojure:compile {execution: compile-clojure}]
> [INFO] [resources:testResources {execution: default-testResources}]
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] [surefire:test {execution: default-test}]
>
> So it's resources, compile java, compile clj, test resources, test java, 
> test clj. So your Java tests should get any gen'ed classes.
>
> On Wednesday, May 16, 2012 8:33:21 AM UTC-7, Matthew Boston wrote:
>>
>> Armando,
>>
>> Thanks for your help. I was using 
>> `com. theoryinpractise.clojure-maven-plugin` at first but recently switched 
>> because I figured the other would help (seeing that it was built by Stuart 
>> Sierra..
>>
>> I've switched back now, but stil receiving an error.
>>
>> When I `mvn compile` all is fine and dandy. However, `mvn test` fails to 
>> find the :gen-class I defined. Do I have my executions setup correctly?
>>
>>         <executions>
>>           <execution>
>>             <id>clojure-compile</id>
>>             <phase>compile</phase>
>>             <goals>
>>               <goal>compile</goal>
>>             </goals>
>>           </execution>
>>
>>           <execution>
>>             <id>test-clojure-compile</id>
>>             <phase>test</phase>
>>             <goals>
>>               <goal>testCompile</goal>
>>             </goals>
>>           </execution>
>>
>>           <execution>
>>             <id>test-clojure</id>
>>             <phase>test</phase>
>>             <goals>
>>               <goal>test-with-junit</goal>
>>             </goals>
>>           </execution>
>>         </executions>
>>
>>
>> On Wednesday, May 16, 2012 10:39:49 AM UTC-4, Armando Blancas wrote:
>>>
>>> This repo and plugin tags should do it.
>>>
>>>   <repositories>
>>>     <repository>
>>>       <id>clojure-releases</id>
>>>       <url>http://build.clojure.org/releases</url>
>>>     </repository>
>>>   </repositories>
>>> ...
>>>       <plugin>
>>>         <groupId>com.theoryinpractise</groupId>
>>>         <artifactId>clojure-maven-plugin</artifactId>
>>>         <version>1.3.4</version>
>>>         <executions>
>>>           <execution>
>>>             <id>compile-clojure</id>
>>>             <phase>compile</phase>
>>>             <goals>
>>>               <goal>compile</goal>
>>>             </goals>
>>>           </execution>
>>>         </executions>
>>>       </plugin>
>>> ...
>>>
>>> On Wednesday, May 16, 2012 7:04:54 AM UTC-7, Matthew Boston wrote:
>>>>
>>>> Right, I totally understand I need AOT compilation for calling Clojure 
>>>> from Java. I'm asking how to set that up in maven.
>>>>
>>>> Thanks for your help.
>>>>
>>>> On Wednesday, May 16, 2012 9:58:18 AM UTC-4, Meikel Brandmeyer 
>>>> (kotarak) wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> you have to use AOT compilation to generate the class with gen-class. 
>>>>> Additionally you have to compile the clojure source before you compile 
>>>>> the 
>>>>> java code since otherwise the class is missing. I don't know how to do 
>>>>> this 
>>>>> with maven. I can tell you only for gradle.
>>>>>
>>>>> Kind regards
>>>>> Meikel
>>>>>
>>>>>

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

Reply via email to