css4j / echosvg

SVG implementation in the Java™ Language, fork of Apache Batik, supporting level 4 selectors and colors.
Apache License 2.0
39 stars 2 forks source link

SVG rasterizer not drop-in replacement #62

Closed ghost closed 2 years ago

ghost commented 2 years ago

Here are the imports for Batik:

  implementation "org.apache.xmlgraphics:batik-anim:${v_batik}"
  implementation "org.apache.xmlgraphics:batik-awt-util:${v_batik}"
  implementation "org.apache.xmlgraphics:batik-bridge:${v_batik}"
  implementation "org.apache.xmlgraphics:batik-css:${v_batik}"
  implementation "org.apache.xmlgraphics:batik-dom:${v_batik}"
  implementation "org.apache.xmlgraphics:batik-ext:${v_batik}"
  implementation "org.apache.xmlgraphics:batik-gvt:${v_batik}"
  implementation "org.apache.xmlgraphics:batik-parser:${v_batik}"
  implementation "org.apache.xmlgraphics:batik-script:${v_batik}"
  implementation "org.apache.xmlgraphics:batik-svg-dom:${v_batik}"
  implementation "org.apache.xmlgraphics:batik-svggen:${v_batik}"
  implementation "org.apache.xmlgraphics:batik-transcoder:${v_batik}"
  implementation "org.apache.xmlgraphics:batik-rasterizer:${v_batik}"
  implementation "org.apache.xmlgraphics:batik-util:${v_batik}"
  implementation "org.apache.xmlgraphics:batik-xml:${v_batik}"

Here are the imports for EchoSVG:

  implementation "io.sf.carte:echosvg-awt-util:${v_echosvg}"
  implementation "io.sf.carte:echosvg-bridge:${v_echosvg}"
  implementation "io.sf.carte:echosvg-css:${v_echosvg}"
  implementation "io.sf.carte:echosvg-dom:${v_echosvg}"
  implementation "io.sf.carte:echosvg-ext:${v_echosvg}"
  implementation "io.sf.carte:echosvg-gvt:${v_echosvg}"
  implementation "io.sf.carte:echosvg-parser:${v_echosvg}"
  implementation "io.sf.carte:echosvg-script:${v_echosvg}"
  implementation "io.sf.carte:echosvg-svg-dom:${v_echosvg}"
  implementation "io.sf.carte:echosvg-svggen:${v_echosvg}"
  implementation "io.sf.carte:echosvg-transcoder:${v_echosvg}"
  implementation "io.sf.carte:echosvg-rasterizer:${v_echosvg}"
  implementation "io.sf.carte:echosvg-util:${v_echosvg}"
  implementation "io.sf.carte:echosvg-xml:${v_echosvg}"

The IDE complains with:

Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find io.sf.carte:echosvg-rasterizer:0.2.1.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/io/sf/carte/echosvg-rasterizer/0.2.1/echosvg-rasterizer-0.2.1.pom
       - https://oss.sonatype.org/content/repositories/snapshots/io/sf/carte/echosvg-rasterizer/0.2.1/echosvg-rasterizer-0.2.1.pom
       - https://nexus.bedatadriven.com/content/groups/public/io/sf/carte/echosvg-rasterizer/0.2.1/echosvg-rasterizer-0.2.1.pom
       - https://css4j.github.io/maven/io/sf/carte/echosvg-rasterizer/0.2.1/echosvg-rasterizer-0.2.1.pom
     Required by:
         project :

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

Please either rename the archive or update the migration instructions with a suggestion to rename the archive (to svgrasterizer).

carlosame commented 2 years ago

Please either rename the archive or update the migration instructions with a suggestion to rename the archive

All that the batik-rasterizer module provides is a useless, obsolete policy file that no other module uses (svgrasterizer has its own). No Java code at all. And if you look into that policy file, it is all-permission except for a js.jar file that is not being built and does not exist. A nice example of code rot.

That's why I removed it. Then,

From point 5) in MIGRATING_FROM_BATIK:

The generic rasterizer module (and related files) was removed

So it is already documented.

My questions: Why are you using it? Are you sure that you are actually making any use of a policy file that does not work?

I do not think that you need either rasterizer nor svgrasterizer. I'd suggest removing that dependency from your build and let's move on.

carlosame commented 2 years ago

I'm putting the rasterizer word in code font style in MIGRATING_FROM_BATIK so it is easier to parse.

ghost commented 2 years ago

Weird. I thought I had a compile error because it couldn't be found. I've since removed it and the build succeeds.