主要是将其写为自我回答,因为我花了很长时间才发现问题,我的项目使用颚式工具来最小化js和CSS资源,这很有用,因为它会自动注释元素,而不会将其暴露在生产环境中,除了将自身最小化并通过将资源分为调试和生产两种类型的捆绑包轻松地分离模块之外。
参考:
问题:
在准备我的资源的测试中,作为部署工作的一部分,我开始遇到此异常,这将创建一个包含资产的文件夹,其中包含缩小的CSS和JS,并用作gzip。
net.jawr.web.minification.JSMin$UnterminatedRegExpLiteralException
at net.jawr.web.minification.JSMin.action(JSMin.java:277)
at net.jawr.web.minification.JSMin.jsmin(JSMin.java:353)
at com.mycomanyname.jobs.PrepareAssetsTest.minifyJs(PrepareAssetsTest.java:84)
at com.mycomanyname.jobs.PrepareAssetsTest.minimizeAssets(PrepareAssetsTest.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
我尝试过: 在google上检查课程,然后结帐,向后一步一步提交,看看是什么原因使它崩溃了。