Commit Graph

2613 Commits

Author SHA1 Message Date
Karl Heinz Marbaise 5a462344f9 [MNG-6014] Removing ArtifactHandler for ejb3
o Followup to MNG-5894 of Maven 3.3.9 where the maven-ejb3-plugin
   has been removed from life cycle.
 o Removed the ArtifactHandler for ejb3 cause without
   a bound life cycle it does not make sense.
 o Removed entry from artifact-handlers.apt site.
2017-01-30 09:20:07 +01:00
Karl Heinz Marbaise 4604c49ee4 [MNG-6092] warn if prerequisites.maven is used for non-plugin projects 2017-01-29 21:16:35 +01:00
Karl Heinz Marbaise 017dcaf22a [MNG-5993] Confusing error message in case of missing/empty
artifactId/groupId and version in pluginManagement
2017-01-29 21:12:49 +01:00
Guillaume Boué 5b4b8bd94c [MNG-6105] properties.internal.SystemProperties.addSystemProperties() is not really thread-safe
Refactoring the current code setting system properties to synchronize correctly on the given ones: avoids ConcurrentModificationException and NullPointerException if the properties is modified by another thread.
2017-01-28 14:07:59 +01:00
Christian Schulte 1e2a80eced [MNG-5883] Silence unnecessary legacy local repository warning
o Updated to decrease logging level from 'warning' to 'info'.
2017-01-26 20:30:37 +01:00
Stuart McCulloch 6b31c4a556 [MNG-5958] restore binary compatibility of Lifecycle.setPhases
While MNG-5805 restored binary compatibility of Lifecycle.getPhases
it didn't do the same for Lifecycle.setPhases. This breaks plugins
like flexmojos-maven-plugin which have their own lifecycle mapping
implementations.

This closes #77
2017-01-26 20:19:57 +01:00
Karl Heinz Marbaise f20a5d940b [MNG-5931] Fixing documentation
Removing references to ejb3-lifecycle and par-lifecycle
cause they have been removed with Maven 3.3.9.
2017-01-25 21:30:02 +01:00
Hervé Boutemy 512fa6a45b improved documentation 2017-01-25 00:07:55 +01:00
Hervé Boutemy 0b684af45e added core extensions documentation 2017-01-25 00:04:31 +01:00
Hervé Boutemy 84085c0a9c updated urls (https, plexus) and license header formatting 2017-01-24 23:50:10 +01:00
Karl Heinz Marbaise bc07e74d3c [MNG-6017] Removing ArtifactHandler for par LifeCycle
o Removed ArtifactHandler configuration for par lifeclyce
   which has been removed in Maven 3.3.9
   See MNG-5892
2017-01-24 20:21:55 +01:00
Karl Heinz Marbaise cfb075ac70 [MNG-6030] ReactorModelCache do not used effectively after maven version 3.0.5 which cause a large memory footprint
o Reintroduced ReactorModelCache reduces the memory footprint.
2017-01-24 20:19:10 +01:00
Hervé Boutemy b80915b882 [MNG-3507] added color to Maven execution output messages 2017-01-24 18:40:07 +01:00
Michael Osipov be5caccaff [MNG-6102] Introduce ${maven.conf} in m2.conf
Set maven.conf to default ${maven.home}/conf in ${maven.home}/bin/m2.conf
to have a canonical property pointing to global configuration files from
within Java code.

