Skip to content

[MARTIFACT-55] Missing project.build.sourceEncoding/project.build.outputEncoding should fail check-buildplan #151

@jira-importer

Description

@jira-importer

Niels Basjes opened MARTIFACT-55 and commented

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>

Affects: 3.5.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinvalidThis doesn't seem rightpriority:majorMajor loss of function

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions