GMLC-TDC / HELICS

Hierarchical Engine for Large-scale Infrastructure Co-Simulation (HELICS)
https://docs.helics.org/en/latest/
BSD 3-Clause "New" or "Revised" License
127 stars 41 forks source link

Symbolic Link for Java is broken #231

Closed afisher1 closed 6 years ago

afisher1 commented 6 years ago

Sometime in the past couple of weeks helics.jar changed to be a symbolic link. However the link creation process is flawed at installation as the file it is symbolically linked to cannot be . looking at helics.jar the symbolic link is to helics-1.0,0-beta.2.jar. Two ways to fix this is to copy helics-1.0.0-beta.2.jar along with helics.jar during installation or provide the full file path upon linking. I believe option 2 is the correct solution. Does anyone know when this change occurred I'm assuming it happened around the beta 2 release.

phlptp commented 6 years ago

must be something in the make_jar. Can you try removing the version info in config/MakeJarCmakeLists.txt.in remove the line VERSION @HELICS_VERSION@. I think the make_jar must work differently on linux, because I don't think it does that on Windows.

kdheepak commented 6 years ago

I tried removing the VERSION @HELICS_VERSION@ line, and it did not make a difference.

kdheepak commented 6 years ago

I did a git clean -fxd and then ran the same thing without VERSION @HELICS_VERSION@ and it did create a file instead of the symbolic link. Alternatively, I think we can use NAMELINK_SKIP in the INSTALL target.

phlptp commented 6 years ago

@afisher1 I changed the install to find a version based jar file. Let me know if that works on your system. If so I will close this issue

phlptp commented 6 years ago

@afisher1 is this fixed?

nightlark commented 6 years ago

I think there are similar problems related to the jar file name on Windows -- I see errors with finding the helics.jar file. From the docs on add_jar, it looks like the output name is helics-${HELICS_VERSION}.jar; maybe after building helics-${HELICS_VERSION}.jar a copy could be created named helics.jar? The information I'm finding on cmake -E create_symlink says that it always returns false on Windows, so I don't think that would be a portable solution.

phlptp commented 6 years ago

Sounds like we should probably remove the VERSION section of the make_jar command. that seems to be causing more problems than it is worth.

nightlark commented 6 years ago

Either removing the VERSION section, or only including a jar that includes the version in the name would work. I went to see what some other Java projects are doing (ant, log4j, sprinframework, jenkins, netty, solr, maven central repository projects), and it looks like the majority distribute packagename-version.jar files, possibly with optional packagename-version-javadoc.jar files -- a lot of them use Maven, which seems to default to packagename-version.jar file names.

It would be another thing that needs updating for example projects using java though.