小编Ric*_*cho的帖子

版本:display-plugin-updates不了解maven-enforcer-plugin

所以,我正在尝试使用最新版本的一些插件.之前我已经使用了先决条件标签,但是很多资源(例子)说它应该被认为是弃用的,而且应该使用maven-enforcer-plugin.这是我的配置:

<plugin>
  <inherited>true</inherited>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-enforcer-plugin</artifactId>
  <version>1.3.1</version>
  <executions>
    <execution>
      <id>enforce-maven-3</id>
      <goals>
        <goal>enforce</goal>
      </goals>
      <configuration>
        <rules>
          <requireMavenVersion>
            <version>3.0.4</version>
          </requireMavenVersion>
        </rules>
        <fail>true</fail>
      </configuration>
    </execution>
  </executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)

但是,当我运行mvn版本时:display-plugin-updates我仍然得到这个文本:

[ERROR] Project does not define required minimum version of Maven.
[ERROR] Update the pom.xml to contain
[ERROR]     <prerequisites>
[ERROR]       <maven>3.0</maven>
[ERROR]     </prerequisites>
[INFO]
[INFO] Require Maven 2.0.6 to use the following plugin updates:
[INFO]   maven-jar-plugin ................................................ 2.4
[INFO]   maven-shade-plugin ............................................ 1.7.1
[INFO]
[INFO] Require Maven 2.2.1 to use the following plugin updates: …
Run Code Online (Sandbox Code Playgroud)

java maven maven-enforcer-plugin

25
推荐指数
2
解决办法
4088
查看次数

变量中的环境变量

我有一个名为环境变量$TEST是指在我的bash脚本的目录中我称之为一个变量$VARTEST$TEST/dir/file

现在我想grep指定的文件,$VARTEST所以我尝试:
grep somestring $VARTEST但它不会转换$TEST为它的目录

我已经尝试不同的组合{},""''但没有成功

bash shell environment-variables

4
推荐指数
1
解决办法
4165
查看次数

使用文件中的行作为grep的文件名?

我有一个文件,其中包含文件名(以及它们的完整路径),我想在所有文件中搜索一个单词.一些伪代码来解释:

grep keyword <all files specified in files.txt>
Run Code Online (Sandbox Code Playgroud)

要么

cat files.txt > grep keyword
cat files txt | grep keyword
Run Code Online (Sandbox Code Playgroud)

问题是我只能通过grep来搜索文件名,而不是实际文件的内容.

shell grep

3
推荐指数
1
解决办法
2417
查看次数