Hi Armin,

I don't think so, but I haven't tried yet.

This parameter is on my watch list. It is really old and has no unit tests.

Best,

Peter

Am 06.10.2015 um 14:08 schrieb [email protected]:
> Hi Peter,
>
> I like to add something to my last post. I can force that exception to occur 
> by setting resolveImports to true in the plain ruta project. There's no java 
> yet.
>
> Regards,
> Armin
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected] [mailto:[email protected]] 
> Gesendet: Dienstag, 6. Oktober 2015 13:27
> An: [email protected]
> Betreff: AW: Ruta Maven Plugin [Signatur gültig]
>
> Hi Peter,
>
> I'm using 2.3.1, now. I set importByName to true and added the 
> DateTypeSystem.xml to uimaFIT's types.txt.
>
> It now throws
>
> InvalidXMLException: An import could not be resolved.  No file with the name 
> "BasicTypeSystem.xml" was found in the class path or data path.
>
> The types.txt file created by the shade plugin has a line
>
> classpath*:org/apache/uima/ruta/engine/BasicTypeSystem.xml
>
> Looks good, doesn't it? But why doesn't it work?
>
> Regards,
> Armin
>
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Peter Klügl [mailto:[email protected]] 
> Gesendet: Dienstag, 6. Oktober 2015 10:17
> An: [email protected]
> Betreff: Re: Ruta Maven Plugin
>
> Hi Armin,
>
> best switch to 2.3.1 as soon as possible. 2.3.0 was the first version of
> the ruta-maven-plugin and the 2.3.1 release provides some important
> bugfixes for it. I personally had some problems with two executions with
> different configurations, but I don't think that this has something to
> do with your problem.
>
> If the switch to the newer version does not help, then can you give me
> more information about the layout of your project, e.g, do you use packages?
>
> I assume that the type system import of the generated analysis engine
> descriptor refers to "file:/tmp/DateTypeSystem.xml". Is this a
> reasonable location in your application, e.g., did you copy the
> descriptor there? Is tmp a package name or has to something to do with
> your working directory?
>
> Best,
>
> Peter
>
> Am 06.10.2015 um 10:06 schrieb [email protected]:
>> Hi Peter,
>>
>> this helped a little bit, but it is still not running. I had to add the 
>> resources section to the pom.
>>
>> ...
>>      <build>
>>              <resources>
>>                      <resource>
>>                              <directory>src/main/ruta</directory>
>>                      </resource>
>>                      <resource>
>>                              <directory>src/main/resources</directory>
>>                      </resource>
>>                      <resource>
>>                              
>> <directory>${project.build.directory}/generated-sources/ruta/descriptor</directory>
>>                      </resource>
>>                      <resource>
>>                              
>> <directory>${project.build.directory}/generated-sources/ruta/resources</directory>
>>                      </resource>
>>              </resources>
>>              <plugins>
>>                      ...
>>                      <plugin>
>>                              <groupId>org.apache.uima</groupId>
>>                              <artifactId>ruta-maven-plugin</artifactId>
>>                              <version>2.3.0</version>
>>                              <executions>
>>                                      <execution>
>>                                              <id>descriptors</id>
>>                                              
>> <phase>generate-resources</phase>
>>                                              <goals>
>>                                                      <goal>generate</goal>
>>                                              </goals>
>>                                              <configuration>
>>                                              </configuration>
>>                                      </execution>
>>                                      <execution>
>>                                              <id>twl</id>
>>                                              
>> <phase>generate-resources</phase>
>>                                              <goals>
>>                                                      <goal>twl</goal>
>>                                              </goals>
>>                                              <configuration>
>>                                                      <inputFiles>
>>                                                              
>> <directory>${basedir}/src/main/resources/</directory>
>>                                                              <includes>
>>                                                                      
>> <include>*.txt</include>
>>                                                              </includes>
>>                                                      </inputFiles>
>>                                              </configuration>
>>                                      </execution>
>>                              </executions>
>>                      </plugin>
>>              </plugins>
>>      </build>
>> ...
>>
>> DateEngine.xml, DateTypeSystem.xml, and Date.ruta as well as the twl file 
>> are generated and packaged in the jar file.
>>
>> But the CPE throws following exception:
>>
>> ...
>> Caused by: org.apache.uima.resource.ResourceConfigurationException: 
>> Initialization of CAS Processor with name "aggregate" failed.  
>>      at 
>> org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor(CPEFactory.java:1102)
>>      at 
>> org.apache.uima.collection.impl.cpm.container.CPEFactory.getCasProcessors(CPEFactory.java:548)
>>      at 
>> org.apache.uima.collection.impl.cpm.BaseCPMImpl.init(BaseCPMImpl.java:253)
>>      at 
>> org.apache.uima.collection.impl.cpm.BaseCPMImpl.<init>(BaseCPMImpl.java:127)
>>      at 
>> org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize(CollectionProcessingEngine_impl.java:73)
>>      ... 5 more
>> Caused by: org.apache.uima.resource.ResourceInitializationException: Import 
>> failed.  Could not read from URL file:/tmp/DateTypeSystem.xml. (Descriptor: 
>> file:/tmp/desc6822394770076871542.xml)
>>      at 
>> org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:162)
>>      at 
>> org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(AnalysisEngineFactory_impl.java:94)
>>      at 
>> org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62)
>>      at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:279)
>>      at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:331)
>>      at 
>> org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:448)
>>      at 
>> org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor(CPEFactory.java:1086)
>>      ... 9 more
>> ...
>>
>> Do you have any suggestions?
>>
>> Regards,
>> Armin
>>
>>
>>
>> -----Ursprüngliche Nachricht-----
>> Von: Peter Klügl [mailto:[email protected]] 
>> Gesendet: Montag, 5. Oktober 2015 17:56
>> An: [email protected]
>> Betreff: Re: Ruta Maven Plugin
>>
>> Hi,
>>
>> there is no step-by-step description yet, only the part of the
>> documentation here:
>> https://uima.apache.org/d/ruta-current/tools.ruta.book.html#ugr.tools.ruta.maven
>>
>> There are some examples of maven configurations:
>> https://svn.apache.org/repos/asf/uima/ruta/trunk/example-projects/ruta-maven-example
>> https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-maven-plugin/src/it/multimodule
>> https://svn.apache.org/repos/asf/uima/ruta/trunk/ruta-maven-plugin/src/it/importByName
>>
>> My best guess without knowing your maven configuration/pom is that the
>> phase of the ruta-maven-plugin needs to be changed. Did you use:
>>
>> <id>descriptors</id>
>> <phase>process-classes</phase>
>> <goals>
>> <goal>generate</goal>
>> </goals>
>>
>> if yes, try:
>>
>> <id>descriptors</id>
>> <phase>generate-resources</phase>
>> <goals>
>> <goal>generate</goal>
>> </goals>
>>
>> If that solves the problem, then please accept my apologies... I will
>> adapt the documentation. There was actually a reason why I used
>> process-classes in the first place...
>>
>> Best,
>>
>> Peter
>>
>>
>> Am 05.10.2015 um 17:20 schrieb [email protected]:
>>> Hi,
>>>
>>> how ist ruta-maven-plugin supposed to be used? Is there a detailed step by 
>>> step description?
>>>
>>> I've created a new empty maven project, added a script in the source folder 
>>> src/main/ruta and a text file containing a list of words to 
>>> src/main/resources.
>>> mvn package builds a ...Engine.xml and a ...TypeSystem.xml in 
>>> target/generated-sources/ruta/descriptor and a ...twl file in 
>>> target/ruta/resources. But none of them is packaged in the jar file.
>>>
>>> I intend to add that jar file as a maven dependency and create the analysis 
>>> engine by AnalysisEngineFactory.createEngineDescription(<engine name>). Did 
>>> I miss something?
>>>
>>> Regards,
>>> Armin
>>>

Reply via email to