Hi mailing list owners!

I tried to send an HTML message before. Usually I don't do that except
for cases in which I think that <pre> blocks or inline formatting such
as code or bold font would be more helpful than auto-wrapped, chaotic
source code or all-ASCII text. I was kinds shocked to get this response
in the 21st century:

> Hi. This is the qmail-send program at apache.org. I'm afraid I wasn't
> able to deliver your message to the following addresses. This is a
> permanent error; I've given up. Sorry it didn't work out.
> 
> <[email protected]>: ezmlm-reject: fatal: Sorry, I don't accept
> messages of MIME Content-Type 'text/html' (#5.2.3)

As I said, I also still write 90% text-only mails, but this enforced
kind of purism on a mailing list is rather shocking. Maybe you want to
reconsider your policy?


------------------------------------------------------------------------


Hi Julia.

I am not quite sure why the java14ge profile should only compile and run
a single test and not all tests. The more intuitive way to organise the
build would be to run all relevant tests for all JDKs, i.e. the JDK 14
tests being a superset of the JDK 8 tests. But you asked for a "logical
XOR", i.e. either/or solution, so I am recommending you to use

mvn help:effective-pom

in order to inspect your configuration. If you look at the effective
POM, you will see that you put your JDK8 compiler configuration with
testExcludes into the general plugin configuration section rather than
in the one for goal testCompile. That parameter only exists there,
though.

You can also combine with -P java8ge,!java14ge or -P !java8ge,java14ge
in order to explicitly check for a certain profile version and override
auto activation.

One way to make your respective test compilations mutually exclusive
would be to override the default execution default-testCompile which
would otherwise be included in each profile unless deactivated via
<phase>none</phase>. So how about this?


<profiles>

  <profile>
    <id>java8ge</id>
    <activation>
      <jdk>[1.8,)</jdk>
    </activation>
    <build>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.1</version>
          <inherited>true</inherited>
          <executions>
            <execution>
              <id>default-testCompile</id>
              <phase>test-compile</phase>
              <goals>
                <goal>testCompile</goal>
              </goals>
              <configuration>
                <testExcludes>
                  <testExclude>**/java14ge/**</testExclude>
                </testExcludes>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </build>
  </profile>

  <profile>
    <id>java14ge</id>
    <activation>
      <jdk>[14,)</jdk>
    </activation>
    <build>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.1</version>
          <inherited>true</inherited>
          <executions>
            <execution>
              <id>default-testCompile</id>
              <phase>test-compile</phase>
              <goals>
                <goal>testCompile</goal>
              </goals>
              <configuration>
                <release>${java.vm.specification.version}</release>
                <compilerArgs>
                  <arg>--enable-preview</arg>
                </compilerArgs>
                <testIncludes>
                  <testInclude>**/java14ge/**</testInclude>
                </testIncludes>
                <testExcludes>
                  <testExclude>com/**</testExclude>
                </testExcludes>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </build>
  </profile>

</profiles>
 

Kind regards
--
Alexander Kriegisch
https://scrum-master.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to