Re: Adding extra "scope" type metadata to dependencies?

2022-11-09 Thread Christoph Läubrich
I also sometimes though about it would be useful to have additional data 
attached to some items in the maven model. In my case it was profile 
activation, what currently seems limited to hard coded defaults as well...


For example with  one can just add everything there that 
is valid XML and then plugins can inspect this.


As XML *can* be extensible, why not simply allow extension elements 
(e.g. from Maven 4.0 on!) on all the major items like dependency, 
profiles and so on?


Then extensions to the model can live in an own namespace and one only 
needs to have a way to access those from the model classes .


For sure this might break older maven versions, but it is often feasible 
to tell people "this project requires maven  
to build"


Am 10.11.22 um 08:45 schrieb Robert Scholte:

Regarding #1 you need to be more precise.
The jigsaw-team also thought it would be easy to extend the pom for this.
However, in the end I discovered there's no need to do this.
The plexus-java library has code which you feed the module descriptor 
and all jars and it is able to decide if they belong to the modulepath 
or classpath.
Only for testing you might want want to decide where services or static 
required modules belongs. That's a per-test decision, so can't be done 
at pom-level.
plexus-java[1] has proven itself since Java 9, only edge cases are 
tricky, but most of the time it is in the details of the specification 
of the java module system.


Robert

[1] 
https://codehaus-plexus.github.io/plexus-languages/plexus-java/usage.html



-- Oorspronkelijke bericht --
Van "Ralph Goers" 
Aan "Maven Developers List" 
Datum 10-11-2022 06:08:27
Onderwerp Re: Adding extra "scope" type metadata to dependencies?

Extending the pom.xml has been discussed for years. Unfortunately, it 
validates the XSD, so when the pom is extended with new attributes 
older versions of Maven will fail. This is the main reason why import 
scope was introduced rather than using a new element.
There were many discussions about adding provides/requires concepts to 
the pom as well as other constructs but they always failed due to this.

Ralph

On Nov 8, 2022, at 1:36 PM, Mark Raynsford 
 wrote:


Hello!

I'd like to be able to add extra metadata to dependencies in a POM file.
Specifically:

 1. I'd like to be able to specify whether a dependency goes on the
    class or module path rather than have Maven decide for me.

 2. I'd like to be able to specify that a dependency _doesn't_ go on
    either path (possibly because it's going to be added manually
    elsewhere during deployment as an OSGi bundle, or as part of a
    dynamically created module layer, or something similar).

Ideally, the second point would be handled properly by IDEs such that
clicking "Run" wouldn't result in artifacts being added to the
classpath/modulepath of the program the IDE runs.

I remember reading (possibly over a year ago now) that there might be
some possibility of an extension that allows for adding extra
information to a  element, but I'm now unable to find any
evidence this existed.

Is there some way to do this today? If not... Will there be some way in
Maven 4.0.0+?

-- Mark Raynsford | https://www.io7m.com


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org




-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Access the maven commandline options from a plexus component?

2022-11-09 Thread Christoph Läubrich
Is it possible to access the commandline options I pass to maven in a 
plexus component?


I'm especially interested in the -V option because I want this to 
trigger printing the version of my core-extension as well


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: Adding extra "scope" type metadata to dependencies?

2022-11-09 Thread Robert Scholte

Regarding #1 you need to be more precise.
The jigsaw-team also thought it would be easy to extend the pom for 
this.

However, in the end I discovered there's no need to do this.
The plexus-java library has code which you feed the module descriptor 
and all jars and it is able to decide if they belong to the modulepath 
or classpath.
Only for testing you might want want to decide where services or static 
required modules belongs. That's a per-test decision, so can't be done 
at pom-level.
plexus-java[1] has proven itself since Java 9, only edge cases are 
tricky, but most of the time it is in the details of the specification 
of the java module system.


Robert

[1] 
https://codehaus-plexus.github.io/plexus-languages/plexus-java/usage.html



-- Oorspronkelijke bericht --
Van "Ralph Goers" 
Aan "Maven Developers List" 
Datum 10-11-2022 06:08:27
Onderwerp Re: Adding extra "scope" type metadata to dependencies?


