Re: Accessing a maven repository programatically (in 2019)

2019-04-07 Thread Michael Lipp
Thanks to everybody who answered. However, I'm utterly confused.

The references to the examples
(https://github.com/GoogleCloudPlatform/cloud-opensource-java/tree/master/dependencies
and
https://github.com/apache/maven-resolver/tree/master/maven-resolver-demos/maven-resolver-demo-snippets/src/main/java/org/apache/maven/resolver/examples)
effectively all use org.eclipse.aether (e.g.
https://github.com/apache/maven-resolver/blob/master/maven-resolver-demos/maven-resolver-demo-snippets/src/main/java/org/apache/maven/resolver/examples/ResolveArtifact.java
doesn't use a single class from org.apache.maven.*).

It somehow makes me wonder what the point of the org.apache.maven.* API
is. I was under the impression that it is "the way to go" when you want
to make use of an existing, maven-project-supported library for working
with maven repositories and artifacts. But now I'm left with the
impression that nobody really uses it and I shouldn't care about it and
rather use org.eclipse.aether. Is this correct?

 - Michael




Re: [VOTE] Release Apache Maven Version 3.6.1

2019-04-07 Thread Olivier Lamy
+1

On Fri, 5 Apr 2019 at 05:55, Karl Heinz Marbaise  wrote:

> Hi,
>
> We have solved 42 issues:
>
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12316922=12338966
>
> There are issues left in JIRA for Maven core:
>
> https://issues.apache.org/jira/issues/?jql=project%20%3D%20MNG%20AND%20resolution%20%3D%20Unresolved%20ORDER%20BY%20key%20DESC%2C%20priority%20DESC%2C%20updated%20DESC
>
> Staging repo:
> https://repository.apache.org/content/repositories/maven-1496
>
> The distributable binaries and sources can be found here:
>
> https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/
>
> Specifically the zip, tarball and source archives can be found here:
>
>
> https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip
>
> https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.tar.gz
>
>
> https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-src.zip
>
> https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-src.tar.gz
>
> The release artifacts are staged for distribution in:
> https://dist.apache.org/repos/dist/dev/maven/maven-3/3.6.0
>
> Source release checksum(s):
> apache-maven-3.6.1-src.tar.gz
>
>sha1: 4e87c962ed505a0158085f99d92a0ade8c7fd197
> sha512:
>
> 11a31022cffa0518584703fffd9fce998332ac5f6c2a50db3b590e90f3bdd1508d9e0cb5ba89a699ef6536b237bcc96166cfde3d45bce6346fa21b05b4d12bf8
>
> apache-maven-3.6.1-src.zip:
>
>sha1: ec0618f981f9367f133a29fbfcaa8e073cb8ac85
> sha512:
>
> b92d8ed72585c4e05debe4d15eb9ae5dd72e814b6413bcba78d01282c9eccc38e79755654e0d0b4e5a650f0226c116a4a4faad731918a465ad424a2a81582a67
>
> Git tag:
>
> https://gitbox.apache.org/repos/asf?p=maven.git;a=commit;h=d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555
>
> Staging site:
> https://maven.apache.org/components/ref/3-LATEST/
>
> Vote open for 72 hours.
>
> [ ] +1
> [ ] +0
> [ ] -1
>
> Kind regards
> Karl Heinz Marbaise
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>

-- 
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy


Re: [VOTE] Release Apache Maven Version 3.6.1

2019-04-07 Thread Hervé BOUTEMY
+1

On binary reproducibility, the convenience binaries were built with JDK 8 on 
Windows. I was able to rebuild equivalent binaries, with explained differences 
documented on our Wiki [1] plus one very specific to maven-core artifact (org/
apache/maven/messages/build.properties content). Animal Sniffer is included in 
the build, then no JDK 7 compatibility expected

Regards,

Hervé

[1] https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=74682318

Le jeudi 4 avril 2019, 21:55:09 CEST Karl Heinz Marbaise a écrit :
> Hi,
> 
> We have solved 42 issues:
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12316922
> rsion=12338966
> 
> There are issues left in JIRA for Maven core:
> https://issues.apache.org/jira/issues/?jql=project%20%3D%20MNG%20AND%20resol
> ution%20%3D%20Unresolved%20ORDER%20BY%20key%20DESC%2C%20priority%20DESC%2C%2
> 0updated%20DESC
> 
> Staging repo:
> https://repository.apache.org/content/repositories/maven-1496
> 
> The distributable binaries and sources can be found here:
> https://repository.apache.org/content/repositories/maven-1496/org/apache/mav
> en/apache-maven/3.6.1/
> 
> Specifically the zip, tarball and source archives can be found here:
> 
> https://repository.apache.org/content/repositories/maven-1496/org/apache/mav
> en/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip
> https://repository.apache.org/content/repositories/maven-1496/org/apache/ma
> ven/apache-maven/3.6.1/apache-maven-3.6.1-bin.tar.gz
> 
> https://repository.apache.org/content/repositories/maven-1496/org/apache/mav
> en/apache-maven/3.6.1/apache-maven-3.6.1-src.zip
> https://repository.apache.org/content/repositories/maven-1496/org/apache/ma
> ven/apache-maven/3.6.1/apache-maven-3.6.1-src.tar.gz
> 
> The release artifacts are staged for distribution in:
> https://dist.apache.org/repos/dist/dev/maven/maven-3/3.6.0
> 
> Source release checksum(s):
> apache-maven-3.6.1-src.tar.gz
> 
>sha1: 4e87c962ed505a0158085f99d92a0ade8c7fd197
> sha512:
> 11a31022cffa0518584703fffd9fce998332ac5f6c2a50db3b590e90f3bdd1508d9e0cb5ba89
> a699ef6536b237bcc96166cfde3d45bce6346fa21b05b4d12bf8
> 
> apache-maven-3.6.1-src.zip:
> 
>sha1: ec0618f981f9367f133a29fbfcaa8e073cb8ac85
> sha512:
> b92d8ed72585c4e05debe4d15eb9ae5dd72e814b6413bcba78d01282c9eccc38e79755654e0d
> 0b4e5a650f0226c116a4a4faad731918a465ad424a2a81582a67
> 
> Git tag:
> https://gitbox.apache.org/repos/asf?p=maven.git;a=commit;h=d66c9c0b3152b2e69
> ee9bac180bb8fcc8e6af555
> 
> Staging site:
> https://maven.apache.org/components/ref/3-LATEST/
> 
> Vote open for 72 hours.
> 
> [ ] +1
> [ ] +0
> [ ] -1
> 
> Kind regards
> Karl Heinz Marbaise
> 
> -
> 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 Apache Maven Version 3.6.1

2019-04-07 Thread Tibor Digana
+1 used 3.6.1 in project with build success

On Thu, Apr 4, 2019 at 9:55 PM Karl Heinz Marbaise 
wrote:

> Hi,
>
> We have solved 42 issues:
>
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12316922=12338966
>
> There are issues left in JIRA for Maven core:
>
> https://issues.apache.org/jira/issues/?jql=project%20%3D%20MNG%20AND%20resolution%20%3D%20Unresolved%20ORDER%20BY%20key%20DESC%2C%20priority%20DESC%2C%20updated%20DESC
>
> Staging repo:
> https://repository.apache.org/content/repositories/maven-1496
>
> The distributable binaries and sources can be found here:
>
> https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/
>
> Specifically the zip, tarball and source archives can be found here:
>
>
> https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip
>
> https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.tar.gz
>
>
> https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-src.zip
>
> https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-src.tar.gz
>
> The release artifacts are staged for distribution in:
> https://dist.apache.org/repos/dist/dev/maven/maven-3/3.6.0
>
> Source release checksum(s):
> apache-maven-3.6.1-src.tar.gz
>
>sha1: 4e87c962ed505a0158085f99d92a0ade8c7fd197
> sha512:
>
> 11a31022cffa0518584703fffd9fce998332ac5f6c2a50db3b590e90f3bdd1508d9e0cb5ba89a699ef6536b237bcc96166cfde3d45bce6346fa21b05b4d12bf8
>
> apache-maven-3.6.1-src.zip:
>
>sha1: ec0618f981f9367f133a29fbfcaa8e073cb8ac85
> sha512:
>
> b92d8ed72585c4e05debe4d15eb9ae5dd72e814b6413bcba78d01282c9eccc38e79755654e0d0b4e5a650f0226c116a4a4faad731918a465ad424a2a81582a67
>
> Git tag:
>
> https://gitbox.apache.org/repos/asf?p=maven.git;a=commit;h=d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555
>
> Staging site:
> https://maven.apache.org/components/ref/3-LATEST/
>
> Vote open for 72 hours.
>
> [ ] +1
> [ ] +0
> [ ] -1
>
> Kind regards
> Karl Heinz Marbaise
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>


Re: [VOTE] Release Apache Maven Version 3.6.1

2019-04-07 Thread Sylwester Lachiewicz
And my +1 also.

Sylwester

W dniu niedz., 7.04.2019 o 12:47 Karl Heinz Marbaise 
napisał(a):

> Hi,
>
> here is my +1
>
> tested with several local projects ...with company projects...
>
> Kind regards
> Karl Heinz Marbaise
>
>
> n 04.04.19 21:55, Karl Heinz Marbaise wrote:
> > Hi,
> >
> > We have solved 42 issues:
> >
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12316922=12338966
> >
> >
> > There are issues left in JIRA for Maven core:
> >
> https://issues.apache.org/jira/issues/?jql=project%20%3D%20MNG%20AND%20resolution%20%3D%20Unresolved%20ORDER%20BY%20key%20DESC%2C%20priority%20DESC%2C%20updated%20DESC
> >
> >
> > Staging repo:
> > https://repository.apache.org/content/repositories/maven-1496
> >
> > The distributable binaries and sources can be found here:
> >
> https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/
> >
> >
> > Specifically the zip, tarball and source archives can be found here:
> >
> >
> https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip
> >
> >
> https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.tar.gz
> >
> >
> >
> https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-src.zip
> >
> >
> https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-src.tar.gz
> >
> >
> > The release artifacts are staged for distribution in:
> > https://dist.apache.org/repos/dist/dev/maven/maven-3/3.6.0
> >
> > Source release checksum(s):
> > apache-maven-3.6.1-src.tar.gz
> >
> >sha1: 4e87c962ed505a0158085f99d92a0ade8c7fd197
> > sha512:
> >
> 11a31022cffa0518584703fffd9fce998332ac5f6c2a50db3b590e90f3bdd1508d9e0cb5ba89a699ef6536b237bcc96166cfde3d45bce6346fa21b05b4d12bf8
> >
> >
> > apache-maven-3.6.1-src.zip:
> >
> >sha1: ec0618f981f9367f133a29fbfcaa8e073cb8ac85
> > sha512:
> >
> b92d8ed72585c4e05debe4d15eb9ae5dd72e814b6413bcba78d01282c9eccc38e79755654e0d0b4e5a650f0226c116a4a4faad731918a465ad424a2a81582a67
> >
> >
> > Git tag:
> >
> https://gitbox.apache.org/repos/asf?p=maven.git;a=commit;h=d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555
> >
> >
> > Staging site:
> > https://maven.apache.org/components/ref/3-LATEST/
> >
> > Vote open for 72 hours.
> >
> > [ ] +1
> > [ ] +0
> > [ ] -1
> >
> > Kind regards
> > Karl Heinz Marbaise
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>


Re: [VOTE] Release Apache Maven Version 3.6.1

2019-04-07 Thread Karl Heinz Marbaise

Hi,
unfortunately I don't have enough PMC votes...

I will enhance the VOTE for another 72 hours...


Kind regards
Karl Heinz Marbaise

On 04.04.19 21:55, Karl Heinz Marbaise wrote:

Hi,

We have solved 42 issues:
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12316922=12338966


There are issues left in JIRA for Maven core:
https://issues.apache.org/jira/issues/?jql=project%20%3D%20MNG%20AND%20resolution%20%3D%20Unresolved%20ORDER%20BY%20key%20DESC%2C%20priority%20DESC%2C%20updated%20DESC


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

The distributable binaries and sources can be found here:
https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/


Specifically the zip, tarball and source archives can be found here:

https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip

https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.tar.gz


https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-src.zip

https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-src.tar.gz


The release artifacts are staged for distribution in:
https://dist.apache.org/repos/dist/dev/maven/maven-3/3.6.0

Source release checksum(s):
apache-maven-3.6.1-src.tar.gz

   sha1: 4e87c962ed505a0158085f99d92a0ade8c7fd197
sha512:
11a31022cffa0518584703fffd9fce998332ac5f6c2a50db3b590e90f3bdd1508d9e0cb5ba89a699ef6536b237bcc96166cfde3d45bce6346fa21b05b4d12bf8


apache-maven-3.6.1-src.zip:

   sha1: ec0618f981f9367f133a29fbfcaa8e073cb8ac85
sha512:
b92d8ed72585c4e05debe4d15eb9ae5dd72e814b6413bcba78d01282c9eccc38e79755654e0d0b4e5a650f0226c116a4a4faad731918a465ad424a2a81582a67


Git tag:
https://gitbox.apache.org/repos/asf?p=maven.git;a=commit;h=d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555


Staging site:
https://maven.apache.org/components/ref/3-LATEST/

Vote open for 72 hours.

[ ] +1
[ ] +0
[ ] -1

Kind regards
Karl Heinz Marbaise


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



[maven resolver provider] Trying to programatically build an effective model - can't find a public ModelResolver

2019-04-07 Thread Sahil Muthoo
Hello -

I’m looking to programatically obtain an effective model from a POM
file from outside a Maven container. Search on the interwebs have
taken me to [Maven Resolver
Provider](https://maven.apache.org/ref/3.6.0/maven-resolver-provider/).
This appears to have [replaced Eclipse
Aether](http://maven.apache.org/aether.html) as a means of
programmatic access to maven model resolution. I initially posted this
to maven-users but got no response. I've also created a [question on
StackOverflow](https://stackoverflow.com/q/55527844/237033) with a
bounty but no dice.

I’ve written some code that works. However I’ve had to resort to
accessing a package private class
(org.apache.maven.repository.internal.DefaultModelResolver) to make it
work. Here’s the code:

public static void main(String[] args) throws Exception {
DefaultServiceLocator locator = serviceLocator();
RepositorySystem system = locator.getService(RepositorySystem.class);
DefaultRepositorySystemSession session =
MavenRepositorySystemUtils.newSession();
LocalRepository localRepo = new LocalRepository("target/m2");

session.setLocalRepositoryManager(system.newLocalRepositoryManager(session,
localRepo));

Constructor c = modelResolverCtor();
RequestTrace requestTrace = new RequestTrace(null);
ArtifactResolver artifactResolver =
locator.getService(ArtifactResolver.class);
VersionRangeResolver versionRangeResolver =
locator.getService(VersionRangeResolver.class);
RemoteRepositoryManager remoteRepositoryManager =
locator.getService(RemoteRepositoryManager.class);
List repos = List.of(new
RemoteRepository.Builder("central", "default",
"https://repo.maven.apache.org/maven2/;).build());
ModelResolver modelResolver = c.newInstance(session,
requestTrace, "context", artifactResolver, versionRangeResolver,
remoteRepositoryManager, repos);

DefaultModelBuildingRequest modelBuildingRequest = new
DefaultModelBuildingRequest();
String springBootPOMPath =

"https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot/2.1.4.RELEASE/spring-boot-2.1.4.RELEASE.pom;;
File springBootPOM = downloadPOM(springBootPOMPath,
HttpClientBuilder.create().build());
modelBuildingRequest.setPomFile(springBootPOM);
modelBuildingRequest.setModelResolver(modelResolver);
DefaultModelBuilder modelBuilder = new
DefaultModelBuilderFactory().newInstance();

System.out.println(modelBuilder.build(modelBuildingRequest).getEffectiveModel().getDependencies());
}

private static DefaultServiceLocator serviceLocator() {
DefaultServiceLocator locator =
MavenRepositorySystemUtils.newServiceLocator();
locator.addService(RepositoryConnectorFactory.class,
BasicRepositoryConnectorFactory.class);
locator.addService(TransporterFactory.class,
FileTransporterFactory.class);
locator.addService(TransporterFactory.class,
HttpTransporterFactory.class);
locator.addService(TransporterFactory.class,
WagonTransporterFactory.class);
return locator;
}

private static Constructor modelResolverCtor()
throws ClassNotFoundException, NoSuchMethodException {
@SuppressWarnings("unchecked") Class modelResolverClass =
(Class)
Class.forName("org.apache.maven.repository.internal.DefaultModelResolver");
Constructor c =
modelResolverClass.getDeclaredConstructor(RepositorySystemSession.class,
RequestTrace.class,
String.class, ArtifactResolver.class,
VersionRangeResolver.class, RemoteRepositoryManager.class,
List.class);
c.setAccessible(true);
return c;
}

private static File downloadPOM(String pomURL, HttpClient client)
throws Exception {
HttpGet request = new HttpGet(pomURL);
HttpResponse response = client.execute(request);
File outputFile = new File("target/" + Paths.get(new
URI(pomURL).getPath()).getFileName().toString());
try (InputStream contentStream = response.getEntity().getContent()) {
Files.copy(contentStream, outputFile.toPath(),
StandardCopyOption.REPLACE_EXISTING);
}
return outputFile;
}

Here are the dependencies I’m using:


org.apache.maven
maven-resolver-provider
3.6.0


org.apache.maven.resolver
maven-resolver-connector-basic
1.3.3


org.apache.maven.resolver
maven-resolver-transport-file
1.3.3


org.apache.maven.resolver
maven-resolver-transport-http
1.3.3


org.apache.maven.resolver
maven-resolver-transport-wagon
1.3.3


This works fine but the ModelResolver is package-private and I have to
reflect my way to get to it. My code can break on updates.

It seems I'm not using these libraries as intended. There isn't much
information by way of docs etc.

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

Re: [VOTE] Release Apache Maven Version 3.6.1

2019-04-07 Thread Karl Heinz Marbaise

Hi,

here is my +1

tested with several local projects ...with company projects...

Kind regards
Karl Heinz Marbaise


n 04.04.19 21:55, Karl Heinz Marbaise wrote:

Hi,

We have solved 42 issues:
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12316922=12338966


There are issues left in JIRA for Maven core:
https://issues.apache.org/jira/issues/?jql=project%20%3D%20MNG%20AND%20resolution%20%3D%20Unresolved%20ORDER%20BY%20key%20DESC%2C%20priority%20DESC%2C%20updated%20DESC


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

The distributable binaries and sources can be found here:
https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/


Specifically the zip, tarball and source archives can be found here:

https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip

https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.tar.gz


https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-src.zip

https://repository.apache.org/content/repositories/maven-1496/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-src.tar.gz


The release artifacts are staged for distribution in:
https://dist.apache.org/repos/dist/dev/maven/maven-3/3.6.0

Source release checksum(s):
apache-maven-3.6.1-src.tar.gz

   sha1: 4e87c962ed505a0158085f99d92a0ade8c7fd197
sha512:
11a31022cffa0518584703fffd9fce998332ac5f6c2a50db3b590e90f3bdd1508d9e0cb5ba89a699ef6536b237bcc96166cfde3d45bce6346fa21b05b4d12bf8


apache-maven-3.6.1-src.zip:

   sha1: ec0618f981f9367f133a29fbfcaa8e073cb8ac85
sha512:
b92d8ed72585c4e05debe4d15eb9ae5dd72e814b6413bcba78d01282c9eccc38e79755654e0d0b4e5a650f0226c116a4a4faad731918a465ad424a2a81582a67


Git tag:
https://gitbox.apache.org/repos/asf?p=maven.git;a=commit;h=d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555


Staging site:
https://maven.apache.org/components/ref/3-LATEST/

Vote open for 72 hours.

[ ] +1
[ ] +0
[ ] -1

Kind regards
Karl Heinz Marbaise


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



Re: Accessing a maven repository programatically (in 2019)

2019-04-07 Thread Hervé BOUTEMY
with corresponding site published at
https://maven.apache.org/resolver/maven-resolver-demos/

and don't hesitate to provide PRs to improve Maven Resolver introduction or 
documentation
https://maven.apache.org/resolver/index.html

Regards,

Hervé

Le dimanche 7 avril 2019, 11:23:39 CEST Olivier Lamy a écrit :
> Hi
> You will find plenty of examples of how to use maven-resolver here
> https://github.com/apache/maven-resolver/tree/master/maven-resolver-demos/ma
> ven-resolver-demo-snippets/src/main/java/org/apache/maven/resolver/examples
> 
> HTH
> Olivier
> 
> On Sat, 6 Apr 2019 at 23:07, Michael Lipp  wrote:
> > Hi,
> > 
> > I've spent considerable time on researching this, but to no avail. The
> > closest answer that I have found was on Stackoverflow
> > (
> > https://stackoverflow.com/questions/11674537/retrieving-maven-artifact-fro
> > m-repository-using-maven-java-api ).
> > But it points me to Eclipse Aether, which has been archived, so it seems
> > out-dated and not the way to go.
> > 
> > I also found the "Aether re-integration page"
> > (http://maven.apache.org/aether.html) and had a look at "Maven Resolver
> > Provider"
> > (
> > https://maven.apache.org/ref/3.6.0/maven-resolver-provider/apidocs/index.h
> > tml?org/apache/maven/repository/internal/MavenRepositorySystemUtils.html
> > ),
> > the "resurrected Aether". What irritates me, however, is that there
> > doesn't seem to be any connection between the "Maven Resolver Provider"
> > and the main part of the API. So I wonder if this is just some
> > "left-over".
> > 
> > Considering the "main parts" of the Maven API, I think I should be able
> > to start things by creating a LocalArtifactRepository
> > (https://maven.apache.org/ref/3.6.0/apidocs/index.html), but this is, of
> > course, not possible, it's abstract. The concrete subclass
> > UserLocalArtifactRepository isn't of much help, it requires a repository
> > as constructor argument.
> > 
> > All other classes that implement "ArtifactRepository" are deprecated.
> > Which is a pity, because something like "DefaultArtifactRepository"
> > looks exactly like what I need. But I'm hesitant to start a new project
> > centering around a deprecated class.
> > 
> > So, I'm at loss. All I want to do is retrieve some artifacts and their
> > POMs from a remote repository, using the ~/.m2/repository as cache, as
> > usual. The ArtifactRepository interface
> > (https://maven.apache.org/ref/3.6.0/apidocs/index.html) seems perfect
> > for this. How can I get an object that implements it?
> > 
> > Thanks!
> > 
> >  - Michael
> > 
> > -
> > 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: Accessing a maven repository programatically (in 2019)

2019-04-07 Thread Olivier Lamy
Hi
You will find plenty of examples of how to use maven-resolver here
https://github.com/apache/maven-resolver/tree/master/maven-resolver-demos/maven-resolver-demo-snippets/src/main/java/org/apache/maven/resolver/examples

HTH
Olivier

On Sat, 6 Apr 2019 at 23:07, Michael Lipp  wrote:

> Hi,
>
> I've spent considerable time on researching this, but to no avail. The
> closest answer that I have found was on Stackoverflow
> (
> https://stackoverflow.com/questions/11674537/retrieving-maven-artifact-from-repository-using-maven-java-api
> ).
> But it points me to Eclipse Aether, which has been archived, so it seems
> out-dated and not the way to go.
>
> I also found the "Aether re-integration page"
> (http://maven.apache.org/aether.html) and had a look at "Maven Resolver
> Provider"
> (
> https://maven.apache.org/ref/3.6.0/maven-resolver-provider/apidocs/index.html?org/apache/maven/repository/internal/MavenRepositorySystemUtils.html
> ),
> the "resurrected Aether". What irritates me, however, is that there
> doesn't seem to be any connection between the "Maven Resolver Provider"
> and the main part of the API. So I wonder if this is just some "left-over".
>
> Considering the "main parts" of the Maven API, I think I should be able
> to start things by creating a LocalArtifactRepository
> (https://maven.apache.org/ref/3.6.0/apidocs/index.html), but this is, of
> course, not possible, it's abstract. The concrete subclass
> UserLocalArtifactRepository isn't of much help, it requires a repository
> as constructor argument.
>
> All other classes that implement "ArtifactRepository" are deprecated.
> Which is a pity, because something like "DefaultArtifactRepository"
> looks exactly like what I need. But I'm hesitant to start a new project
> centering around a deprecated class.
>
> So, I'm at loss. All I want to do is retrieve some artifacts and their
> POMs from a remote repository, using the ~/.m2/repository as cache, as
> usual. The ArtifactRepository interface
> (https://maven.apache.org/ref/3.6.0/apidocs/index.html) seems perfect
> for this. How can I get an object that implements it?
>
> Thanks!
>
>  - Michael
>
>
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>

-- 
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy


Re: [VOTE] Release Apache Maven Version 3.6.1

2019-04-07 Thread Dan Tran
+1 ( non-binding)

Tested with a large multi-modules build using CI/CD mode + m2e under takari
team

Thanks

-D

On Sat, Apr 6, 2019 at 9:29 AM Mickael Istria  wrote:

> Hi,
>
> Unfortunately, we won't have the opportunity to try it in m2e before the
> deadline for voting as it seems like some recent changes would require
> adaptation in m2e (or it's some other bug in m2e that needs to be fixed
> before we can try this 3.6.1 RC).
> https://git.eclipse.org/r/#/c/133590/ shows the tentative change and links
> to the current build/test failures if someone is interested in giving a
> hand ;)
>
> Cheers,
>


Re: looking for some volunteer

2019-04-07 Thread Tibor Digana
Hi Dejan,

I almost forgot your email.
Pls create a PR on GitHub with a little work even if still incomplete but
at least we would not forget it.
As you can see in [1] we should create release branches and for your PR as
well.
[1]: https://github.com/apache/maven-surefire/pull/227

Cheers
Tibor


On Tue, Mar 26, 2019 at 9:24 AM Dejan Stojadinovic 
wrote:

> Thanx Tibor, I left short comments on JIRA issues (just to mark them).
>  I hope I will squeeze first github PR in a few days.
>
> Regards,
> Dejan
>
> On 2019/03/24 23:19:08, Tibor Digana  wrote:
> > Hi Dejan,
> >
> > Good to hear. In our Jira are two issues related to my original email:
> > https://issues.apache.org/jira/browse/SUREFIRE-1654
> > https://issues.apache.org/jira/browse/SUREFIRE-1494
> > If you have any questions, feel free to ask here.
> > Pls run the build locally (mvn -P run-its install) until our TravisCI
> build
> > would be ready for you. The build takes cca 1 hour to complete.
> > We should solve these two issue in two separate pull requests.
> > I guess these tasks require very good preparation and analysis of ITs
> > before making any changes.
> >
> > @Enrico can you pls investigate TravisCI, why it still behaves so much
> > differently from Jenkins CI and fails?
> > Is it really due to the deployed SNAPSHOT versions at ASF Nexus?
> >
> > Thx
> >
> > Cheers
> > Tibor
> >
> >
> > On Sun, Mar 24, 2019 at 3:23 PM Dejan Stojadinovic 
> > wrote:
> >
> > > Hi Tibor,
> > >
> > > I volunteer for this. I have a solid experience with maven usage and
> also
> > > contributed few (easy) maven commits:
> > > https://github.com/apache/maven/commits?author=dejan2609
> > >
> > > Regards,
> > > Dejan Stojadinović
> > >
> > > On 2019/03/23 21:47:04, Tibor Digana  wrote:
> > > > It's going to be very pedant work for someone who want to help us in
> > > > Surefire.
> > > >
> > > > I am looking for some volunteer who will remove the deprecated config
> > > param
> > > > `forkMode` in favor of `forkCount`. All our ITs should use
> `forkCount`
> > > > since then.
> > > >
> > > > Additionally, the volunteer should deprecate `surefire-junit4`
> provider.
> > > > Instead `surefire-junit47` provider should be selected as default
> > > provider
> > > > for JUnit4 tests. Again the ITs should be changed and plugin
> dependencies
> > > > should use `surefire-junit4` provider in place where it was not
> > > specified.
> > > >
> > > > It's easy to do. When you see the usages of `.forkMode()` method -
> only
> > > 20
> > > > in `surefire-its` and 43 usages of `` in
> > > > `surefire-its/src/test/resources`.
> > > >
> > > > Successful build must prove that the changes have been applied
> correctly.
> > > > The changes should be in a pull request on GitHub.
> > > >
> > > > Cheers
> > > > Tibor
> > > >
> > >
> > > -
> > > 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
>
>