jun aoki created OOZIE-1212:
-------------------------------

             Summary: Deal with "[WARNING] JAR will be empty - no content was 
marked for inclusion!" in build log.
                 Key: OOZIE-1212
                 URL: https://issues.apache.org/jira/browse/OOZIE-1212
             Project: Oozie
          Issue Type: Task
    Affects Versions: trunk
            Reporter: jun aoki
            Priority: Minor
             Fix For: trunk


| [WARNING] JAR will be empty - no content was marked for inclusion!

can be found in the precommit build log.
e.g. 13 of them in 
https://builds.apache.org/job/oozie-trunk-precommit-build/320/consoleText

# Building Apache Oozie Hadoop 1.1.1.oozie-3.4.0-SNAPSHOT 
1.1.1.oozie-3.4.0-SNAPSHOT
# Building Apache Oozie Hadoop Distcp 1.1.1.oozie-3.4.0-SNAPSHOT 
1.1.1.oozie-3.4.0-SNAPSHOT
# Building Apache Oozie Hadoop 1.1.1.oozie-3.4.0-SNAPSHOT Test 
1.1.1.oozie-3.4.0-SNAPSHOT
# Building Apache Oozie Hadoop 2.0.2-alpha.oozie-3.4.0-SNAPSHOT 
2.0.2-alpha.oozie-3.4.0-SNAPSHOT
# Building Apache Oozie Hadoop 2.0.2-alpha.oozie-3.4.0-SNAPSHOT Test 
2.0.2-alpha.oozie-3.4.0-SNAPSHOT
# Building Apache Oozie Hadoop Distcp 2.0.2-alpha.oozie-3.4.0-SNAPSHOT 
2.0.2-alpha.oozie-3.4.0-SNAPSHOT
# Building Apache Oozie Hbase 0.94.2.oozie-3.4.0-SNAPSHOT 
0.94.2.oozie-3.4.0-SNAPSHOT
# Building Apache Oozie Share Lib Pig 3.4.0-SNAPSHOT
# Building Apache Oozie Share Lib Streaming 3.4.0-SNAPSHOT
# Building Apache Oozie Share Lib Distcp 3.4.0-SNAPSHOT
# Building Apache Oozie Share Lib Hive 3.4.0-SNAPSHOT
# Building Apache Oozie Share Lib Sqoop 3.4.0-SNAPSHOT
# Building Apache Oozie Share Lib Oozie 3.4.0-SNAPSHOT

I found that the pom.xml files have <package>jar</package>

{code}
    <groupId>org.apache.oozie</groupId>
    <artifactId>oozie-hadoop</artifactId>
    <version>2.0.2-alpha.oozie-3.4.0-SNAPSHOT</version>
    <description>Apache Oozie Hadoop ${project.version}</description>
    <name>Apache Oozie Hadoop ${project.version}</name>
    <packaging>jar</packaging>
{code}

but shows the WARNING because they don't have src/main


Here is one solution option.(but questionable)
{code:title=minitest/pom.xml}
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-jar</id>
                        <!-- minitest does not necessary have .java files under 
src/main
                            and this causes [WARNING] JAR will be empty upon 
mvn package -->
                        <phase>never</phase>
                    </execution>
                </executions>
            </plugin>
{code}

Question is, this completely skips generating jar file, which is not OK for 
most of the projects.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to