blutorange / closure-compiler-maven-plugin

Combine and minimize JavaScript with Closure Compiler.
http://blutorange.github.com/closure-compiler-maven-plugin
Apache License 2.0
52 stars 6 forks source link

java.io.IOException bad pathname #68

Closed roojsa closed 1 month ago

roojsa commented 4 months ago

Using Windows 11 ( may not be relevant), getting a java.io.IOException

  <plugin>
    <groupId>com.github.blutorange</groupId>
    <artifactId>closure-compiler-maven-plugin</artifactId>
    <version>2.30.0</version>
    <configuration>
        <baseSourceDir>${basedir}/src/main/webapp</baseSourceDir>
    </configuration>
    <executions>
      <execution>
        <id>default-minify</id>
        <configuration>
          <encoding>UTF-8</encoding>
          <sourceDir>scripts</sourceDir>
          <targetDir>scripts</targetDir>
          <skipMerge>false</skipMerge>
          <closureLanguageOut>ECMASCRIPT5</closureLanguageOut>
          <outputFilename>**/scripts/conxons.min.js</outputFilename>
          <includes>
                <include>close.js</include>
                <include>date.js</include>
          </includes>
          <excludes><exclude>**/*.min.js</exclude></excludes>
        </configuration>
        <goals>
          <goal>minify</goal>
        </goals>
        <phase>generate-resources</phase>
      </execution>
    </executions>
  </plugin> 

debug output when running

DEBUG] Adding source file [C:\Projects\Dev\Conxons\src\main\webapp\scripts\close.js]. [DEBUG] Adding source file [C:\Projects\Dev\Conxons\src\main\webapp\scripts\date.js]. [INFO] Starting JavaScript task: [ERROR] Failed to process the source files [close.js, date.js]. java.io.IOException: Bad pathname at java.base/java.io.WinNTFileSystem.canonicalize0(Native Method) at java.base/java.io.WinNTFileSystem.canonicalize(WinNTFileSystem.java:463) at java.base/java.io.File.getCanonicalPath(File.java:626) at com.github.blutorange.maven.plugin.closurecompiler.common.FileHelper.relativizePath(FileHelper.java:31) at com.github.blutorange.maven.plugin.closurecompiler.common.FilenameInterpolator.interpolate(FilenameInterpolator.java:38)

roojsa commented 4 months ago

Figured it out, i had a misconfiguration in the way I was making the merged .min.js file. It might be useful for a slightly more informative error message there, but not a big deal either way.

blutorange commented 3 months ago

Thanks for reporting. Hmm, I'm not sure what exactly was bad about the pathname, but I guess I should at least include the pathname in the error message, to make it easier to debug.

roojsa commented 3 months ago

Non-existant path, I was figuring out how to manipulate sourceDir and TargetDir parameters. I thought the issue was in the sourceDir and was going in circles on that until I went through the source in github for a few minutes and realized the error had to be coming from the target side.

Joe Alexander Service Delivery Manager Ross Group Inc MemberzPlus Membership Management Performance One Data Solutions 3400 Chapel Hill Rd, Suite 100, Douglasville, GA 30135

Mobile: 937.570.1069 Direct: 937.912.3333 Office: 800.652.4985 ext. 1233 Email: @.**@.> [A picture containing qr code Description automatically generated]http://www.performanceonedatasolutions.com/ [Text Description automatically generated with medium confidence]http://www.memberzplus.com/

From: Andre Wachsmuth @.> Sent: Monday, July 1, 2024 2:09 AM To: blutorange/closure-compiler-maven-plugin @.> Cc: Joe Alexander @.>; Author @.> Subject: Re: [blutorange/closure-compiler-maven-plugin] java.io.IOException bad pathname (Issue #68)

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Thanks for reporting. Hmm, I'm not sure what exactly was bad about the pathname, but I guess I should at least include the pathname in the error message, to make it easier to debug.

— Reply to this email directly, view it on GitHubhttps://github.com/blutorange/closure-compiler-maven-plugin/issues/68#issuecomment-2199314337, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BJQ73KROWOYQCHXYY6KWLCDZKDW7ZAVCNFSM6AAAAABKDHMCWCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJZGMYTIMZTG4. You are receiving this because you authored the thread.Message ID: @.**@.>>


The information contained in this email message is intended only for the private and confidential use of the recipient(s) named above, unless the sender expressly agrees otherwise. You are not permitted to forward this email or otherwise disseminate the information contained in this email without the consent of the sender. Ross Group Inc does not accept any responsibility for the loss, use or misuse of any information including confidential information, which is sent to us via email, or email attachment. If you are not the intended recipient, and/or you have received this email in error, you must take no action based on the information in this email and you are hereby notified that any dissemination, misuse or copying or disclosure of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by email and delete the original message.