Re: [ojAlgo-user] build and test instructions for ojalgo?
Mathematics, linear algebra and optimisation
Brought to you by:
apete
From: Anders P. <an...@op...> - 2015-12-14 21:12:04
|
The unit tets are not run as part of any build system - Ant or Maven. They’re executed separately during development. I use eclipse and have a junit run configurtion that I use. It would surprise me if other IDE:s don’t have similar functionality. The class org.ojalgo.FunctionalityTest has a main method you can use to run the tests. Those 2 Ant targets junit_functionality_test, junit_performance_compare are not used. I had forgot they were there. I set up the Maven build solely to be able to upload maven artefacts to the central repository - never was a goal to have “continuous integration”. Have nothing against making the tests part of the maven lifecycle - I suppose they should be - but the tests would have be reworked a bit. There are tests using random input (that sometimes fail) and with the optimisation solvers I’d like to keep test cases that currently cannot be solved. /Anders > On 14 dec. 2015, at 21:10, Daren Drummond <dar...@ya...> wrote: > > I figured out my mvn install problem. Apparently I had some old junky versions of some pom.xml files in my local repo. Deleting and running mvn install fixed the problem. These are the files I deleted: > > rm -rf ~/.m2/repository/org/codehaus/plexus/plexus-archiver/2.0.1 > rm -rf ~/.m2/repository/org/apache/maven/maven-archiver/2.4.2 > > I would still like to know the right way to run the unit tests though. It looks like I'm supposed to do that with ant. Running: > > ant junit_functionality_test > > produces: > > ojAlgo/build.xml:75: The <classpath> for <junit> must include junit.jar if not in Ant's own classpath > > I don't mind taking a guess as to how to set up the test environment, but it would be nice to just follow a recipe. Finally, is there any reason why the tests don't execute as part of the maven lifecycle? Is there any interest in getting them to run as part of the Maven lifecycle? I wouldn't mind setting that up. > > Thanks, > > Daren > > From: Daren Drummond <dar...@ya...> > To: "oja...@li..." <oja...@li...> > Sent: Monday, December 14, 2015 10:55 AM > Subject: build and test instructions for ojalgo? > > Hello! > > Can someone point me to some instructions on how to build and run the unit tests? I don't see any build and test instructions in the readme files or on the wiki or mailing list archive. Is see both a maven pom.xml file and an ant build.xml file, however the default maven install and ant target commands fail for me. > > I checked out branch v39 and ran: > > mvn install > > which fails with: > > [INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ ojalgo --- > [WARNING] The POM for org.apache.maven:maven-archiver:jar:2.4.2 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details > [WARNING] The POM for org.codehaus.plexus:plexus-archiver:jar:2.0.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details > Dec 14, 2015 6:43:22 PM org.sonatype.guice.bean.reflect.Logs$JULSink warn > WARNING: Error injecting: org.apache.maven.plugin..jar.JarMojo > java.lang.NoClassDefFoundError: Lorg/codehaus/plexus/archiver/jar/JarArchiver; > at java.lang.Class.getDeclaredFields0(Native Method) > at java.lang.Class.privateGetDeclaredFields(Class.java:2570) > at java.lang.Class.getDeclaredFields(Class.java:1903) > at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:651) > .....<big stack trace here> ... > Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.archiver.jar.JarArchiver > at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) > at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244) > at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230) > ... 57 more > > Also running the default ant target fails: > > dist: > [delete] Deleting directory /Users/ddrummond/dev/ojAlgo/target > [mkdir] Created dir: /Users/ddrummond/dev/ojAlgo/target > > BUILD FAILED > /Users/ddrummond/dev/ojAlgo/build.xml:167: /Users/ddrummond/dev/ojAlgo/bin does not exist. > > About my system: > Maven 3.0.4 > Apache Ant(TM) version 1.9.6 compiled on June 29 2015 > Java version: 1.8.0_05, vendor: Oracle Corporation > Default locale: en_US, platform encoding: UTF-8 > OS name: "mac os x", version: "10.9.5", arch: "x86_64", family: "mac" > > Thanks in advance! > > Cheers, > > Daren > > > ------------------------------------------------------------------------------ > _______________________________________________ > ojAlgo-user mailing list > ojA...@li... > https://lists.sourceforge.net/lists/listinfo/ojalgo-user |