IntelliJIDEA打可运⾏jar包时的错误
1、[ERROR] 'source.directory'
解决:需要在l的project->build->resources节点下,加⼊以下节点:
(解决时,添加了directory节点)
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>META-INF/*.SF</include>
<include>META-INF/*.DSA</include>
<include>META-INF/*.RSA</include>
<include>META-INF/*.MF</include>
</includes>
<excludes>
<exclude>META-INF/*</exclude>
</excludes>
</resource>
</resources>
14
1
<resources>
2
<resource>
3
<directory>src/main/resources</directory>
4
<includes>
5
<include>META-INF/*.SF</include>
6
<include>META-INF/*.DSA</include>
7
<include>META-INF/*.RSA</include>
8
<include>META-INF/*.MF</include>
9
</includes>
10
<excludes>
11
<exclude>META-INF/*</exclude>
12
</excludes>
13
</resource>
14
</resources>
2、
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources (default-resources) on project HandleJCYContent: Cannot create resource output directory: F:\workspace_idea\HandleJCYCon tent\target\classes -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources (default-resources) on project HandleJCYContent: Cannot create resource output directory: F:\workspace_idea\HandleJCYContent\target\classes
at org.apache.maven.lifecycle.ute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.ute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.ute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.ute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.ute(DefaultMaven.java:106)
at org.apache.maven.ute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
flect.NativeMethodAccessorImpl.invoke0(Native Method)
flect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
flect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at flect.Method.invoke(Method.java:497)
dehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
dehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
dehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
dehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot create resource output directory: F:\workspace_idea\HandleJCYContent\target\classes
at org.apache.ute(ResourcesMojo.java:307)
at org.apache.maven.uteMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.ute(MojoExecutor.java:208)
... 20 more
Caused by: org.apache.maven.shared.filtering.MavenFilteringException: Cannot create resource output directory: F:\workspace_idea\HandleJCYContent\target\classes
at org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering.filterResources(DefaultMavenResourcesFiltering.java:215)
at org.apache.ute(ResourcesMojo.java:301)
... 22 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]
39
1
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources (default-resources) on project HandleJCYContent: Cannot create resource output directory: F:\workspace_idea\HandleJCYCon 2
tent\target\classes -> [Help 1]
3
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources (default-resources) on project HandleJCYContent: Cannot create resource 4
output directory: F:\workspace_idea\HandleJCYContent\target\classes
5
at org.apache.maven.lifecycle.ute(MojoExecutor.java:216)
6
at org.apache.maven.lifecycle.ute(MojoExecutor.java:153)
7
at org.apache.maven.lifecycle.ute(MojoExecutor.java:145)
8
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.ja
va:116)
9
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
10
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
11
at org.apache.maven.lifecycle.ute(LifecycleStarter.java:128)
12
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
13
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
14
at org.apache.ute(DefaultMaven.java:106)
15
at org.apache.maven.ute(MavenCli.java:862)
16
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
17
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
18
flect.NativeMethodAccessorImpl.invoke0(Native Method)
19
flect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
20
flect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
21
at flect.Method.invoke(Method.java:497)
22
dehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
23
dehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
24
dehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
25
dehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
26
Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot create resource output directory: F:\workspace_idea\HandleJCYContent\target\classes
27
at org.apache.ute(ResourcesMojo.java:307)
28
at org.apache.maven.uteMojo(DefaultBuildPluginManager.java:134)
29
at org.apache.maven.lifecycle.ute(MojoExecutor.java:208)
30
... 20 more
31
Caused by: org.apache.maven.shared.filtering.MavenFilteringException: Cannot create resource output directory: F:\workspace_idea\HandleJCYContent\target\classes 32
at org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering.filterResources(DefaultMavenResourcesFiltering.java:215)
33
at org.apache.ute(ResourcesMojo.java:301)
34
... 22 more
35
[ERROR]
36
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
37
[ERROR]
38
[ERROR] For more information about the errors and possible solutions, please read the following articles:
39
[ERROR] [Help 1]
解决:target⽂件被占⽤,关闭其他程序。
3、
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:1.7:shade (default) on project HandleJCYContent: Error creating shaded jar: For artifact {null:null:null:jar}: The groupId cannot be empty
. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:1.7:shade (default) on project HandleJCYContent: Error creating shaded jar: For artifact { null:null:null:jar}: The groupId cannot be empty.
at org.apache.maven.lifecycle.ute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.ute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.ute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.ute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.ute(DefaultMaven.java:106)
at org.apache.maven.ute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
flect.NativeMethodAccessorImpl.invoke0(Native Method)
flect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
flect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at flect.Method.invoke(Method.java:497)
dehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
dehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
dehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
dehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error creating shaded jar: For artifact {null:null:null:jar}: The groupId cannot be empty.
at org.apache.maven.ute(ShadeMojo.java:553)
at org.apache.maven.uteMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.ute(MojoExecutor.java:208)
... 20 more
Caused by: org.apache.maven.artifact.InvalidArtifactRTException: For artifact {null:null:null:jar}: The groupId cannot be empty.
at org.apache.maven.artifact.DefaultArtifact.validateIdentity(DefaultArtifact.java:130)
at org.apache.maven.artifact.DefaultArtifact.<init>(DefaultArtifact.java:123)
at org.apache.maven.bridge.MavenRepositorySystem.XcreateArtifact(MavenRepositorySystem.java:564)
at org.apache.maven.bridge.MavenRepositorySystem.XcreateArtifact(MavenRepositorySystem.java:524)
at org.apache.maven.bridge.MavenRepositorySystem.XcreateArtifact(MavenRepositorySystem.java:518)
at org.apache.maven.bridge.MavenRepositorySystem.XcreateArtifact(MavenRepositorySystem.java:476)
at org.apache.maven.ateArtifact(MavenRepositorySystem.java:79)
at org.apache.maven.project.DefaultProjectBuilder.initProject(DefaultProjectBuilder.java:704)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:176)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:368)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:287)
at org.apache.maven.project.ieveRelocatedProject(MavenMetadataSource.java:577)
at org.apache.maven.project.ieve(MavenMetadataSource.java:190)
at org.urse(DefaultLegacyArtifactCollector.java:532)
at org.llect(DefaultLegacyArtifactCollector.java:144)
at org.llect(DefaultLegacyArtifactCollector.java:100)
at org.llect(DefaultLegacyArtifactCollector.java:782)
at org.apache.maven.DefaultDependencyTreeBuilder.buildDependencyTree(DefaultDependencyTreeBuilder.java:102)
at org.apache.maven.jo.ShadeMojo.updateExcludesInDeps(ShadeMojo.java:959)
at org.apache.maven.ateDependencyReducedPom(ShadeMojo.java:932)
at org.apache.maven.ute(ShadeMojo.java:546)
... 22 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] /confluence/display/MAVEN/MojoExecutionException
58
1
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:1.7:shade (default) on project HandleJCYContent: Error creating shaded jar: For artifact {null:null:null:jar}: The groupId cannot be empty 2
.
-> [Help 1]
3
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:1.7:shade (default) on project HandleJCYContent: Error creating shaded jar: For artifact { 4
null:null:null:jar}: The groupId cannot be empty.
5
at org.apache.maven.lifecycle.ute(MojoExecutor.java:216)
6
at org.apache.maven.lifecycle.ute(MojoExecutor.java:153)
7
at org.apache.maven.lifecycle.ute(MojoExecutor.java:145)
8
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
9
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
10
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
11
at org.apache.maven.lifecycle.ute(LifecycleStarter.java:128)
12
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
13
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
14
at org.apache.ute(DefaultMaven.java:106)
15
at org.apache.maven.ute(MavenCli.java:862)
16
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
17
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
18
flect.NativeMethodAccessorImpl.invoke0(Native Method)
19
flect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
20
flect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
21
at flect.Method.invoke(Method.java:497)
22
dehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
23
dehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
24
dehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
25
dehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
26
Caused by: org.apache.maven.plugin.MojoExecutionException: Error creating shaded jar: For artifact {null:null:null:jar}: The groupId cannot be empty. 27
at org.apache.maven.ute(ShadeMojo.java:553)
28
at org.apache.maven.uteMojo(DefaultBuildPluginManager.java:134)
29
at org.apache.maven.lifecycle.ute(MojoExecutor.java:208)
30
... 20 more
31
Caused by: org.apache.maven.artifact.InvalidArtifactRTException: For artifact {null:null:null:jar}: The groupId cannot be empty.
32
at org.apache.maven.artifact.DefaultArtifact.validateIdentity(DefaultArtifact.java:130)
33
at org.apache.maven.artifact.DefaultArtifact.<init>(DefaultArtifact.java:123)
34
at org.apache.maven.bridge.MavenRepositorySystem.XcreateArtifact(MavenRepositorySystem.java:564)
35
at org.apache.maven.bridge.MavenRepositorySystem.XcreateArtifact(MavenRepositorySystem.java:524)
36
at org.apache.maven.bridge.MavenRepositorySystem.XcreateArtifact(MavenRepositorySystem.java:518)
37
at org.apache.maven.bridge.MavenRepositorySystem.XcreateArtifact(MavenRepositorySystem.java:476)
38
at org.apache.maven.ateArtifact(MavenRepositorySystem.java:79)
39
idea debugat org.apache.maven.project.DefaultProjectBuilder.initProject(DefaultProjectBuilder.java:704)
40
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:176)
41
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:368)
42
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:287)
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论