Extending the pom.xml has been discussed for years. Unfortunately, it validates 
the XSD, so when the pom is extended with new attributes older versions of 
Maven will fail. This is the main reason why import scope was introduced rather 
than using a new element.
There were many discussions about adding provides/requires concepts to the pom 
as well as other constructs but they always failed due to this.
Ralph


On Nov 8, 2022, at 1:36 PM, Mark Raynsford 
 wrote:

Hello!

I'd like to be able to add extra metadata to dependencies in a POM file.
Specifically:

 1. I'd like to be able to specify whether a dependency goes on the
class or module path rather than have Maven decide for me.

 2. I'd like to be able to specify that a dependency _doesn't_ go on
either path (possibly because it's going to be added manually
elsewhere during deployment as an OSGi bundle, or as part of a
dynamically created module layer, or something similar).

Ideally, the second point would be handled properly by IDEs such that
clicking "Run" wouldn't result in artifacts being added to the
classpath/modulepath of the program the IDE runs.

I remember reading (possibly over a year ago now) that there might be
some possibility of an extension that allows for adding extra
information to a  element, but I'm now unable to find any
evidence this existed.

Is there some way to do this today? If not... Will there be some way in
Maven 4.0.0+?

-- Mark Raynsford | https://www.io7m.com


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org




-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: Adding extra "scope" type metadata to dependencies?

2022-11-09 Thread Ralph Goers
Extending the pom.xml has been discussed for years. Unfortunately, 
it validates the XSD, so when the pom is extended with new attributes 
older versions of Maven will fail. This is the main reason why import 
scope was introduced rather than using a new element. 

There were many discussions about adding provides/requires concepts 
to the pom as well as other constructs but they always failed due to this. 

Ralph

> On Nov 8, 2022, at 1:36 PM, Mark Raynsford 
>  wrote:
> 
> Hello!
> 
> I'd like to be able to add extra metadata to dependencies in a POM file.
> Specifically:
> 
>  1. I'd like to be able to specify whether a dependency goes on the
> class or module path rather than have Maven decide for me.
> 
>  2. I'd like to be able to specify that a dependency _doesn't_ go on
> either path (possibly because it's going to be added manually
> elsewhere during deployment as an OSGi bundle, or as part of a
> dynamically created module layer, or something similar).
> 
> Ideally, the second point would be handled properly by IDEs such that
> clicking "Run" wouldn't result in artifacts being added to the
> classpath/modulepath of the program the IDE runs.
> 
> I remember reading (possibly over a year ago now) that there might be
> some possibility of an extension that allows for adding extra
> information to a  element, but I'm now unable to find any
> evidence this existed.
> 
> Is there some way to do this today? If not... Will there be some way in
> Maven 4.0.0+?
> 
> -- 
> Mark Raynsford | https://www.io7m.com
> 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
> 


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: [VOTE] Release Maven Resolver 1.9.0

2022-11-09 Thread Olivier Lamy
+1

On Wed, 9 Nov 2022 at 1:07 am, Tamás Cservenák  wrote:

> Howdy,
>
> We solved 18 issues:
>
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12320628=12351593
>
> There are still some issues in JIRA:
> https://issues.apache.org/jira/projects/MRESOLVER/issues
>
> Staging repo:
> https://repository.apache.org/content/repositories/maven-1821/
>
> Source release SHA512:
>
> 18cb7eb11361996822f2d08b389346774bf1364bbfe699346f23774e5438cf22c91e12639aa21ddc91f4db000756d54a1c115b518ffb34f060cb78bef171
>
> Staging site:
> https://maven.apache.org/resolver-archives/resolver-LATEST/
>
> Guide to testing staged releases:
> https://maven.apache.org/guides/development/guide-testing-releases.html
>
> Vote open for at least 72 hours.
>
> [ ] +1
> [ ] +0
> [ ] -1
>


Re: [VOTE] Release Maven Indexer 7.0.0

2022-11-09 Thread Olivier Lamy
+1

On Wed, 9 Nov 2022 at 12:33 am, Tamás Cservenák  wrote:

