[ 
https://issues.apache.org/jira/browse/MNG-8212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17874025#comment-17874025
 ] 

Scott Feldstein commented on MNG-8212:
--------------------------------------

Apologies, i didn't realize there was a maven build cache project.  I have 
opened the issue there.  Please close this

https://issues.apache.org/jira/browse/MBUILDCACHE-102

> mvn build cache extension config parsing issues on windows
> ----------------------------------------------------------
>
>                 Key: MNG-8212
>                 URL: https://issues.apache.org/jira/browse/MNG-8212
>             Project: Maven
>          Issue Type: Bug
>            Reporter: Scott Feldstein
>            Priority: Major
>
> Hello,
> My colleague is having issues on his windows development laptop building with 
> the maven build-cache extension enabled.  The issue appears to be associated 
> with the configuration file when parsing `**` in an ant path expression 
> element (stack below).  The configuration file is based on the [config 
> example|https://maven.apache.org/extensions/maven-build-cache-extension/maven-build-cache-config.xml]
>  in the [getting started 
> guide|https://maven.apache.org/extensions/maven-build-cache-extension/getting-started.html]
>  (see below for my exact configuration).  When we remove 
> `src/main/javagen/**` from the config then everything works fine.
> h1. Stacktrace
> {code:java}
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time:  1.159 s
> [INFO] Finished at: 2024-08-15T10:04:09-07:00
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Failed to calculate checksums for cs-parent: Illegal char <*> at 
> index 17: src\main\javagen\**
> java.lang.RuntimeException: Failed to calculate checksums for cs-parent
>     at 
> org.apache.maven.buildcache.DefaultProjectInputCalculator.calculateInputInternal
>  (DefaultProjectInputCalculator.java:114)
>     at 
> org.apache.maven.buildcache.DefaultProjectInputCalculator.calculateInput 
> (DefaultProjectInputCalculator.java:89)
>     at org.apache.maven.buildcache.CacheControllerImpl.findCachedBuild 
> (CacheControllerImpl.java:180)
>     at org.apache.maven.buildcache.BuildCacheMojosExecutionStrategy.execute 
> (BuildCacheMojosExecutionStrategy.java:128)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:159)
>     at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
> (LifecycleModuleBuilder.java:105)
>     at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
> (LifecycleModuleBuilder.java:73)
>     at 
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
>  (SingleThreadedBuilder.java:53)
>     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute 
> (LifecycleStarter.java:118)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
>     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
>     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
>     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
>     at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke 
> (NativeMethodAccessorImpl.java:77)
>     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke 
> (DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke (Method.java:568)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced 
> (Launcher.java:283)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.launch 
> (Launcher.java:226)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode 
> (Launcher.java:407)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.main 
> (Launcher.java:348)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke 
> (NativeMethodAccessorImpl.java:77)
>     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke 
> (DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke (Method.java:568)
>     at org.apache.maven.wrapper.BootstrapMainStarter.start 
> (BootstrapMainStarter.java:53)
>     at org.apache.maven.wrapper.WrapperExecutor.execute 
> (WrapperExecutor.java:152)
>     at org.apache.maven.wrapper.MavenWrapperMain.main 
> (MavenWrapperMain.java:76)
> Caused by: java.nio.file.InvalidPathException: Illegal char <*> at index 17: 
> src\main\javagen\**
>     at sun.nio.fs.WindowsPathParser.normalize (WindowsPathParser.java:182)
>     at sun.nio.fs.WindowsPathParser.parse (WindowsPathParser.java:153)
>     at sun.nio.fs.WindowsPathParser.parse (WindowsPathParser.java:77)
>     at sun.nio.fs.WindowsPath.parse (WindowsPath.java:92)
>     at sun.nio.fs.WindowsFileSystem.getPath (WindowsFileSystem.java:232)
>     at java.nio.file.Path.of (Path.java:147)
>     at java.nio.file.Paths.get (Paths.java:69)
>     at org.apache.maven.buildcache.checksum.exclude.Exclusion.<init> 
> (Exclusion.java:70)
>     at 
> org.apache.maven.buildcache.checksum.exclude.ExclusionResolver.addExclusion 
> (ExclusionResolver.java:104)
>     at org.apache.maven.buildcache.checksum.exclude.ExclusionResolver.<init> 
> (ExclusionResolver.java:73)
>     at org.apache.maven.buildcache.checksum.MavenProjectInput.<init> 
> (MavenProjectInput.java:169)
>     at 
> org.apache.maven.buildcache.DefaultProjectInputCalculator.calculateInputInternal
>  (DefaultProjectInputCalculator.java:103)
>     at 
> org.apache.maven.buildcache.DefaultProjectInputCalculator.calculateInput 
> (DefaultProjectInputCalculator.java:89)
>     at org.apache.maven.buildcache.CacheControllerImpl.findCachedBuild 
> (CacheControllerImpl.java:180)
>     at org.apache.maven.buildcache.BuildCacheMojosExecutionStrategy.execute 
> (BuildCacheMojosExecutionStrategy.java:128)
>     at org.apache.maven.lifecycle.internal.MojoExecutor.execute 
> (MojoExecutor.java:159)
>     at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
> (LifecycleModuleBuilder.java:105)
>     at 
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject 
> (LifecycleModuleBuilder.java:73)
>     at 
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build
>  (SingleThreadedBuilder.java:53)
>     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute 
> (LifecycleStarter.java:118)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
>     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
>     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
>     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
>     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
>     at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke 
> (NativeMethodAccessorImpl.java:77)
>     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke 
> (DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke (Method.java:568)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced 
> (Launcher.java:283)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.launch 
> (Launcher.java:226)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode 
> (Launcher.java:407)
>     at org.codehaus.plexus.classworlds.launcher.Launcher.main 
> (Launcher.java:348)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke 
> (NativeMethodAccessorImpl.java:77)
>     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke 
> (DelegatingMethodAccessorImpl.java:43)
>     at java.lang.reflect.Method.invoke (Method.java:568)
>     at org.apache.maven.wrapper.BootstrapMainStarter.start 
> (BootstrapMainStarter.java:53)
>     at org.apache.maven.wrapper.WrapperExecutor.execute 
> (WrapperExecutor.java:152)
>     at org.apache.maven.wrapper.MavenWrapperMain.main 
> (MavenWrapperMain.java:76)
> [ERROR]
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>  {code}
> h1. My Configuration
> {code:java}
> <?xml version="1.0" encoding="UTF-8" ?>
> <!---
>  Licensed to the Apache Software Foundation (ASF) under one or more
>  contributor license agreements.  See the NOTICE file distributed with
>  this work for additional information regarding copyright ownership.
>  The ASF licenses this file to You under the Apache License, Version 2.0
>  (the "License"); you may not use this file except in compliance with
>  the License.  You may obtain a copy of the License at      
> http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law 
> or agreed to in writing, software
>  distributed under the License is distributed on an "AS IS" BASIS,
>  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
>  See the License for the specific language governing permissions and
>  limitations under the License.
> -->
> <cache xmlns="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>        xsi:schemaLocation="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0 
> https://maven.apache.org/xsd/build-cache-config-1.0.0.xsd";>    <!--
>         Template for file comes from 
> https://maven.apache.org/extensions/maven-build-cache-extension/build-cache-config.html
>      -->    <configuration>
>         <enabled>true</enabled>
>         <hashAlgorithm>SHA-256</hashAlgorithm>
>         <validateXml>true</validateXml>
>         <remote enabled="false">
>             <url>http://host:port</url>
>         </remote>
>         <local>
>             <maxBuildsCached>3</maxBuildsCached>
>         </local>
>         <projectVersioning adjustMetaInf="true"/>
>     </configuration>    <input>
>         <global>
>             <!-- If not defined, default glob is "*" -->
>             <glob>
>                 
> {*.java,*.groovy,*.yaml,*.svcd,*.proto,*assembly.xml,assembly*.xml,*logback.xml,*.vm,*.ini,*.jks,*.properties,*.sh,*.bat}
>             </glob>
>             <includes>
>                 <!-- By default, project sources and resources directories 
> are included (src/main/java and src/main/resources) -->
>                 <!-- In this example, the goal is to include a wider range of 
> src directories (like src/main/assembly or src/main/groovy) -->
>                 <include>src/</include>
>             </includes>
>             <excludes>
>                 <!-- We don't want a static "hash" pom resolution (it would 
> conflict the will to adjust the version in the manifest), -->
>                 <!-- we exclude this specific file (as it is already by 
> default since it is not in an include folder -->
>                 <!-- The need to rebuild a project based on the pom is 
> already computed with some intelligence by the extension. -->
>                 <exclude>pom.xml</exclude>
>                 <!-- Also excluding everything located in this project 
> specific folder -->
>                 <exclude>src/main/javagen/**</exclude>
>             </excludes>
>         </global>
>         <plugins>
>             <plugin artifactId="codegen">
>                 <effectivePom>
>                     <excludeProperties>
>                         <excludeProperty>111</excludeProperty>
>                     </excludeProperties>
>                 </effectivePom>
>                 <dirScan mode="auto">
>                     <excludes>
>                         <exclude tagName="outputDirectory"/>
>                         <exclude tagName="directory"/>
>                     </excludes>
>                     <tagScanConfigs>
>                         <tagScanConfig tagName="someProperty" glob="*.java" 
> recursive="false"/>
>                     </tagScanConfigs>
>                 </dirScan>
>                 <executions>
>                     <execution>
>                         <execIds>
>                             <execId>1</execId>
>                             <execId>2</execId>
>                         </execIds>
>                         <dirScan mode="auto">
>                             <includes>
>                                 <include tagName="protolocation" 
> recursive="false" glob="*.proto"/>
>                             </includes>
>                         </dirScan>
>                     </execution>
>                 </executions>
>             </plugin>
>         </plugins>
>     </input>
>     <executionControl>
>         <runAlways>
>             <plugins>
>                 <plugin artifactId="maven-failsafe-plugin"/>
>             </plugins>
>             <executions>
>                 <execution artifactId="maven-deploy-plugin">
>                     <execIds>
>                         <execId>my-execution-id</execId>
>                     </execIds>
>                 </execution>
>             </executions>
>             <goalsLists>
>                 <goalsList artifactId="maven-install-plugin">
>                     <goals>
>                         <goal>install</goal>
>                     </goals>
>                 </goalsList>
>                 <goalsList artifactId="maven-deploy-plugin">
>                     <goals>
>                         <goal>deploy</goal>
>                     </goals>
>                 </goalsList>
>                 <goalsList artifactId="bb-sdk-codegen">
>                     <goals>
>                         <goal>deploy-local</goal>
>                     </goals>
>                 </goalsList>
>             </goalsLists>
>         </runAlways>
>         <reconcile logAllProperties="true">
>             <plugins>
>                 <plugin artifactId="maven-compiler-plugin" goal="compile">
>                     <reconciles>
>                         <reconcile propertyName="source"/>
>                         <reconcile propertyName="target"/>
>                         <reconcile propertyName="debug"/>
>                         <reconcile propertyName="debuglevel"/>
>                     </reconciles>
>                     <!-- whitelist of logged properties-->
>                     <logs>
>                         <log propertyName="includes"/>
>                         <log propertyName="excludes"/>
>                         <log propertyName="argLine"/>
>                     </logs>
>                 </plugin>
>                 <plugin artifactId="duplicate-finder-maven-plugin" 
> goal="check">
>                     <reconciles>
>                         <reconcile propertyName="skip" skipValue="true"/>
>                         <reconcile propertyName="quiet" skipValue="true"/>
>                     </reconciles>
>                 </plugin>
>                 <plugin artifactId="maven-enforcer-plugin" goal="enforce">
>                     <reconciles>
>                         <reconcile propertyName="skip" skipValue="true"/>
>                     </reconciles>
>                     <!-- blacklisted from logging properties-->
>                     <nologs>
>                         <nolog propertyName="redundantProperty"/>
>                         <nolog propertyName="redundantProperty2"/>
>                     </nologs>
>                 </plugin>
>                 <plugin artifactId="maven-surefire-plugin" goal="test">
>                     <reconciles>
>                         <reconcile propertyName="skip" skipValue="true"/>
>                         <reconcile propertyName="skipExec" skipValue="true"/>
>                         <reconcile propertyName="skipTests" skipValue="true"/>
>                         <reconcile propertyName="testFailureIgnore" 
> skipValue="true"/>
>                     </reconciles>
>                 </plugin>
>             </plugins>
>         </reconcile>
>     </executionControl>
> </cache> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to