This also helps package maintainers to decouple the Maven installation
from a global configuration by solely modifying m2.conf instead of using
dirty hacks, if possible at all.
2017-01-23 20:54:54 +01:00
Michael Osipov 8373c79a47 [MNG-6138] Remove obsolete message_*.properties form maven-core 2017-01-22 21:37:57 +01:00
Guillaume Boué d413296cf3 [MNG-6117] ${session.parallel} not correctly set
MultiThreadedBuilder must set parallel to true when it's using more than
1 thread to build: i.e. a degree of concurrency greater than 1 (-T) and
more than 1 project to build. Since each ProjectSegment works on a
cloned session instance (see
BuildListCalculator#calculateProjectBuilds), the flag must be also set
on each cloned session.
2017-01-16 20:29:49 +01:00
Karl Heinz Marbaise 4497e2bb1e [MNG-5898] Multi-module build with ear fails to resolve war in 3.3.3
Added types of packaging which can used as dependencies in a
multi module build.
2015-10-21 00:36:04 +02:00
Karl Heinz Marbaise 20854ce7be Revert "[MNG-5898] Multi-module build with ear fails to resolve war in 3.3.3"
This reverts commits f3a3ef2 b9cc9c3 72e2478 all related to MNG-5898
2015-10-18 16:14:13 +02:00
Karl Heinz Marbaise f3a3ef2632 [MNG-5898] Multi-module build with ear fails to resolve war in 3.3.3
Followup to fix core IT's.
2015-10-16 20:27:23 +02:00
Michael Osipov 618e62dd33 [MNG-5649] Use Commons Lang's Validate to intercept invalid input
Use wherever possible Validate with consistent messages and exceptions.
2015-10-16 17:32:57 +02:00
Karl Heinz Marbaise b9cc9c3652 [MNG-5898] Multi-module build with ear fails to resolve war in 3.3.3
Followup to fix core IT's.
2015-10-16 17:25:00 +02:00
Karl Heinz Marbaise 72e2478ec5 [MNG-5898] Multi-module build with ear fails to resolve war in 3.3.3 2015-10-16 15:38:24 +02:00
Robert Scholte c8a200a725 Revert "[MNG-5901] Export org.eclipse.aether.util.artifact.SubArtifact"
This reverts commit 89058b3ac8.
2015-10-04 19:39:01 +02:00
Robert Scholte 89058b3ac8 [MNG-5901] Export org.eclipse.aether.util.artifact.SubArtifact 2015-10-04 14:40:35 +02:00
Arnaud Héritier dfed29cc66 MNG-5787,MNG-5842,MNG-5845: Add missing org.slf4j.helpers.* export which is provided slf4j-api
It broke various plugins with missing classes ( org.slf4j.helpers.MarkerIgnoringBase, org.slf4j.helpers.MessageFormatter ) like:
* net.java.truelicense:truelicense-maven-plugin (2.3.4)
* com.github.eirslett:frontend-maven-plugin (0.0.20, 0.0.22)
* maven-antrun-plugin with the cobertura ant task
* org.mortbay.jetty:jetty-maven-plugin (7.6.16.v20140903)
2015-10-04 14:21:56 +02:00
Karl Heinz Marbaise 2a9a07b0a1 [MNG-5894] Removed binding for maven-ejb3-plugin from default binding 2015-09-26 20:39:10 +02:00
Karl Heinz Marbaise b03062d2a0 [MNG-5893] Make used plugin version for maven-resources-plugin in
default-bindings.xml consistent
Using version 2.6 for ear binding as in the other bindings.
2015-09-26 20:02:32 +02:00
Karl Heinz Marbaise cb037ca262 [MNG-5892] Removing par lifecycle from default life cycle bindings 2015-09-26 19:50:42 +02:00
Hervé Boutemy 2669980461 [MNG-5887] updated Modello site url 2015-09-14 19:52:21 +02:00
Anton Tanasenko 9f7971dadb MNG-5805: Fix NPE in LifecyclePhase#toString()
Signed-off-by: Jason van Zyl <jason@tesla.io>

closes #62
2015-09-11 18:36:02 -04:00
Anton Tanasenko 3677220f6e MNG-5805: Restore binary compatibility
Signed-off-by: Jason van Zyl <jason@tesla.io>
2015-07-20 13:54:53 -04:00
Karl Heinz Marbaise 15223116a6 Fixed URL's to issue tracking after transition to
Apache Software Foundation.
2015-07-19 09:53:50 +02:00
Kristian Rosenvold cfd1fbe613 More java7. Bye bye 2006 2015-06-20 15:21:10 +02:00
sugartxy 7f206ef1cc try-with-resources
Reformatted to code style by me. This fixes #53
2015-06-20 14:32:46 +02:00
Kristian Rosenvold 7badeb5b5b Upgraded to java7 language features 2015-06-20 10:56:07 +02:00
Florencia Tarditti a0babcecae Fixed typo in error output
Signed-off-by: Karl-Heinz Marbaise <khmarbaise@apache.org>
2015-05-07 01:02:15 +02:00
Jason van Zyl 4567c8319e MNG-5818: Disallow the programmatic injection of project dependencies
The first step here is deprecating the publicly accessible method that allows
plugins to inject dependencies. The only plugin I currently know of that does
this is the cobertura-maven-plugin. Looking at that plugin it appears the user
can specify the cobertura dependency for the instrumentation process but if
they do not the plugin attempts to inject the dependency. I believe the path
forward here is making sure these types of plugins instruct their users to
add the dependency explicitly.

I'm going to try and create a call-graph for all of Maven Central with my
first test to see if I can accurately detect all usages of MavenProject.setDependencyArtifacts
of artifact in Maven Central.
2015-04-30 21:39:28 -04:00
Anton Tanasenko 1d148be82b MNG-5805: Custom packaging types: configuring DefaultLifecycleMapping mojo executions
Signed-off-by: Jason van Zyl <jason@tesla.io>
2015-04-27 17:28:37 -04:00
Jason van Zyl 6c53bbb293 Remove the use of more deprecated methods 2015-04-16 08:39:36 -04:00
Jason van Zyl 7d5ca3e5b3 Add another deprecated method 2015-04-16 08:39:35 -04:00
Jason van Zyl 56e6db1231 MNG-5795: Maven extensions can not be retrieved from authenticated repositories 2015-04-02 00:49:50 -04:00
Igor Fedorenko 9f50eabea5 MNG-5793 do not register same realm both with plugin and extensions realm caches
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2015-03-25 15:43:47 -04:00
Hervé Boutemy 4f553420c7 added @since info 2015-03-22 13:47:24 +01:00
Igor Fedorenko b7088a34ed MNG-5783 fixed slf4j is missing from ${plugin.artifacts}
Some plugins, e.g., cobertura-maven-plugin, use ${plugin.artifacts}
to setup classpath of externally launched jvms and they expect slf4j
to be available among plugin dependencies. At the same time slf4j
is already part of maven core runtime and it needs to be filtered
out from plugin and build extension realms to avoid duplicate classes
on classpath.

The fix is to move core artifact filtering from plugin dependency
resolver to class realm manager. This way ${plugin.artifacts} still
includes all compile/runtime scoped plugin dependencies but runtime
classpath only has plugin unique artifacts.

Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2015-03-10 10:07:29 -04:00
Hervé Boutemy ab5f3a9de7 added doculmentation about extension descriptor 2015-03-09 04:56:26 +01:00
Jason van Zyl 57a6196422 MNG-5779 Export org.slf4j.spi.* to fix the Javadoc plugin error 2015-03-05 00:40:45 -08:00
Hervé Boutemy 772df4ed2a [MNG-5778] s/3.2.6/3.3.0/ in code (@since in javadoc) 2015-03-05 08:42:23 +01:00
Hervé Boutemy eecdc9a171 reintroduced LineLength Checkstyle rule and fixed code... 2015-03-04 03:17:46 +01:00
Jason van Zyl be3fb20032 MNG-5775 Make the project graph building code pluggable to allow for new/different implementations. 2015-03-01 12:39:30 -08:00
Jason van Zyl 7997634209 MNG-5774 Provide an extension point for alternate CLI configuration source 2015-03-01 10:22:26 -08:00
Igor Fedorenko e28be4d33a MNG-5767 renamed projectBasedir to more descriptive multiModuleProjectDirectory
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2015-02-23 13:47:34 -05:00
Igor Fedorenko 6efacdb3fc MNG-5771 user-defined core extensions
read ${maven.projectBasedir}/.mvn/extensions.xml and create core
extensions realms during maven runtime bootstrap. this required
short-lived bootstrap plexus container to resolve extensions.

individual extensions realms are wired to maven.ext realm according
to META-INF/maven/extension.xml exported packages specification

Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2015-02-20 14:05:54 -05:00
Igor Fedorenko e2a0792840 exit session scope in finally {} block
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2015-02-20 10:26:15 -05:00
Igor Fedorenko 5f150940c1 extracted RepositorySystemSessionFactory from DefaultMaven
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2015-02-20 10:26:15 -05:00
Igor Fedorenko 586e65f381 added javax.inject and slf4j-api to the exported artifacts list
javax.inject.* and org.slf4j.* packages were already exported, but
corresponding artifacts were not. this resulted in same classes
present in multiple classlaoders and caused hard-to-troubleshoot
build failures in some cases.

Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2015-02-20 10:26:15 -05:00
Igor Fedorenko 8631d79ca3 MNG-5771 use extension.xml to define core exported artifacts and packages
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2015-02-20 10:26:14 -05:00
Igor Fedorenko 45563ff5cb mechanism to carryover session scope seeds from one thread to another
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2015-02-20 10:26:14 -05:00
Igor Fedorenko 8ed9a1caa8 MNG-5767 .mvn/ for project specific jvm options and maven parameters
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2015-02-20 08:14:08 -05:00
Igor Fedorenko ee7dbab69d MNG-5768 @execution-id syntax for direct plugin goal invocation
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2015-02-20 07:58:31 -05:00
Igor Fedorenko cd52e5b51e MNG-5766 consistently handle all throwables in LifecycleModuleBuilder
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2015-02-18 10:47:52 -05:00
Hervé Boutemy c28348024a improved javadoc 2015-02-15 20:56:54 +01:00
Jason van Zyl d52e5c4294 Allow munge to remove another deprecated method 2015-02-09 03:26:29 -05:00
Jason van Zyl 103f6418cf Experimenting with Munge to chop out deprecated code for a Maven 4.x codebase
I will try and collect all deprecated code at the bottom of classes with Munge markers and
use this in conjunction with a definitive list of classes to be purged in order to use
one code line to safely experiment with Maven 4.x.
2015-02-09 02:28:35 -05:00
Jason van Zyl d6e9226b60 No longer need the settings decrypter 2015-02-09 01:55:07 -05:00
Jason van Zyl dd5eb31a08 Fold back into MavenRepositorySystem and work from there to clean up all references to the legacy system and Settings. 2015-02-09 01:44:32 -05:00
Jason van Zyl 2d34e67eed First pass at cleaning up MavenExecutionRequestPopulator and its use.
Push MavenExecutionRequestPopulator down to only operate in the MavenCli. Two of the three methods were already called from MavenCli so now all of them are. In the process I deleted a bunch of code and pursue my quest to remove Settings from the core in order to make a general configuration mechanism that can be plugged into the core via the MavenCli.

Also removed the requirement of the LegacyRepositorySystem in the DefaultMavenExecutionRequestPopulator which breaks another tie with the legacy code. I took the bits that were needed and a lot of the code, after tracing through it, is redundant so it has been deleted.

Turning off:

injectMirror( request, request.getRemoteRepositories(), request.getMirrors() );
injectMirror( request, request.getPluginArtifactRepositories(), request.getMirrors() );

in DefaultMavenExecutionRequestPopulator

Results :

Failed tests:
  MavenITmng4190MirrorRepoMergingTest>AbstractMavenIntegrationTestCase.runTest:220->testit:76 null expected:<[1]> but was:<[4]>

Tests in error:
  MavenITmng4991NonProxyHostsTest>AbstractMavenIntegrationTestCase.runTest:220->testit:89 » Verification
  MavenITmng4963ParentResolutionFromMirrorTest>AbstractMavenIntegrationTestCase.runTest:220->testit:58 » Verification

There is mirror evaluation code in DefaultMaven:newRepositorySession( MavenExecutionRequest request ) which appears to
duplicate this logic but not quite enough for the ITs to pass.

---

Turning off:

injectProxy( request.getRemoteRepositories(), request.getProxies() );
injectProxy( request.getPluginArtifactRepositories(), request.getProxies() );

in

DefaultMavenExecutionRequestPopulator

Result:

The ITs pass

So the code is not needed so it has been deleted.

---

Turning off:

injectProxy( request.getRemoteRepositories(), request.getProxies() );
injectProxy( request.getPluginArtifactRepositories(), request.getProxies() );
injectAuthentication( request.getRemoteRepositories(), request.getServers() );
injectAuthentication( request.getPluginArtifactRepositories(), request.getServers() );

in

DefaultMavenExecutionRequestPopulator

Result:

The ITs pass

The code in DefaultMaven:newRepositorySession( MavenExecutionRequest request ) appears to populate proxies and authentication correctly. The injectAuthentication code has been deleted.

---

This is also perfunctory in DefaultMavenExecutionRequestPopulator after tracing through it:

request.setRemoteRepositories( getEffectiveRepositories( request, request.getRemoteRepositories() ) );
request.setPluginArtifactRepositories( getEffectiveRepositories( request, request.getPluginArtifactRepositories() ) );
2015-02-08 22:26:48 -05:00
Igor Fedorenko d745f8c475 MNG-5762 populate plugin repositories in ExecutionRequestPopulator
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2015-02-04 22:26:16 -05:00
Robert Scholte 4b263106db [MNG-5755] Access toolchains without maven-toolchain-plugin
Added List<Toolchain> getToolchains( MavenSession session, String type, Map<String, String> requirements ) to ToolchainManager
2015-01-18 16:53:56 +01:00
Robert Scholte b6ae8ef8ab [MNG-5754] Toolchains should be read during initialization
DefaultToolchainManagerPrivate now uses toolchains from MavenExecutionRequest
2015-01-17 17:24:00 +01:00
Robert Scholte f75008743b [MNG-5754] Toolchains should be read during initialization
MavenExecutionRequest has been extended with toolchains, which is filled by MavenCli
Interfaces have been extended with new methods, assuming only Maven provides implementations
2015-01-17 15:45:53 +01:00
Robert Scholte 99f763decd Add junit tests for DefaultToolchainsBuilder and ToolchainsBuildingException 2015-01-16 13:24:57 +01:00
Jason van Zyl 36d491a648 MNG-5753: Allow plugin implementors to choose how they want the configuration created for a particular MojoExecution 2015-01-15 15:16:59 -05:00
Robert Scholte 32053c99d7 Add junittests for DefaultToolchain
Implement toString() for better log messages
2015-01-12 23:23:31 +01:00
Robert Scholte 3e133902fb Additional unittests for DefaultToolchainManagerPrivate
Remove unnecessary null checks for Lists
Improve javadoc
2015-01-11 22:02:14 +01:00
Robert Scholte 2d0ec94269 [MNG-5716] Add unittests for DefaultToolchainManagerPrivate 2015-01-10 22:58:24 +01:00
Igor Fedorenko bb4988496a better plugin/extensions realm parent classloader
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2015-01-08 08:08:47 -05:00
Tibor17 3a6f63345c [MNG-5702] Final Fields on DefaultMavenExecutionResult.java 2015-01-02 20:20:26 +01:00
Tibor17 4d33358be2 [MNG-5702] Final Fields on DefaultMavenExecutionResult.java 2015-01-02 20:01:20 +01:00
Karl Heinz Marbaise 6f0318ed68 [MNG-5702] Wrong reactor summary output while using -T option
Fixed checkstyle reported errors.
2014-12-31 11:34:27 +01:00
Karl Heinz Marbaise cb91332d3d [MNG-5702] Wrong reactor summary output while using -T option
Changing into a better solution which doesn't change the
 implemented type of Map but use a synchronized one.
2014-12-31 11:25:55 +01:00
Karl Heinz Marbaise 3b671d0734 [MNG-5702] Wrong reactor summary output while using -T option
Fixed by using ConcurrentMap instead non synchronized ones.
2014-12-29 14:33:47 +01:00
Igor Fedorenko 6ab41ee8d3 MNG-5742 fixed null ComponentDescriptor#realm for extensions plugins
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2014-12-26 13:27:51 -05:00
Hervé Boutemy c239f6ea6f [MNG-5748] keep builderId on copy 2014-12-26 17:24:39 +01:00
Hervé Boutemy 328a777cd5 [MNG-5747] keep useLegacyLocalRepositoryManager on copy 2014-12-26 17:19:40 +01:00
Igor Fedorenko 1420d61c05 MNG-5742 fixed duplicate plugin realms when extensions=true
Consolidated plugin realm setup logic in DefaultMavenPluginManager.
Extensions realm is fully setup during project loading and the same
realm is used to both load extensions and execute plugin goals now.

Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2014-12-25 13:31:29 -05:00
Robert Scholte dbecf3b5cd Rename package so it has same structure as settings and model 2014-12-25 15:55:13 +01:00
Robert Scholte ceae922653 [MNG-3891] Modify maven-toolchain to look in ${maven.home}/conf/toolchains.xml and in ${user.home}/.m2/toolchains.xml
Also added new cmdline option: -gt / --global-toolchains
2014-12-25 14:55:02 +01:00
Hervé Boutemy 0252eb2a1f updated unit test 2014-12-13 18:09:45 +01:00
Hervé Boutemy 61f1d01ba8 since this class is new, immediately mark it package protected: it is
the implementation of JavaToolchain interface (even if the interface is
empty at the moment)
2014-12-13 17:52:31 +01:00
Hervé Boutemy 6f1bc80f3e added a notice about internal API 2014-12-13 15:18:31 +01:00
Igor Fedorenko d6e45a5d56 MNG-5719 reintroduced DefaultJavaToolChain
DefaultJavaToolChain was the only way to access JDK toolchain
javaHome parameter and was used by some clients, notably Tycho.
The class is now marked as deprecated and clients are adviced to
use JavaToolchainImpl instead.

Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2014-12-13 08:42:07 -05:00
Igor Fedorenko 369889296e introduced RepositorySessionDecorator
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2014-11-25 19:11:00 -05:00
Igor Fedorenko c15226f13f decoupled project #file and #basedir to allow pom.xml processing
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2014-11-25 19:11:00 -05:00
Igor Fedorenko 8643e00993 introduced ProjectArtifactFactory component
this hides use of deprecated/legacy ArtifactFactory and allows custom
project dependency artifact creation logic.

Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2014-11-25 19:11:00 -05:00
Igor Fedorenko ce6f0bfdb5 MNG-5727 fixed cryptic exception when managed depenency has no <version>
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
2014-11-25 19:11:00 -05:00
Robert Scholte 5c84bd33ba [MNG-5714] Add Merger for Maven Toolchain 2014-11-25 22:40:18 +01:00
Michael Osipov 0343c52601 Trimmed trailing whitespace 2014-11-23 13:04:30 +01:00
Hervé Boutemy b1b80f61a4 improved explanations 2014-11-15 02:50:38 +01:00
Hervé Boutemy e661aa87f5 improved javadoc and Java toolchain implementation class name (not a
Plexus component, then DefaultComponentName convention doesn't apply)
2014-11-08 22:43:09 +01:00
Hervé Boutemy 36d746789d make algo more visible 2014-11-08 21:53:16 +01:00