apache / apache/maven-artifact-plugin

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

Open
#151 1 comment 0 reactions 0 assignees View on GitHub
enhancement invalid priority:major
Dominant language
Java
Stars
14
Forks
23
Avg merge
1h 27m
Merged PRs (30d)
8

Description

**[Niels Basjes](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=nielsbasjes)** opened **[MARTIFACT-55](https://issues.apache.org/jira/browse/MARTIFACT-55?redirect=false)** and commented

Assume this minimal pom.xml

```xml

  4.0.0
  nl.basjes.maven
  something
  0.0.1-SNAPSHOT 
    2011-11-11T11:11:11Z
 

```

If I run this

```java
mvn compile artifact:3.5.0:check-buildplan
```

I get this:

```java
[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

```java
UTF-8
UTF-8
```

---

**Affects:** 3.5.0

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with the minimal pom.xml and `mvn compile artifact:3.5.0:check-buildplan`, then trace the `check-buildplan` goal's handling of build properties. Done means the goal reports the missing `project.build.sourceEncoding` and `project.build.outputEncoding` and the build no longer succeeds silently.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.