【问题标题】:Why mvn android:lint skips sub modules?为什么 mvn android:lint 跳过子模块?
【发布时间】:2013-04-24 16:05:12
【问题描述】:

为什么 android:lint 只扫描我的聚合器项目中的 Lint 警告并跳过“APP”模块?

在我定义的APP模块的POM中:

    <plugins>
        <plugin>
            <groupId>com.jayway.maven.plugins.android.generation2</groupId>
            <artifactId>android-maven-plugin</artifactId>
            <extensions>true</extensions>


            <executions>
                <execution>
                    <id>lint</id>
                    <goals>
                        <goal>lint</goal>
                    </goals>
                    <phase>install</phase>
                </execution>
            </executions>

            <configuration>
                <sdk>
                    <platform>${android.platform}</platform>
                </sdk>
                <androidManifestFile>${project.basedir}/AndroidManifest.xml</androidManifestFile>
                <assetsDirectory>${project.basedir}/assets</assetsDirectory>
                <resourceDirectory>${project.basedir}/res</resourceDirectory>
                <nativeLibrariesDirectory>${project.basedir}/src/main/native</nativeLibrariesDirectory>

                <sign>
                    <debug>true</debug>
                </sign>
                <lint>
                    <skip>false</skip>
                </lint>

                <undeployBeforeDeploy>true</undeployBeforeDeploy>
                <zipalign>
                    <skip>false</skip>
                    <verbose>true</verbose>
                    <inputApk>${project.build.directory}/${project.artifactId}.apk</inputApk>
                    <outputApk>${project.build.directory}/${project.artifactId}-aligned.apk</outputApk>
                </zipalign>
            </configuration>
        </plugin>

干杯

【问题讨论】:

    标签: android maven android-maven-plugin


    【解决方案1】:

    我不认为我们已经将它实现为以这种方式在多模块构建中工作。但是,您只需在聚合器中配置插件并在 apk 项目中执行即可。

    【讨论】:

    • 不确定您的问题是什么。这就是 Maven 插件的一般配置/使用方式。
    猜你喜欢
    • 2021-01-06
    • 2014-07-10
    • 2017-05-30
    • 1970-01-01
    • 2021-05-17
    • 2021-04-09
    • 1970-01-01
    • 1970-01-01
    • 2012-05-30
    相关资源
    最近更新 更多