Uploaded image for project: 'Maven Artifact Plugin'
  1. Maven Artifact Plugin
  2. MARTIFACT-55

Missing project.build.sourceEncoding/project.build.outputEncoding should fail check-buildplan

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.5.0
    • None
    • None

    Description

      Assume this minimal pom.xml

      <?xml version="1.0"?>
      <project>
        <modelVersion>4.0.0</modelVersion>
        <groupId>nl.basjes.maven</groupId>
        <artifactId>something</artifactId>
        <version>0.0.1-SNAPSHOT</version>  <properties>
          <project.build.outputTimestamp>2011-11-11T11:11:11Z</project.build.outputTimestamp>
        </properties>
      </project>
      

      If I run this

      mvn compile artifact:3.5.0:check-buildplan
      

      I get this:

      [INFO] --- resources:3.3.1:resources (default-resources) @ something ---
      [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
      [INFO] skip non existing resourceDirectory /home/nbasjes/workspace/xx/src/main/resources
      [INFO] 
      [INFO] --- compiler:3.11.0:compile (default-compile) @ something ---
      [INFO] No sources to compile
      [INFO] 
      [INFO] --- artifact:3.5.0:check-buildplan (default-cli) @ something ---
      [INFO] no known issue with org.apache.maven.plugins:maven-resources-plugin:3.3.1
      [INFO] no known issue with org.apache.maven.plugins:maven-compiler-plugin:3.11.0
      [INFO] no known issue with org.apache.maven.plugins:maven-surefire-plugin:3.1.2
      [INFO] no known issue with org.apache.maven.plugins:maven-jar-plugin:3.3.0 (>= 3.2.0)
      [INFO] no known issue with org.apache.maven.plugins:maven-install-plugin:3.1.1
      [INFO] no known issue with org.apache.maven.plugins:maven-deploy-plugin:3.1.1
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      

      The resources plugin correctly complains about the build being platform dependent, the artifact plugin does not complain and the build is a success.

      I think the check-buildplan should also fail on the absence of

      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <project.build.outputEncoding>UTF-8</project.build.outputEncoding>
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            nielsbasjes Niels Basjes
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: