Re: Profile pitfall or user error?

2021-08-01 Thread Gary Gregory
I found a workaround by declaring the toolsJar property in the project
properties instead of the profile itself. I suppose I was looking for
"local" profile properties which obviously is not a thing in Maven ;-)

Gary

On Sun, Aug 1, 2021 at 1:35 PM Gary Gregory  wrote:

> Hi All:
>
> I want to use a property in a profile in a Java 8 Maven 3.8.1 project, but
> it does not work within a file activation element. In the example below
> this file activation works:
>
> ${java.home}/../lib/tools.jar
>
> but this one does not:
>
> ${toolsJar}
>
> The profile:
>
>   
> 
>   jdk9
>   
> [1.9,)
>   
>   
>   
> 
> 
>   default-jdk
>   
> ${java.home}/../lib/tools.jar
>   
>   
> 
>   
>   ${java.home}/../lib/tools.jar
> 
>   
>   
> 
>   jdk.tools
>   jdk.tools
>   system
>   8
>   ${toolsJar}
> 
>   
> 
>   
>
> Am I doing something wrong?
>
> Gary
>
>


Profile pitfall or user error?

2021-08-01 Thread Gary Gregory
Hi All:

I want to use a property in a profile in a Java 8 Maven 3.8.1 project, but
it does not work within a file activation element. In the example below
this file activation works:

${java.home}/../lib/tools.jar

but this one does not:

${toolsJar}

The profile:

  

  jdk9
  
[1.9,)
  
  
  


  default-jdk
  
${java.home}/../lib/tools.jar
  
  

  
  ${java.home}/../lib/tools.jar

  
  

  jdk.tools
  jdk.tools
  system
  8
  ${toolsJar}

  

  

Am I doing something wrong?

Gary


Re: [ANN] Apache Maven Enforcer Plugin + Extension 3.0.0 Released

2021-08-01 Thread Delany
See
https://github.com/mojohaus/extra-enforcer-rules/issues/131#issuecomment-890329715

On Sun, 1 Aug 2021, 05:34 Alexander Kriegisch, 
wrote:

> It looks like class EnforceBytecodeVersion is part of
> org.codehaus.mojo:extra-enforcer-rules:1.3 which is a dependency in my
> Enforcer plugin configuration. Is that extension no longer compatible
> with Enforcer? Or has it been replaced by something else, which I am
> unaware of? Like I said, in M3 it was still working.
>
> --
> Alexander Kriegisch
> https://scrum-master.de
>
>
> Alexander Kriegisch schrieb am 01.08.2021 10:16 (GMT +07:00):
>
> > In a GitHub project, Dependabot suggested an update from 3.0.0-M3 to
> > 3.0.0, but all CI builds fail with this error message:
> >
> > Failed to execute goal
> > org.apache.maven.plugins:maven-enforcer-plugin:3.0.0:enforce
> > (enforce-bytecode-version) on project x:
> >   Unable to parse configuration of mojo (...)
> >   for parameter enforceBytecodeVersion:
> > Cannot create instance of class
> > org.apache.maven.plugins.enforcer.EnforceBytecodeVersion:
> >
>  org/apache/maven/shared/dependency/tree/DependencyTreeBuilderException:
> > (...)
> >
> > In the release notes, I do not see any reference to that rule having
> > been removed between M3 and final release. Is there some other dependent
> > component which needs to be upgraded? Maybe I need to override some
> > dependency-managed component from a parent POM.
> >
> > Thanks in advance for your insights.
> >
> >
> > Robert Scholte schrieb am 30.07.2021 16:46 (GMT +07:00):
> >
> >> The Apache Maven team is pleased to announce the release of the Apache
> Maven
> >> Enforcer Plugin and Extension, version 3.0.0
> >>
> >> The Enforcer plugin is the Loving Iron Fist of Maven and provides goals
> to
> >> control certain environmental constraints such as Maven version, JDK
> version
> >> and OS family along with many more built-in rules and user created
> rules.
> >>
> >> https://maven.apache.org/enforcer/maven-enforcer-plugin/
> >>
> >> You should specify the version in your project's plugin configuration:
> >>
> >> 
> >> org.apache.maven.plugins
> >> maven-enforcer-plugin
> >> 3.0.0
> >> 
> >>
> >> You can download the appropriate sources etc. from the download page:
> >>
> >> https://maven.apache.org/enforcer/download.html
> >>
> >>
> >> Release Notes - Maven Enforcer Plugin - Version 3.0.0
> >>
> >> ** Bug
> >>
> >> * [MENFORCER-168] - In a multi module project "bannedDependencies"
> rule
> >> tries to resolve project artifacts from external repository
> >> * [MENFORCER-185] - Require Release Dependencies ignorant about
> >> aggregator build
> >> * [MENFORCER-301] - banDuplicatePomDependencyVersions does not check
> >> managementDependencies
> >> * [MENFORCER-336] - Beanshell rule is not thread-safe
> >> * [MENFORCER-346] - RequireSnapshotVersion not compatible with CI
> >> Friendly Versions (${revision})
> >> * [MENFORCER-351] - NPE when using new  syntax with
> >> maven-enforcer-plugin
> >> * [MENFORCER-352] - Broken links on Maven Enforcer Plugin site
> >> * [MENFORCER-357] - RequirePluginVersions not recognizing
> >> versions-from-properties
> >> * [MENFORCER-359] - [REGRESSION] RequirePluginVersions fails when
> >> versions are inherited
> >> * [MENFORCER-364] - requireFilesExist rule should be case sensitive
> >> * [MENFORCER-366] - Broken Links on Project Home Page
> >> * [MENFORCER-373] - TestRequireOS uses hamcrest via transitive
> >> dependency
> >> * [MENFORCER-374] - plexus-container-default in enforcer-api is very
> >> outdated
> >> * [MENFORCER-381] - classifier not included in output of failed
> >> RequireUpperBoundDeps test
> >>
> >> ** New Feature
> >> * [MENFORCER-358] - requireUpperBounds deps should have includes
> >> * [MENFORCER-361] - Introduce RequireTextFileChecksum with line
> >> separator
> >> normalization
> >>
> >> ** Improvement
> >> * [MENFORCER-211] - wildcard ignore in requireReleaseDeps
> >> * [MENFORCER-245] - Improve documentation about writing own Enforcer
> >> Rule
> >> * [MENFORCER-257] - RequireActiveProfile should respect inherited
> >> activated profiles
> >> * [MENFORCER-277] - Upgrade maven-dependency-tree to 3.x
> >> * [MENFORCER-304] - Improve dependency resolving in multiple modules
> >> project
> >> * [MENFORCER-313] - requireUpperBoundDeps: add [] and colors
> to
> >> the output
> >> * [MENFORCER-329] - Example for writing a custom rule should be
> upgraded
> >> * [MENFORCER-338] - Along with JavaVersion, allow enforcement of the
> >> JavaVendor
> >> * [MENFORCER-349] - Include Java vendor in display-info output
> >> * [MENFORCER-350] - requireMavenVersion x.y.z is processed as
> (,x.y.z]
> >> instead of [x.y.z,)
> >> * [MENFORCER-353] - Consistently format artifacts same as
> >> dependency:tree
> >> * [MENFORCER-355] - make build Reproducible
> >> * [MENFORCER-376] - Add support for