- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 JDK 1.7.0_60
和 maven-3.2.2
。当我在项目 new-project
上运行 mvn clean install
时,出现以下错误 -
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ new-project ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (default) @ new-project ---
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.RequireJavaVersion failed with message:
Detected JDK Version: 1.7.0-60 is not in the allowed range [1.5,1.6,1.7.0-60).
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.621 s
[INFO] Finished at: 2014-07-10T20:37:32+05:30
[INFO] Final Memory: 7M/18M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce (default) on project new-project: Some Enforcer rules have failed.
Look above for specific messages explaining why the rule failed. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
以下是我的 pom.xml
的部分内容,因为我无法分享完整的内容-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<showDeprecation>true</showDeprecation>
<source>1.7.0-60</source>
<target>1.7.0-60</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<classpathContainers>
<classpathContainer>
org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5
</classpathContainer>
</classpathContainers>
<additionalConfig>
<file>
<name>
.settings/org.eclipse.core.resources.prefs
</name>
<content>
eclipse.preferences.version=1${line.separator}encoding/<project>=UTF-8${line.separator}
</content>
</file>
</additionalConfig>
<downloadSources>true</downloadSources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<configuration>
<rules>
<requireJavaVersion>
<version>[1.5,1.6,1.7.0-60)</version>
</requireJavaVersion>
<requireMavenVersion>
<version>[3.2.2,)</version>
</requireMavenVersion>
</rules>
</configuration>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<sourcepath>
${project.basedir}/src/main/javadoc;${project.basedir}/src/main/java
</sourcepath>
<charset>UTF-8</charset>
<docencoding>UTF-8</docencoding>
<docfilessubdirs>true</docfilessubdirs>
<links>
<link>
http://docs.oracle.com/javase/7/docs/api/
</link>
</links>
<source>1.7.0-60</source>
<show>protected</show>
</configuration>
<reportSets>
<reportSet>
<reports>
<report>javadoc</report>
</reports>
</reportSet>
</reportSets>
</plugin>
最佳答案
如果您想将版本 1.7.0-30 包含在已接受的 range 中,那么在声明范围时必须使用方括号。您可以省略版本 1.6,因为它包含在该范围内:
<requireJavaVersion>
<version>[1.5,1.7.0-60]</version>
</requireJavaVersion>
关于maven - JDK7,mvn-3.2.2 - maven-enforcer-plugin - RequireJavaVersion 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24680585/
我正在使用 maven 和 eclipse m2e 配置多模块父子 maven 项目,我使用的是 eclipse Juno SR1 的最新内容,即 m2e 1.2.0 父pom使用enforcer插件
我希望从我的基类派生的所有类都具有此功能: class Derived : public Base{ public: void doSth(const Derived& d){
我遇到了有关我的执行器自定义规则之一的配置问题。 我的 POM 文件中的插件配置如下所示: org.apache.maven.plugins maven-
假设我想在数据库的事件日志中记录某些内容。在某些情况下,这些事件与用户相关联(例如,用户创建了一些东西)。在某些情况下,这些事件是由应用程序自动完成的(例如,系统出于某种原因更新了一些记录)。我希望能
我的整个团队都相信 Python 中的类型提示将帮助我们构建更易于维护的代码。每个人都支持在我们的整个项目中实现类型提示。 使用 mypy 一周后,我们意识到 mypy 并没有真正提醒您实现类型提示。
我正在尝试使用 maven-enforcer-plugin 来确保激活一个配置文件(requireActiveProfile 规则)。请参阅此页面上的第二个示例:Require Active Prof
我已经在谷歌上搜索了两个小时,但没有成功。 如果我有一个模板函数并且我想在模板类型上强制执行一个接口(interface),我该怎么做? 例如。 void doStuff(T)(bool param)
我希望下面的函数只接受 data 对象,前提是其中有 id 键。然后,想要从 data 访问 id。 function someFuntion(data : T){ const id = data['
如果我实现 CQRS 和事件溯源,假设数据的最终存储(读取存储)在 RDBMS 中,我如何维护数据的完整性和一致性? 如果事件已发布但 RDBMS 由于检查违规或缺少 FK 引用而拒绝从中派生的数据怎
我希望下面的函数只接受 data 对象,前提是其中有 id 键。然后,想要从 data 访问 id。 function someFuntion(data : T){ const id = data['
我一直在尝试了解 Julialang 的类型系统但是一些设计方面仍然让我感到困惑。我希望有人能澄清一下。 所以这里的问题是关于抽象类型及其具体实现。从我understand Julia抽象类型不会对其
关注 https://stackoverflow.com/a/59389998/927493 ,现在可以从命令行调用 Maven 执行器插件。 这很好用,但不幸的是我还不明白我是否可以通过命令行设置规
以下是我看到的错误,让我困惑的是为什么它会依赖于 2 个版本的 my-engine 依赖项。一个是 0.9.0-20180510.015454-2,另一个是 0.9.0-SNAPSHOT。 这是我使用
fmtter = logging.Formatter('%(asctime)s,%(msecs)05.1f (%(funcName)s) %(message)s', '%H:%M:%S') rock_
我有一个抽象的 C# 基类,其中有几个必须重写的方法。我该如何执行?现在我抛出一个异常作为基本实现 public virtual string Description {
我正在尝试使用 maven 安装 UIMA JDK。然而,总有一个警告 Rule 0: org.semver.enforcer.RequireBackwardCompatibility failed
简介: 我已经为数据库过滤器构建了一个类层次结构: class Filter { } class PropertyFilter extends Filter { Boolean exists;
我正在将(由我)为 Windows 编写的项目移植到移动平台。 我需要 VirtualAlloc (+friends) 的等价物,自然是 mmap。但是,有 2 个显着差异。 VirtualAlloc
我想使用 Maven Enforcer 插件来检查我的路径上是否有重复的类。 我试过 here 中的示例. 但是当我这样运行时: mvn enforce:enforce 我收到这个错误: Failed
我正在开发一个跨平台的 Python (3.7+) 应用程序,我需要依赖 SQLite 中 TEXT 列的排序顺序,这意味着 TEXT 值的比较算法必须基于 UTF-8 字节。即使系统编码 (sys.
我是一名优秀的程序员,十分优秀!