> Howdy,
>
> We solved 17 issues:
>
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12317523=12342224
>
> There are still couple of issues left in JIRA:
> https://issues.apache.org/jira/projects/MINDEXER/issues
>
> Staging repo:
> https://repository.apache.org/content/repositories/maven-1820/
>
> Source release SHA512:
>
> b77ad67c8e9ad7dd81d7af2288a8b32da257a63f6cb7269bc6838c63d88bc9c92cdaf213da5f936bcac9cb7102a91b09892f00eb36ac98924b9817b2a4d25b17
>
> Staging site:
> https://maven.apache.org/maven-indexer-archives/maven-indexer-LATEST/
>
> Guide to testing staged releases:
> https://maven.apache.org/guides/development/guide-testing-releases.html
>
> Vote open for at least 72 hours.
>
> [ ] +1
> [ ] +0
> [ ] -1
>


Re: Maven does'nt find jar

2022-11-09 Thread Michael Osipov

Am 2022-11-09 um 15:52 schrieb Raivo Rebane:

Hello

I a novice user of maven and I would like to compile with maven OGC 
Validator, but I got error:


[ERROR] 
/C:/Users/Raivo/teamengine/teamengine-realm/src/main/java/com/occamlab/te/realm/PasswordStorage.java:[17,22] package javax.xml.bind does not exist.


But it really exist in jdk-8 and jre-8 lib directories.

Where they must saved to be found by Maven Java compiler ?


Wrong list: users@maven.a.o


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: [VOTE] Release Maven Resolver 1.9.0

2022-11-09 Thread Michael Osipov

Am 2022-11-08 um 16:07 schrieb Tamás Cservenák:

Howdy,

We solved 18 issues:
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12320628=12351593

There are still some issues in JIRA:
https://issues.apache.org/jira/projects/MRESOLVER/issues

Staging repo:
https://repository.apache.org/content/repositories/maven-1821/

Source release SHA512:
18cb7eb11361996822f2d08b389346774bf1364bbfe699346f23774e5438cf22c91e12639aa21ddc91f4db000756d54a1c115b518ffb34f060cb78bef171

Staging site:
https://maven.apache.org/resolver-archives/resolver-LATEST/

Guide to testing staged releases:
https://maven.apache.org/guides/development/guide-testing-releases.html

Vote open for at least 72 hours.


+1



Re: [VOTE] Release Maven Indexer 7.0.0

2022-11-09 Thread Michael Osipov

Am 2022-11-08 um 15:33 schrieb Tamás Cservenák:

Howdy,

We solved 17 issues:
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12317523=12342224

There are still couple of issues left in JIRA:
https://issues.apache.org/jira/projects/MINDEXER/issues

Staging repo:
https://repository.apache.org/content/repositories/maven-1820/

Source release SHA512:
b77ad67c8e9ad7dd81d7af2288a8b32da257a63f6cb7269bc6838c63d88bc9c92cdaf213da5f936bcac9cb7102a91b09892f00eb36ac98924b9817b2a4d25b17

Staging site:
https://maven.apache.org/maven-indexer-archives/maven-indexer-LATEST/

Guide to testing staged releases:
https://maven.apache.org/guides/development/guide-testing-releases.html

Vote open for at least 72 hours.


+1



Re: Maven does'nt find jar

2022-11-09 Thread Benjamin Marwell
Hi Raivo!

This is a better question for the users list.  The developer list is
for maven development.

But long story short:
javax.xml.bind got removed from Java 9+. So even if you are compiling
TO java 8 (e.g. using switches like maven.compiler.release or
maven.compiler.target), it will still not find these packages in the
Java 9+ JDK it is running.

Best advice is to add the missing dependencies. They do not hurt on
Java 8, but will be needed on Java 9 anyway.

Please find an in-depth answer here on SO: https://stackoverflow.com/a/52502208

HTH,
Ben

Am Mi., 9. Nov. 2022 um 15:52 Uhr schrieb Raivo Rebane :
>
> Hello
>
> I a novice user of maven and I would like to compile with maven OGC
> Validator, but I got error:
>
> [ERROR]
> /C:/Users/Raivo/teamengine/teamengine-realm/src/main/java/com/occamlab/te/realm/PasswordStorage.java:[17,22]
> package javax.xml.bind does not exist.
>
> But it really exist in jdk-8 and jre-8 lib directories.
>
> Where they must saved to be found by Maven Java compiler ?
>
> Regards
>
> Raivo
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>

