Port ehcache Issue #60219

Nils Breunese nils at breun.nl
Fri Apr 3 17:07:09 UTC 2020


Ryan Schmidt wrote:

> On Apr 2, 2020, at 09:39, SAPTARSHI MUKHERJEE wrote:
> 
>> Thanks again for assigning to me the issue #60219 related to port ehcache. It helped me develop a much better understanding about a few things related to the portfile and the ports. 
>> 
>> I've made the necessary changes that fetches the new jar file appropriately, checks with updated checksum values correctly, and I've removed the Kaffe dependency, replacing it with the Java Portgroup. It has given expected results on testing, however following are few things that I'd like to know:-
>> 
>> 1) Does this port still need to depend on apache-ant? Facing an error in apache-ant, I've removed the statement, which helped me get rid of the build-related error. If the apache-ant still needs to be retained, I'll have to look into it to fix the error that was like "Command failed : ant clean dist". Please tell me if the dependency becomes redundant after inclusion of Java portgroup or is still important.
> 
> The Java portgroup doesn't mention anything about ant, so I don't know. If the port builds in trace mode without a dependency on ant then I guess it doesn't need it anymore. You can also consult any installation documentation that this project might provide; hopefully they would tell you what their dependencies are.

The current Portfile for the EhCache library at https://github.com/macports/macports-ports/blob/master/java/ehcache/Portfile is for version 1.1, which is pretty ancient. According to https://search.maven.org/artifact/net.sf.ehcache/ehcache EhCache 1.2 was added to the Maven Central repository on April 26, 2006. So EhCache 1.1 will be older than that.

EhCache 2.x used Maven 2 to build: https://www.ehcache.org/documentation/2.7/get-started/building.html

According to https://www.ehcache.org/downloads/ the current version of EhCache is 3.8.1. Looking at https://github.com/ehcache/ehcache3 EhCache 3.x uses Gradle Wrapper to build from source. Running something like `./gradlew build` should work, requiring only a Java Development Kit (JDK) to be installed. If the new Portfile fetches a pre-built JAR using one of the download links from https://www.ehcache.org/downloads/ then there is nothing to build.

I’m a Java developer myself and I actually wouldn’t know what Java developer these days would use a package manager like MacPorts to install a library. The popular Java build tools (Maven, Gradle) fetch their dependencies from Maven repositories.

According to `port echo depends:ehcache` there are no ports that depend on the ehcache port that is currently in MacPorts, so I actually think it would be better to remove a port like this from MacPorts.

Nils.



More information about the macports-dev mailing list