将maven版本更新到3.5.3后构建失败

时间:2018-04-12 09:05:37

标签: maven

我是Maven世界的新生儿。任何帮助都非常感谢。 我正在尝试使用Maven 3.5.3构建现有的Java应用程序(之前使用maven 2.2构建),目前在以下问题中被阻止:

错误: *

  

[错误]无法执行目标com.alcatel.in.osp.services.icc.api.plugin:updateHighLevelApi:5.8:运行   (默认)on project High-level-api:无法解析配置   魔力   com.alcatel.in.osp.services.icc.api.plugin:updateHighLevelApi:5.8:运行   for parameter basedir:在课堂上找不到'basedir'   com.alcatel.in.osp.services.icc.api.plugin.updateHighLevelApi - > [救命   1]

Pom.xml如下:

<plugin>
        <groupId>com.alcatel.in.osp.services.icc.api.plugin</groupId>
        <artifactId>updateHighLevelApi</artifactId>
        <version>5.8</version>
        <configuration>
          <basedir>${basedir}\..\updateHighLevelApi</basedir>
          <domain>parameterDomains.properties</domain>
          <include>includedBeans.properties</include>
          <exclude>excludedMethods.properties</exclude>
          <mandatory>mandatoryAttributes.properties</mandatory>
          <targetPath>\..\HighLevelApi\src\main\java\com\alcatel\in\osp\services\icc\api\services</targetPath>
          <webTargetPath>\..\HighLevelApiWS\src\main\java\com\alcatel\in\osp\services\icc\api\web</webTargetPath>
          <packageName>com.alcatel.in.osp.services.icc.api.services</packageName>
          <webPackageName>com.alcatel.in.osp.services.icc.api.web</webPackageName>
          <targetedJar>
            <!-- <param>cre2-10-2-DR4-HF1102-obs30-NLL-api.jar</param> -->
            <param>ICC58_INTDEV07_NLLAPI.jar</param>
            <param>ratingengine</param>
            <param>RatingEngine</param>
          </targetedJar>
        </configuration>       
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>      
      </plugin>

,代码如下:

import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;

import java.io.*;
import java.util.*;
import java.lang.reflect.*;
import java.util.jar.*;

/**
 * Launch updateHighLevelApi.
 * @goal run
 */
public class updateHighLevelApi extends AbstractMojo {

    private static int modulo = 3;
    private static String lib = "\\lib";
    private static String conf = "\\config";
    private static String platform = "platform";

    /**
     * Base Directory
     * @parameter basedir
     */

    private static String basedir;

    /**
     * File Name for include beans
     * @parameter include
     */

    private static String domain;

    /**
     * File Name for handled domain
     * @parameter domain
     */

    private static String include;

    /**
     * File Name for excluded methods
     * @parameter exclude
     */

    private static String exclude;

    /**
     * File Name for mandatory attributes
     * @parameter mandatory
     */

    private static String mandatory;

    /**
     * Directory for HLA
     * @parameter targetPath
     */
    private static String targetPath;
    /**
     * Directory for HLA web
     * @parameter webTargetPath
     */
    private static String webTargetPath;

    /**
     * Package Name for HLA 
     * @parameter packageName
     */
    private static String packageName;

    /**
     * Package Name for HLA web
     * @parameter webPackageName
     */
    private static String webPackageName;

    /**
     * Array Name for the jar file   
     * @parameter targetedJar
     */
    private static String[] targetedJar;
    ..

当maven版本为2.2时,代码运行良好。在迁移到maven 3.5.3之后,我在我的一个应用程序插件中出现上述错误。

此致 鲁奇

0 个答案:

没有答案