Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not map source location: The filename, directory name, or volume label syntax is incorrect #50

Closed
blutorange opened this issue Jul 17, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@blutorange
Copy link
Owner

There seems to be an issue with the file system on Windows:

[ERROR] Could not map source location
java.io.IOException: The filename, directory name, or volume label syntax is incorrect
    at java.io.WinNTFileSystem.canonicalize0 (Native Method)
    at java.io.WinNTFileSystem.canonicalize (WinNTFileSystem.java:428)
    at java.io.File.getCanonicalPath (File.java:618)
    at com.github.blutorange.maven.plugin.closurecompiler.common.FileHelper.relativizePath (FileHelper.java:19)
    at com.github.blutorange.maven.plugin.closurecompiler.common.FileSystemLocationMapping.map (FileSystemLocationMapping.java:37)
    at com.google.javascript.jscomp.SourceMap.fixupSourceLocation (SourceMap.java:221)
    at com.google.javascript.jscomp.SourceMap.addSourceFile (SourceMap.java:202)
    at com.google.javascript.jscomp.Compiler.addFilesToSourceMap (Compiler.java:3359)
    at com.google.javascript.jscomp.Compiler.parseSyntheticCode (Compiler.java:2071)
    at com.google.javascript.jscomp.Compiler.ensureLibraryInjected (Compiler.java:3256)
    at com.google.javascript.jscomp.Compiler.ensureLibraryInjected (Compiler.java:3271)
    at com.google.javascript.jscomp.Compiler.ensureLibraryInjected (Compiler.java:3271)
    at com.google.javascript.jscomp.InjectRuntimeLibraries.process (InjectRuntimeLibraries.java:40)
    at com.google.javascript.jscomp.Compiler.transpileAndDontCheck (Compiler.java:985)
    at com.google.javascript.jscomp.Compiler.performChecksAndTranspilation (Compiler.java:816)
    at com.google.javascript.jscomp.Compiler.lambda$stage1Passes$0 (Compiler.java:749)
    at com.google.javascript.jscomp.CompilerExecutor$2.call (CompilerExecutor.java:102)
    at java.util.concurrent.FutureTask.run (FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617)
    at java.lang.Thread.run (Thread.java:745)

Plugin configuration:

			<plugin>
				<groupId>com.github.blutorange</groupId>
				<artifactId>closure-compiler-maven-plugin</artifactId>
				<configuration>
					<charset>UTF-8</charset>
					<closureWarningLevels>
						<misplacedTypeAnnotation>OFF</misplacedTypeAnnotation>
						<es5Strict>OFF</es5Strict>
						<unknownDefines>OFF</unknownDefines>
						<nonStandardJsDocs>OFF</nonStandardJsDocs>
						<uselessCode>OFF</uselessCode>
					</closureWarningLevels>
					<closureCompilationLevel>${closure.compilation.level}</closureCompilationLevel>
					<closurePrettyPrint>true</closurePrettyPrint>
					<closureIncludeSourcesContent>true</closureIncludeSourcesContent>
					<closureSourceMapOutputType>inline</closureSourceMapOutputType>
					<closureCreateSourceMap>true</closureCreateSourceMap>
					<closureDebug>true</closureDebug>
					<closureLanguageIn>ECMASCRIPT_2018</closureLanguageIn>
					<closureLanguageOut>ECMASCRIPT5</closureLanguageOut>
					<baseSourceDir>${basedir}/src/main/es6</baseSourceDir>
					<baseTargetDir>${project.build.directory}/generated-resources/js</baseTargetDir>
				</configuration>
				<executions>
					<!-- External or third-party JavaScript libraries -->
					<execution>
						<id>minify-js</id>
						<phase>generate-resources</phase>
						<configuration>
							<skipMinify>false</skipMinify>
							<skipMerge>true</skipMerge>
							<sourceDir>externs</sourceDir>
							<targetDir>externs</targetDir>
							<outputFilename>#{filename}</outputFilename>
							<includes>
								<include>*.js</include>
							</includes>
						</configuration>
						<goals>
							<goal>minify</goal>
						</goals>
					</execution>
					<!-- Custom JavaScript for this portal, ES6 modules -->
					<execution>
						<id>minify-custom</id>
						<phase>generate-resources</phase>
						<configuration>
							<skipMinify>false</skipMinify>
							<skipMerge>false</skipMerge>
							<sourceDir>test</sourceDir>
							<targetDir>test</targetDir>
							<outputFilename>test.js</outputFilename>
							<includes>
								<include>**/*.js</include>
							</includes>
							<closureAssumeFunctionWrapper>true</closureAssumeFunctionWrapper>
							<closureOutputWrapper>(function(){%output%}).call(this);</closureOutputWrapper>
							<closureModuleResolution>NODE</closureModuleResolution>
							<closureDependencyMode>PRUNE</closureDependencyMode>
							<closureDependencyEntryPoints>
								<closureDependencyEntryPoint>file:index.js</closureDependencyEntryPoint>
							</closureDependencyEntryPoints>
						</configuration>
						<goals>
							<goal>minify</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

and

	<profiles>
		<profile>
			<id>fc-dev</id>
			<build>
				<plugins>
					<plugin>
						<groupId>com.github.blutorange</groupId>
						<artifactId>closure-compiler-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>minify-custom</id>
								<phase>generate-resources</phase>
								<configuration>
									<closureEmitUseStrict>false</closureEmitUseStrict>
									<closureForceInjectLibs>
										<closureForceInjectLib>base</closureForceInjectLib>
										<closureForceInjectLib>es6_runtime</closureForceInjectLib>
									</closureForceInjectLibs>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>m2e</id>
			<activation>
				<property>
					<name>m2e.version</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>com.github.blutorange</groupId>
						<artifactId>closure-compiler-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>minify-custom</id>
								<phase>generate-resources</phase>
								<configuration>
									<closureEmitUseStrict>false</closureEmitUseStrict>
									<closureForceInjectLibs>
										<closureForceInjectLib>base</closureForceInjectLib>
										<closureForceInjectLib>es6_runtime</closureForceInjectLib>
									</closureForceInjectLibs>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
@blutorange blutorange added the bug Something isn't working label Jul 17, 2019
@blutorange blutorange self-assigned this Jul 17, 2019
@blutorange
Copy link
Owner Author

In FileSystemLocationMapping, line 37, the given file is C:\Users\foobar\git\project\sub\src\main\es6\bar\ [synthetic:base] "

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant