Hi Philip,

I don't know whether this will fix the problem, but try switching the
execution phase in the XML snippet from "validate" to
"generate-sources". I had a look at the POM file from which I posted
that first snippet, and noticed that we had made that change.

Best,
Ramon

Am 18.06.2010 22:50, schrieb Philip Ogren:
> Hi,
> 
> We have been using a snippet for our pom.xml file pretty much exactly
> like the one below to run JCasGen on our type system descriptor before
> compilation.  When I switched to 2.3.0 this doesn't work anymore.  For
> example, when I run "mvn test", JCasGen will generate the files but then
> maven just exits without an error message and without running the
> tests.  If I remove this block of xml from the pom, then everything
> works fine.
> 
> Any thoughts about how I would go about fixing this?  Or, does anyone
> have another snippet of xml I could insert into my pom.xml to get the
> same behavior?
> 
> Thanks,
> Philip
> 
> On 7/6/2009 7:58 AM, Ramon Ziai wrote:
>> Hi,
>>
>> just as a follow-up to this, I found a solution to this that works for
>> me. Here's the relevant POM snippet, in the hope that it will be useful
>> for others:
>>
>> [...]
>> <plugin>
>>     <groupId>org.codehaus.mojo</groupId>
>>     <artifactId>exec-maven-plugin</artifactId>
>>     <version>1.1</version>
>>     <executions>
>>         <execution>
>>             <phase>validate</phase>
>>             <goals>
>>                 <goal>java</goal>
>>             </goals>
>>         </execution>
>>     </executions>
>>     <configuration>
>>         <mainClass>org.apache.uima.tools.jcasgen.Jg</mainClass>
>>         <arguments>
>>             <argument>-jcasgeninput</argument>
>>             <argument>desc/yourTypeSystem.xml</argument>
>>                          <argument>-jcasgenoutput</argument>
>>             <argument>src/main/java</argument>
>>         </arguments>
>>     </configuration>
>> </plugin>
>> [...]
>>
>> This will run JCasGen prior to the compile phase, ensuring that build
>> dependencies are satisfied. JCasGen is run without the merge capability,
>> so manual changes to the generated Java files will be lost.
>>
>> Best,
>> Ramon
>>
>> Александър Л. Димитров schrieb:
>>   
>>> Hello,
>>>
>>> I'm currently working on a distributed project involving UIMA. At
>>> this stage,
>>> sometimes modifications to the UIMA descriptor files are absolutely
>>> necessary
>>> and, unfortunately, this confuses our VCS. Whenever JCasGen is run
>>> from within
>>> Eclipse or similar, it updates *all* generated class files, which
>>> leads the VCS
>>> to treating them as new commits. The problem here is, when editing the
>>> descriptors on different branches, while the merging of the
>>> descriptor files
>>> goes well most of the time, the merging of the class files fails most
>>> of the
>>> time. This leaves the merger with several dozen conflicts.
>>>
>>> The current policy is to then just delete those files and run JCasGen
>>> on the
>>> merged branch. Of course, the actual problem here is, that one
>>> shouldn't really
>>> track those files in the first place.
>>>
>>> But the matter is slightly more delicate. After checking out the
>>> project from
>>> version control, the project should be readily compilable, without
>>> further
>>> setup. That's why we're using Maven to fetch all dependencies and
>>> automate the
>>> build process. Without having these files in source control, they
>>> have to be
>>> generated first.
>>>
>>> So the real question is: is there any way to run a JCasGen from
>>> within the Maven
>>> build? Probably a plugin? Of course, one could just spawn a process
>>> to call
>>> org.apache.uima.tools.jcasgen.Jg, but I wanted to ask if such a thing
>>> already
>>> existed.
>>>
>>> Thanks,
>>> Aleks
>>>      
>>    

-- 
Ramon Ziai, M.A.

Universität Tübingen
Sonderforschungsbereich 833 'Bedeutungskonstitution'
Projekt A4 'Bedeutungsvergleich im Kontext'
Nauklerstr. 35
72074 Tübingen

http://www.sfs.uni-tuebingen.de/~rziai

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to