slaclab / lcsim

LCSim Java Library
Other
1 stars 5 forks source link

Ejml dev clean #34

Closed pbutti closed 3 years ago

pbutti commented 3 years ago

Pull request for adding the ejml support for lcsim.

JeremyMcCormick commented 3 years ago

The PR itself looks fine.

Should we take the opportunity to cleanup management of the commons-math library between lcsim and hps-java?

jeremy@thinksgiving:/work/slac/git$ grep -A1 "commons-math" lcsim/pom.xml lcsim/*/pom.xml
lcsim/pom.xml:            <link>http://commons.apache.org/proper/commons-math/javadocs/api-2.2/index.html</link>
lcsim/pom.xml-          </links>
--
lcsim/detector-framework/pom.xml:      <artifactId>commons-math3</artifactId>
lcsim/detector-framework/pom.xml-      <version>3.1</version>
--
lcsim/mc/pom.xml:      <artifactId>commons-math</artifactId>
lcsim/mc/pom.xml-      <version>2.2</version>
--
lcsim/recon-drivers/pom.xml:      <artifactId>commons-math</artifactId>
lcsim/recon-drivers/pom.xml-      <version>2.2</version>
--
lcsim/tracking/pom.xml:      <artifactId>commons-math</artifactId>
lcsim/tracking/pom.xml-      <version>2.2</version>
--
lcsim/trf/pom.xml:      <artifactId>commons-math</artifactId>
lcsim/trf/pom.xml-      <version>2.2</version>
jeremy@thinksgiving:/work/slac/git$ grep -A1 "commons-math" ./hps-java/pom.xml hps-java/*/pom.xml
./hps-java/pom.xml:          <groupId>commons-math</groupId>
./hps-java/pom.xml:          <artifactId>commons-math</artifactId>
./hps-java/pom.xml-        </exclusion>
--
./hps-java/pom.xml:        <artifactId>commons-math3</artifactId>
./hps-java/pom.xml-        <version>3.5</version>
--
./hps-java/pom.xml:            <groupId>commons-math</groupId>
./hps-java/pom.xml:            <artifactId>commons-math</artifactId>
./hps-java/pom.xml-          </exclusion>
--
hps-java/tracking/pom.xml:      <artifactId>commons-math3</artifactId>
hps-java/tracking/pom.xml-    </dependency>
--
hps-java/util/pom.xml:      <artifactId>commons-math3</artifactId>
hps-java/util/pom.xml-    </dependency>

We don't need to be duplicating the version number as this can go into the main POM instead. I can try to clean that up.

Also, since commons-math is a transitive dependency of lcsim, it does not need to be explicitly listed in hps-java, as every module in hps-java depends on the lcsim jar and therefore would have access to whatever commons-math version it pulls in.