[antlr-interest] gUnit build error under Windows

Sergiy Karpenko bergschloss at ukr.net
Thu Sep 24 02:45:19 PDT 2009


Hello, colleagues    
    
I found build error when run gUnit test.     
    
Environment:    
- OS is Windows, it's important, because there is no problem under Linux;    - project has many dependencies;    
- gUnit pom configuration is typical:    
  <plugin>    
  <groupId>org.codehaus.mojo</groupId>    
  <artifactId>exec-maven-plugin</artifactId>    
  <executions>    
  <execution>    
  <id>gunit-CND</id>    
  <phase>generate-test-sources</phase>    
  <goals>    
  <goal>exec</goal>    
  </goals>    
  <configuration>    
  <classpathScope>test</classpathScope>    
  <executable>java</executable>    
  <testSourceRoot>src/test/gunit/org/mycompany</testSourceRoot>    
  <workingDirectory>src/test/gunit/org/mycomany</workingDirectory>    
  <arguments>    
  <argument>-classpath</argument>    
  <classpath/>    
  <argument>org.antlr.gunit.Interp</argument>    
  <argument>-o</argument>    
  <argument>Cnd.gunit</argument>    
  </arguments>    
  </configuration>    
  </execution>    
  </executions>    
  </plugin>    
    
Result is build error:    
    
[INFO] Result of cmd.exe /X /C "java -classpath "realy huge set of jars" org.antlr.gunit.Interp -o Cnd.gunit" execution is: '1'.    
    
- classpath string take more than 9000 characters;    
    
But there is enough just 6 jars and path to generated clases    
     
Next configuration works well:    
  <plugin>    
  <groupId>org.codehaus.mojo</groupId>    
  <artifactId>exec-maven-plugin</artifactId>    
  <executions>    
  <execution>    
  <id>gunit-CND</id>    
  <phase>generate-test-sources</phase>    
  <goals>    
  <goal>exec</goal>    
  </goals>    
  <configuration>    
  <classpathScope>test</classpathScope>    
  <executable>java</executable>    
  <testSourceRoot>src/test/gunit/org/mycompany</testSourceRoot>    
  <workingDirectory>src/test/gunit/org/mycompany</workingDirectory>    
  <arguments>    
  <argument>-classpath</argument>    
  <!--classpath /-->    
  <argument>F:\mycompany\project\target\classes\;F:\my-dependencies\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;F:\my-dependencies\repository\org\antlr\stringtemplate\3.2\stringtemplate-3.2.jar;F:\my-dependencies\repository\org\antlr\antlr-runtime\3.1.3\antlr-runtime-3.1.3.jar;F:\my-dependencies\repository\junit\junit\3.8.2\junit-3.8.2.jar;F:\my-dependencies\repository\org\antlr\antlr\3.1.3\antlr-3.1.3.jar;F:\my-dependencies\repository\org\antlr\gunit\3.1.4-SNAPSHOT\gunit-3.1.4-SNAPSHOT.jar</argument>    
  <argument>org.antlr.gunit.Interp</argument>    
  <argument>-o</argument>    
  <argument>Cnd.gunit</argument>    
  </arguments>    
  </configuration>    
  </execution>    
  </executions>    
  </plugin>    
    
But this is not good way, because I set constant pathes to jars and generated classes;    
    
Is there any another way to cut automaticly generated list of jars?    
    
Thanks    
    
    
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090924/db395004/attachment.html 


More information about the antlr-interest mailing list