English 中文(简体)
在多模块玉米项目中,如果每个分层没有界定原始成分,如何防止错误?
原标题:In multimodule maven project, how to prevent error if a plugin is not defined for every submodule?

I have a multimodule maven project, and I need to launch it through mvn clean install liferay:liferay

Since some of the submodules haven t the liferay plugin inside, I have this error: [ERROR] No plugin found for prefix liferay in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:Usersxxxxxxx.m2 epository), central (http://repo.maven.apache.org/maven2)] -> [Help 1]

How can I let Maven call liferay:liferay only on modules which support it? Thanks

问题回答

Than you shouldn t call the lifecycle from the root of your multi-module build. You can use to call it from the root like this.

mvn -pl ModuleWhichContainsConfigForLifeRay liferay:liferay

但是,如果你在前面安装一个小装置,这只会是正确的。

您可在生命线模块中创建<条码>明细表,如:

 <profiles>
      <profile>
        <id>liferay-modules</id>
        <modules>
            <module>MyPortlet</module>
                <module>MyHook</module>
        </modules>
      </profile>
  </profiles>

仅用于这些模块,从中开始:

   #/> mvn clean package liferay:deploy -P liferay-modules




相关问题
Maven plugin for gathering source code statistics [closed]

Our project is based on J2EE and we would like to know if there is a open source maven-plugin which either integrates with cloc (Refer How can I measure source code statistics?) or other tools?

Transitive dependencies in maven plugins

Are dependencies in Maven plugins supposed to resolve their transitive dependencies or do they have to be manually added to the plugin dependencies?

Signing Applet with Maven jar plug-in and Bouncy Castle

I have a problem with a signed Java applet - specifically, why it is not signed using my certificate. I m using Maven in Eclipse. The applet (a) allows the user to choose a local file or directory, (...

Change output directory for apt-maven-plugin

I am using apt-maven-plugin to process some Beehive Netui annotations before building a war. The output of the apt processing is a _pageflow directory which contains struts config files (xml text) ...

Compile scala classes with debug info through Maven

I have a scala project that I use Maven and the maven-scala-plugin to compile. I need to include debug information in the compiled classes and I was wondering is there a way to ask Maven or the scala ...

热门标签