When building the changed gt-shapefile-Project on Windows OS using the -qa Flag, ErrorProne had a problem with

   -XepExcludedPaths:${project.build.directory}/generated-sources/.*

because on Windows OS the value of ${project.build.directory} contains backslashes. I found a solution to solve this on stackoverflow.com and then was able to run all automatic quality assurance checks, including ErrorProne.


Just in case you'd like to solve this problem for all users, here are the changes to the file ./pom.xml:

1.) use -XepExcludedPaths:${escapedBuildDirectory}/generated-sources/.* in place of the above original (line 2439).
2.) Define escapedBuildDirectory by adding the new <execution>
    <execution>
      <id>escape-baskslashes</id>
      <phase>validate</phase>
      <goals>
        <goal>regex-property</goal>
      </goals>
      <configuration>
        <value>${project.build.directory}</value>
        <regex>\\</regex>
        <replacement>\\\\\\\\</replacement>
        <name>escapedBuildDirectory</name>
        <failIfNoMatch>false</failIfNoMatch>
      </configuration>
    </execution>
to the existing <executions> of the build-helper-maven-plugin (line 1634):
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          ...
        </executions>
      </plugin>

My pull-request should be coming soon.

Regards
Burkhard


Am 15.09.2023 um 11:25 schrieb Andrea Aime:
Go ahead then. Make sure the PR can satisfy the checklist at:
https://github.com/geotools/geotools/blob/main/.github/PULL_REQUEST_TEMPLATE.md

Cheers
Andrea

On Fri, Sep 15, 2023 at 3:02 PM Burkhard Strauss <servi...@strauss.eng.br> wrote:

    It's not necessary to unpack any file to the file system. Code looks
    like below.

    Regards
    Burkhard

    > InputStream in = url.openConnection().getInputStream();
    >                 if (isGz)
    >                 {
    >                    in = new GZIPInputStream(in);
    >                 }
    >                 channel =
    >                         new ReadableByteChannelDecorator(
    >                                 Channels.newChannel(in), this, url,
    > requestor);

    Am 15.09.2023 um 08:55 schrieb Andrea Aime:
    > Hi,
    > again, no issue with the new functionality... wondering what you
    can
    > achieve in 20-30 lines, I'm guessing you
    > would unpack the file somewhere so that the rest of the NIO based
    > machinery can read it?
    > If so, that needs to be manageable to avoid leaks, the unpacked
    files
    > need to be cleaned up on store disposal.
    >
    > Cheers
    > Andrea



--

Regards,

Andrea Aime

==GeoServer Professional Services from the experts!

Visit http://bit.ly/gs-services-us <http://bit.ly/gs-services-us>for more information.==Ing. Andrea Aime @geowolfTechnical Lead

GeoSolutions Groupphone: +39 0584 962313

fax:     +39 0584 1660272

mob:   +39  339 8844549


https://www.geosolutionsgroup.com/ <https://www.geosolutionsgroup.com/>

http://twitter.com/geosolutions_it <http://twitter.com/geosolutions_it>

-------------------------------------------------------


Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail

_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to