-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: [VOTE] Release Maven Resolver 1.9.0

2022-11-09 Thread Slawomir Jaranowski
+1

wt., 8 lis 2022 o 16:07 Tamás Cservenák  napisał(a):

> Howdy,
>
> We solved 18 issues:
>
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12320628=12351593
>
> There are still some issues in JIRA:
> https://issues.apache.org/jira/projects/MRESOLVER/issues
>
> Staging repo:
> https://repository.apache.org/content/repositories/maven-1821/
>
> Source release SHA512:
>
> 18cb7eb11361996822f2d08b389346774bf1364bbfe699346f23774e5438cf22c91e12639aa21ddc91f4db000756d54a1c115b518ffb34f060cb78bef171
>
> Staging site:
> https://maven.apache.org/resolver-archives/resolver-LATEST/
>
> Guide to testing staged releases:
> https://maven.apache.org/guides/development/guide-testing-releases.html
>
> Vote open for at least 72 hours.
>
> [ ] +1
> [ ] +0
> [ ] -1
>


-- 
Sławomir Jaranowski


Re: [VOTE] Release Maven Indexer 7.0.0

2022-11-09 Thread Slawomir Jaranowski
+1

wt., 8 lis 2022 o 15:33 Tamás Cservenák  napisał(a):

> Howdy,
>
> We solved 17 issues:
>
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12317523=12342224
>
> There are still couple of issues left in JIRA:
> https://issues.apache.org/jira/projects/MINDEXER/issues
>
> Staging repo:
> https://repository.apache.org/content/repositories/maven-1820/
>
> Source release SHA512:
>
> b77ad67c8e9ad7dd81d7af2288a8b32da257a63f6cb7269bc6838c63d88bc9c92cdaf213da5f936bcac9cb7102a91b09892f00eb36ac98924b9817b2a4d25b17
>
> Staging site:
> https://maven.apache.org/maven-indexer-archives/maven-indexer-LATEST/
>
> Guide to testing staged releases:
> https://maven.apache.org/guides/development/guide-testing-releases.html
>
> Vote open for at least 72 hours.
>
> [ ] +1
> [ ] +0
> [ ] -1
>


-- 
Sławomir Jaranowski


Re: Maven does'nt find jar

2022-11-09 Thread Raivo Rebane

Hello

I a novice user of maven and I would like to compile with maven OGC 
Validator, but I got error:


[ERROR] 
/C:/Users/Raivo/teamengine/teamengine-realm/src/main/java/com/occamlab/te/realm/PasswordStorage.java:[17,22] 
package javax.xml.bind does not exist.


But it really exist in jdk-8 and jre-8 lib directories.

Where they must saved to be found by Maven Java compiler ?

Regards

Raivo


-
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org



Re: [VOTE] Release Apache Maven 4.0.0-alpha-2

2022-11-09 Thread Delany
Thanks for explaining
Delany

On Tue, 8 Nov 2022 at 13:08, Guillaume Nodet  wrote:

> There are known issues that will be fixed in the next milestone.  This
> problem in particular has already been fixed in [1].
> The flatten plugin is still relevant, as the goal for maven 4.0 is to be
> compatible with maven 3 apart from the removal of things that have been
> deprecated since ages.
>
> [1] https://github.com/apache/maven/pull/836
>
> Le mar. 8 nov. 2022 à 07:11, Delany  a écrit :
>
> > Hi. I noticed the vote passed for alpha-2, but I'm still getting this
> > issue. Can someone comment?
> > Is the flatten plugin still relevant in Maven 4?
> >
> > Thanks,
> > Delany
> >
> > On Thu, 20 Oct 2022 at 09:26, Delany  wrote:
> >
> > > hi. I just changed .mvn/wrapper/maven-wrapper.properties to
> > > distributionUrl=
> > >
> >
> https://repository.apache.org/service/local/repositories/maven-1811/content/org/apache/maven/apache-maven/4.0.0-alpha-2/apache-maven-4.0.0-alpha-2-bin.zip
> > >
> > > The options now require an equals: --threads=1C, but the help page
> still
> > > shows a space: -T,--threads 
> > >
> > > After fixing that it fails with
> > > [ERROR] Failed to execute goal
> > > org.codehaus.mojo:flatten-maven-plugin:1.3.0:flatten (flatten) on
> project
> > > maven-super: Execution flatten of goal
> > > org.codehaus.mojo:flatten-maven-plugin:1.3.0:flatten failed: An API
> > > incompatibility was encountered while executing
> > > org.codehaus.mojo:flatten-maven-plugin:1.3.0:flatten:
> > > java.lang.NoSuchMethodError: 'void
> > >
> >
> org.apache.maven.model.interpolation.MavenBuildTimestamp.(java.util.Date,
> > > java.util.Properties)'
> > > [ERROR] -
> > > [ERROR] realm =plugin>org.codehaus.mojo:flatten-maven-plugin:1.3.0
> > > [ERROR] strategy =
> > > org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
> > > [ERROR] urls[0] =
> > >
> >
> file:/home/sol/.m2/repository/org/codehaus/mojo/flatten-maven-plugin/1.3.0/flatten-maven-plugin-1.3.0.jar
> > > [ERROR] urls[1] =
> > >
> >
> file:/home/sol/.m2/repository/org/apache/maven/shared/maven-dependency-tree/3.2.0/maven-dependency-tree-3.2.0.jar
> > > [ERROR] urls[2] =
> > >
> >
> file:/home/sol/.m2/repository/org/codehaus/plexus/plexus-utils/3.4.2/plexus-utils-3.4.2.jar
> > > [ERROR] urls[3] =
> > >
> >
> file:/home/sol/.m2/repository/org/apache/maven/shared/maven-artifact-transfer/0.13.1/maven-artifact-transfer-0.13.1.jar
> > > [ERROR] urls[4] =
> > >
> >
> file:/home/sol/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
> > > [ERROR] urls[5] =
> > >
> >
> file:/home/sol/.m2/repository/javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
> > > [ERROR] urls[6] =
> > >
> >
> file:/home/sol/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.0.M1/org.eclipse.sisu.inject-0.3.0.M1.jar
> > > [ERROR] urls[7] =
> > >
> >
> file:/home/sol/.m2/repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
> > > [ERROR] urls[8] =
> > >
> >
> file:/home/sol/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
> > > [ERROR] urls[9] =
> > >
> >
> file:/home/sol/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
> > > [ERROR] urls[10] =
> > >
> >
> file:/home/sol/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
> > > [ERROR] urls[11] =
> > >
> >
> file:/home/sol/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
> > > [ERROR] urls[12] =
> > >
> >
> file:/home/sol/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
> > > [ERROR] urls[13] =
> > >
> >
> file:/home/sol/.m2/repository/org/codehaus/plexus/plexus-component-annotations/2.0.0/plexus-component-annotations-2.0.0.jar
> > > [ERROR] urls[14] =
> > >
> >
> file:/home/sol/.m2/repository/org/apache/maven/shared/maven-common-artifact-filters/3.1.0/maven-common-artifact-filters-3.1.0.jar
> > > [ERROR] urls[15] =
> > >
> >
> file:/home/sol/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.1.0/maven-shared-utils-3.1.0.jar
> > > [ERROR] urls[16] =
> > >
> >
> file:/home/sol/.m2/repository/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar
> > > [ERROR] Number of foreign imports: 1
> > > [ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent:
> > > null]]
> > >
> > > Regards,
> > > Delany
> > >
> > > On Sat, 15 Oct 2022 at 02:19, Guillaume Nodet 
> wrote:
> > >
> > >> I've staged a release candidate at
> > >>   https://repository.apache.org/content/repositories/maven-1811
> > >>
> > >> The binaries are available at:
> > >>
> > >>
> > >>
> >
> https://repository.apache.org/service/local/repositories/maven-1811/content/org/apache/maven/apache-maven/4.0.0-alpha-2/
> > >>
> > >> The tag is available at:
> > >>   https://github.com/apache/maven/tree/maven-4.0.0-alpha-2
> > >>
> > >> Please review and vote !
> > >>
> > >> Cheers,
> > >> Guillaume Nodet
> > >>
> > >
> >
>
>