mirror of https://github.com/apache/maven.git
[MNG-6146] Several small stylistic and spelling improvements to code and documentation
Spelling fixes: * system * tokenizer * toolchain * trailing * transitive * unsupported * version * artifact * attachment * codehaus * colleagues * comparison * concurrency * configure * creation * dependency * descriptor * downstream * efficient * e.g. * elements * encountered * encounters * environments * executed * explicitly * happens * hierarchical * hierarchy * ignore * implemented * implementers * independence * indicates * inheritance * inherited * inherits * install * interface * javascript * laziness * management * maven * metadata * mgmt * minimalist * nonexistent * objects * overridden * print * project * properties * recessive * referring * repository * representation * retrieval * retrieve * rigorous * should * spontaneously * subsequent Literal fixes: * use static final values Style fixes: * use the proper term for char U+002D (-) hyphen(-minus) instead of dash This closes #100
This commit is contained in:
parent
bd57ec9666
commit
1740265984
|
@ -39,7 +39,7 @@
|
||||||
Installing Maven
|
Installing Maven
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
1) Unpack the archive where you would like to store the binaries, eg:
|
1) Unpack the archive where you would like to store the binaries, e.g.:
|
||||||
|
|
||||||
Unix-based operating systems (Linux, Solaris and Mac OS X)
|
Unix-based operating systems (Linux, Solaris and Mac OS X)
|
||||||
tar zxvf apache-maven-3.x.y.tar.gz
|
tar zxvf apache-maven-3.x.y.tar.gz
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
|
|
||||||
2) A directory called "apache-maven-3.x.y" will be created.
|
2) A directory called "apache-maven-3.x.y" will be created.
|
||||||
|
|
||||||
3) Add the bin directory to your PATH, eg:
|
3) Add the bin directory to your PATH, e.g.:
|
||||||
|
|
||||||
Unix-based operating systems (Linux, Solaris and Mac OS X)
|
Unix-based operating systems (Linux, Solaris and Mac OS X)
|
||||||
export PATH=/usr/local/apache-maven-3.x.y/bin:$PATH
|
export PATH=/usr/local/apache-maven-3.x.y/bin:$PATH
|
||||||
|
|
|
@ -22,7 +22,7 @@ package org.apache.maven.artifact.resolver;
|
||||||
import org.apache.maven.artifact.Artifact;
|
import org.apache.maven.artifact.Artifact;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indiciates a cycle in the dependency graph.
|
* Indicates a cycle in the dependency graph.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
|
* @author <a href="mailto:brett@apache.org">Brett Porter</a>
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -33,7 +33,7 @@ import java.util.Stack;
|
||||||
*
|
*
|
||||||
* <p>Features:
|
* <p>Features:
|
||||||
* <ul>
|
* <ul>
|
||||||
* <li>mixing of '<code>-</code>' (dash) and '<code>.</code>' (dot) separators,</li>
|
* <li>mixing of '<code>-</code>' (hyphen) and '<code>.</code>' (dot) separators,</li>
|
||||||
* <li>transition between characters and digits also constitutes a separator:
|
* <li>transition between characters and digits also constitutes a separator:
|
||||||
* <code>1.0alpha1 => [1, 0, alpha, 1]</code></li>
|
* <code>1.0alpha1 => [1, 0, alpha, 1]</code></li>
|
||||||
* <li>unlimited number of version components,</li>
|
* <li>unlimited number of version components,</li>
|
||||||
|
@ -50,7 +50,7 @@ import java.util.Stack;
|
||||||
* </ul>
|
* </ul>
|
||||||
* Unknown qualifiers are considered after known qualifiers, with lexical order (always case insensitive),
|
* Unknown qualifiers are considered after known qualifiers, with lexical order (always case insensitive),
|
||||||
* </li>
|
* </li>
|
||||||
* <li>a dash usually precedes a qualifier, and is always less important than something preceded with a dot.</li>
|
* <li>a hyphen usually precedes a qualifier, and is always less important than something preceded with a dot.</li>
|
||||||
* </ul></p>
|
* </ul></p>
|
||||||
*
|
*
|
||||||
* @see <a href="https://cwiki.apache.org/confluence/display/MAVENOLD/Versioning">"Versioning" on Maven Wiki</a>
|
* @see <a href="https://cwiki.apache.org/confluence/display/MAVENOLD/Versioning">"Versioning" on Maven Wiki</a>
|
||||||
|
|
|
@ -180,7 +180,7 @@ public class DefaultArtifactVersion
|
||||||
fallback = Pattern.compile( "\\d+" ).matcher( qualifier ).matches();
|
fallback = Pattern.compile( "\\d+" ).matcher( qualifier ).matches();
|
||||||
}
|
}
|
||||||
|
|
||||||
// string tokenzier won't detect these and ignores them
|
// string tokenizer won't detect these and ignores them
|
||||||
if ( part1.contains( ".." ) || part1.startsWith( "." ) || part1.endsWith( "." ) )
|
if ( part1.contains( ".." ) || part1.startsWith( "." ) || part1.endsWith( "." ) )
|
||||||
{
|
{
|
||||||
fallback = true;
|
fallback = true;
|
||||||
|
|
|
@ -34,7 +34,7 @@ under the License.
|
||||||
<description>Maven2 classes maintained as compatibility layer.</description>
|
<description>Maven2 classes maintained as compatibility layer.</description>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<checkstyle.failOnViolation>false</checkstyle.failOnViolation><!-- lazyness for code that will disappear in future... -->
|
<checkstyle.failOnViolation>false</checkstyle.failOnViolation><!-- laziness for code that will disappear in future... -->
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|
|
@ -40,7 +40,7 @@ public interface ArtifactInstaller
|
||||||
* @param artifact the artifact definition
|
* @param artifact the artifact definition
|
||||||
* @param localRepository the local repository to install into
|
* @param localRepository the local repository to install into
|
||||||
* @throws ArtifactInstallationException if an error occurred installing the artifact
|
* @throws ArtifactInstallationException if an error occurred installing the artifact
|
||||||
* @deprecated to be removed before 2.0 after the instlal/deploy plugins use the alternate
|
* @deprecated to be removed before 2.0 after the install/deploy plugins use the alternate
|
||||||
* method
|
* method
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
|
|
|
@ -24,7 +24,7 @@ import org.apache.maven.artifact.Artifact;
|
||||||
/**
|
/**
|
||||||
* Do not use!
|
* Do not use!
|
||||||
* <p/>
|
* <p/>
|
||||||
* Should only be implmemented by DebugResolutionListener. Remove this
|
* Should only be implemented by DebugResolutionListener. Remove this
|
||||||
* when the ResolutionListener interface deprecation of the manageArtifact
|
* when the ResolutionListener interface deprecation of the manageArtifact
|
||||||
* method (and the [yet to be done] addition of these methods to that
|
* method (and the [yet to be done] addition of these methods to that
|
||||||
* interface) has had a chance to propagate to all interested plugins.
|
* interface) has had a chance to propagate to all interested plugins.
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class DefaultProfileManager
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated without passing in the system properties, the SystemPropertiesProfileActivator will not work
|
* @deprecated without passing in the system properties, the SystemPropertiesProfileActivator will not work
|
||||||
* correctly in embedded envirnments.
|
* correctly in embedded environments.
|
||||||
*/
|
*/
|
||||||
public DefaultProfileManager( PlexusContainer container )
|
public DefaultProfileManager( PlexusContainer container )
|
||||||
{
|
{
|
||||||
|
|
|
@ -230,7 +230,7 @@ public class DefaultModelInheritanceAssembler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
assembleDistributionInheritence( child, parent, childPathAdjustment, appendPaths );
|
assembleDistributionInheritance( child, parent, childPathAdjustment, appendPaths );
|
||||||
|
|
||||||
// issueManagement
|
// issueManagement
|
||||||
if ( child.getIssueManagement() == null )
|
if ( child.getIssueManagement() == null )
|
||||||
|
@ -569,7 +569,7 @@ public class DefaultModelInheritanceAssembler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void assembleDistributionInheritence( Model child, Model parent, String childPathAdjustment,
|
private void assembleDistributionInheritance( Model child, Model parent, String childPathAdjustment,
|
||||||
boolean appendPaths )
|
boolean appendPaths )
|
||||||
{
|
{
|
||||||
if ( parent.getDistributionManagement() != null )
|
if ( parent.getDistributionManagement() != null )
|
||||||
|
|
|
@ -35,7 +35,7 @@ public interface ModelInheritanceAssembler
|
||||||
|
|
||||||
void assembleModelInheritance( Model child, Model parent );
|
void assembleModelInheritance( Model child, Model parent );
|
||||||
|
|
||||||
void assembleBuildInheritance( Build childBuild, Build parentBuild, boolean handleAsInheriance );
|
void assembleBuildInheritance( Build childBuild, Build parentBuild, boolean handleAsInheritance );
|
||||||
|
|
||||||
void copyModel( Model dest, Model source );
|
void copyModel( Model dest, Model source );
|
||||||
}
|
}
|
||||||
|
|
|
@ -477,7 +477,7 @@ public class DefaultLegacyArtifactCollector
|
||||||
manageArtifact( child, managedVersions, listeners );
|
manageArtifact( child, managedVersions, listeners );
|
||||||
|
|
||||||
// Also, we need to ensure that any exclusions it presents are
|
// Also, we need to ensure that any exclusions it presents are
|
||||||
// added to the artifact before we retrive the metadata
|
// added to the artifact before we retrieve the metadata
|
||||||
// for the artifact; otherwise we may end up with unwanted
|
// for the artifact; otherwise we may end up with unwanted
|
||||||
// dependencies.
|
// dependencies.
|
||||||
Artifact ma = managedVersions.get( childKey );
|
Artifact ma = managedVersions.get( childKey );
|
||||||
|
@ -691,7 +691,7 @@ public class DefaultLegacyArtifactCollector
|
||||||
{
|
{
|
||||||
fireEvent( ResolutionListener.UPDATE_SCOPE, listeners, nearest, farthestArtifact );
|
fireEvent( ResolutionListener.UPDATE_SCOPE, listeners, nearest, farthestArtifact );
|
||||||
|
|
||||||
// previously we cloned the artifact, but it is more effecient to just update the artifactScope
|
// previously we cloned the artifact, but it is more efficient to just update the artifactScope
|
||||||
// if problems are later discovered that the original object needs its original artifactScope value,
|
// if problems are later discovered that the original object needs its original artifactScope value,
|
||||||
// cloning may
|
// cloning may
|
||||||
// again be appropriate
|
// again be appropriate
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class MetadataGraphVertex
|
||||||
{
|
{
|
||||||
ArtifactMetadata md;
|
ArtifactMetadata md;
|
||||||
|
|
||||||
// indications to use these in comparrison
|
// indications to use these in comparison
|
||||||
private boolean compareVersion = false;
|
private boolean compareVersion = false;
|
||||||
private boolean compareScope = false;
|
private boolean compareScope = false;
|
||||||
|
|
||||||
|
|
|
@ -187,7 +187,7 @@ under the License.
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<description><![CDATA[
|
<description><![CDATA[
|
||||||
Repository contains the information needed
|
Repository contains the information needed
|
||||||
for establishing connections with remote repoistory
|
for establishing connections with remote repository
|
||||||
]]></description>
|
]]></description>
|
||||||
<fields>
|
<fields>
|
||||||
<field>
|
<field>
|
||||||
|
@ -249,7 +249,7 @@ under the License.
|
||||||
<superClass>RepositoryBase</superClass>
|
<superClass>RepositoryBase</superClass>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<description>
|
<description>
|
||||||
Repository contains the information needed for establishing connections with remote repoistory
|
Repository contains the information needed for establishing connections with remote repository
|
||||||
</description>
|
</description>
|
||||||
<fields>
|
<fields>
|
||||||
<field>
|
<field>
|
||||||
|
|
|
@ -42,7 +42,7 @@ public class ProjectInheritanceTest
|
||||||
// p3 inherits from p2
|
// p3 inherits from p2
|
||||||
// p2 inherits from p1
|
// p2 inherits from p1
|
||||||
// p1 inherits from p0
|
// p1 inherits from p0
|
||||||
// p0 inhertis from super model
|
// p0 inherits from super model
|
||||||
//
|
//
|
||||||
// or we can show it graphically as:
|
// or we can show it graphically as:
|
||||||
//
|
//
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class ProjectInheritanceTest
|
||||||
// p3 inherits from p2
|
// p3 inherits from p2
|
||||||
// p2 inherits from p1
|
// p2 inherits from p1
|
||||||
// p1 inherits from p0
|
// p1 inherits from p0
|
||||||
// p0 inhertis from super model
|
// p0 inherits from super model
|
||||||
//
|
//
|
||||||
// or we can show it graphically as:
|
// or we can show it graphically as:
|
||||||
//
|
//
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class ProjectInheritanceTest
|
||||||
// p3 inherits from p2
|
// p3 inherits from p2
|
||||||
// p2 inherits from p1
|
// p2 inherits from p1
|
||||||
// p1 inherits from p0
|
// p1 inherits from p0
|
||||||
// p0 inhertis from super model
|
// p0 inherits from super model
|
||||||
//
|
//
|
||||||
// or we can show it graphically as:
|
// or we can show it graphically as:
|
||||||
//
|
//
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class ProjectInheritanceTest
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// p1 inherits from p0
|
// p1 inherits from p0
|
||||||
// p0 inhertis from super model
|
// p0 inherits from super model
|
||||||
//
|
//
|
||||||
// or we can show it graphically as:
|
// or we can show it graphically as:
|
||||||
//
|
//
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class ProjectInheritanceTest
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// p1 inherits from p0
|
// p1 inherits from p0
|
||||||
// p0 inhertis from super model
|
// p0 inherits from super model
|
||||||
//
|
//
|
||||||
// or we can show it graphically as:
|
// or we can show it graphically as:
|
||||||
//
|
//
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class ProjectInheritanceTest
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// p1 inherits from p0
|
// p1 inherits from p0
|
||||||
// p0 inhertis from super model
|
// p0 inherits from super model
|
||||||
//
|
//
|
||||||
// or we can show it graphically as:
|
// or we can show it graphically as:
|
||||||
//
|
//
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class ProjectInheritanceTest
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// p1 inherits from p0
|
// p1 inherits from p0
|
||||||
// p0 inhertis from super model
|
// p0 inherits from super model
|
||||||
//
|
//
|
||||||
// or we can show it graphically as:
|
// or we can show it graphically as:
|
||||||
//
|
//
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class ProjectInheritanceTest
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// p1 inherits from p0
|
// p1 inherits from p0
|
||||||
// p0 inhertis from super model
|
// p0 inherits from super model
|
||||||
//
|
//
|
||||||
// or we can show it graphically as:
|
// or we can show it graphically as:
|
||||||
//
|
//
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class ProjectInheritanceTest
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// p1 inherits from p0
|
// p1 inherits from p0
|
||||||
// p0 inhertis from super model
|
// p0 inherits from super model
|
||||||
//
|
//
|
||||||
// or we can show it graphically as:
|
// or we can show it graphically as:
|
||||||
//
|
//
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class ProjectInheritanceTest
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// p1 inherits from p0
|
// p1 inherits from p0
|
||||||
// p0 inhertis from super model
|
// p0 inherits from super model
|
||||||
//
|
//
|
||||||
// or we can show it graphically as:
|
// or we can show it graphically as:
|
||||||
//
|
//
|
||||||
|
|
|
@ -27,7 +27,7 @@ import org.apache.maven.project.MavenProject;
|
||||||
import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase;
|
import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verifies scope inheritence of direct and transitive dependencies.
|
* Verifies scope inheritance of direct and transitive dependencies.
|
||||||
*
|
*
|
||||||
* Should show three behaviors:
|
* Should show three behaviors:
|
||||||
*
|
*
|
||||||
|
@ -44,7 +44,7 @@ public class ProjectInheritanceTest
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// p1 inherits from p0
|
// p1 inherits from p0
|
||||||
// p0 inhertis from super model
|
// p0 inherits from super model
|
||||||
//
|
//
|
||||||
// or we can show it graphically as:
|
// or we can show it graphically as:
|
||||||
//
|
//
|
||||||
|
|
|
@ -25,7 +25,7 @@ import org.apache.maven.project.MavenProject;
|
||||||
import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase;
|
import org.apache.maven.project.inheritance.AbstractProjectInheritanceTestCase;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verifies scope of root project is preserved regardless of parent depenedency management.
|
* Verifies scope of root project is preserved regardless of parent dependency management.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:pschneider@gmail.com">Patrick Schneider</a>
|
* @author <a href="mailto:pschneider@gmail.com">Patrick Schneider</a>
|
||||||
* @see <a href="https://issues.apache.org/jira/browse/MNG-2919">MNG-2919</a>
|
* @see <a href="https://issues.apache.org/jira/browse/MNG-2919">MNG-2919</a>
|
||||||
|
@ -36,7 +36,7 @@ public class ProjectInheritanceTest
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// p1 inherits from p0
|
// p1 inherits from p0
|
||||||
// p0 inhertis from super model
|
// p0 inherits from super model
|
||||||
//
|
//
|
||||||
// or we can show it graphically as:
|
// or we can show it graphically as:
|
||||||
//
|
//
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class ProjectInheritanceTest
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// p1 inherits from p0
|
// p1 inherits from p0
|
||||||
// p0 inhertis from super model
|
// p0 inherits from super model
|
||||||
//
|
//
|
||||||
// or we can show it graphically as:
|
// or we can show it graphically as:
|
||||||
//
|
//
|
||||||
|
|
|
@ -57,7 +57,7 @@ We need this form so that the model builder can make the first pass at merging.
|
||||||
.
|
.
|
||||||
</plugins>
|
</plugins>
|
||||||
|
|
||||||
Once we have the version of the plugins the appropriate call to the plugin manager can be made to get the MojoDescriptor for the goal that needs to be run. In the MojoDescriptor we are interested in the <configuration/> element and <parameters/> element. From these elements we need to make a component configuration for the MojoExecution. The actual DOM like structure we create is of type PlexusConfiguration and is the type we use with the ComponentConfigurator to initialize fields in a Plexus component. Typically this is done within Plexus with the configuration supplied with component configuration, but in Maven we take configuration values from the POM. So we have to use the ComponentConfigurator outside of Plexus in order to configurure the Maven Mojo which is just a Plexus component. We can use the information from the MojoDescriptor along with the merged configuration information that is now present in the POM to create the complete PlexusConfiguration used to populate values in the Maven Mojo.
|
Once we have the version of the plugins the appropriate call to the plugin manager can be made to get the MojoDescriptor for the goal that needs to be run. In the MojoDescriptor we are interested in the <configuration/> element and <parameters/> element. From these elements we need to make a component configuration for the MojoExecution. The actual DOM like structure we create is of type PlexusConfiguration and is the type we use with the ComponentConfigurator to initialize fields in a Plexus component. Typically this is done within Plexus with the configuration supplied with component configuration, but in Maven we take configuration values from the POM. So we have to use the ComponentConfigurator outside of Plexus in order to configure the Maven Mojo which is just a Plexus component. We can use the information from the MojoDescriptor along with the merged configuration information that is now present in the POM to create the complete PlexusConfiguration used to populate values in the Maven Mojo.
|
||||||
|
|
||||||
foreach configuration element:
|
foreach configuration element:
|
||||||
- if read only and being set squawk
|
- if read only and being set squawk
|
||||||
|
|
|
@ -140,7 +140,7 @@ h3. Plugins need a specific metadata model
|
||||||
Each application will have its own model for plugins. Much of this model will be common across applications but there will always be issues specific to a particular applications’s plugins. Some of the issues that need to be taken into consideration:
|
Each application will have its own model for plugins. Much of this model will be common across applications but there will always be issues specific to a particular applications’s plugins. Some of the issues that need to be taken into consideration:
|
||||||
|
|
||||||
* Plugin dependencies
|
* Plugin dependencies
|
||||||
* Plugin resources like Javascript files or images
|
* Plugin resources like JavaScript files or images
|
||||||
* Configuration metadata and default configuration values
|
* Configuration metadata and default configuration values
|
||||||
* Extension points that plugins might expose
|
* Extension points that plugins might expose
|
||||||
|
|
||||||
|
|
|
@ -213,7 +213,7 @@ public class MavenArtifactRepository
|
||||||
* Return the protocol name.
|
* Return the protocol name.
|
||||||
* <br/>
|
* <br/>
|
||||||
* E.g: for input
|
* E.g: for input
|
||||||
* <code>http://www.codehause.org</code> this method will return <code>http</code>
|
* <code>http://www.codehaus.org</code> this method will return <code>http</code>
|
||||||
*
|
*
|
||||||
* @param url the url
|
* @param url the url
|
||||||
* @return the host name
|
* @return the host name
|
||||||
|
|
|
@ -37,7 +37,7 @@ import org.apache.maven.artifact.versioning.OverConstrainedVersionException;
|
||||||
*
|
*
|
||||||
* @author Jason van Zyl
|
* @author Jason van Zyl
|
||||||
* @TODO carlos: all these possible has*Exceptions and get*Exceptions methods make the clients too
|
* @TODO carlos: all these possible has*Exceptions and get*Exceptions methods make the clients too
|
||||||
* complex requiring a long list of checks, need to create a parent/interfact/encapsulation
|
* complex requiring a long list of checks, need to create a parent/interface/encapsulation
|
||||||
* for the types of exceptions
|
* for the types of exceptions
|
||||||
*/
|
*/
|
||||||
public class ArtifactResolutionResult
|
public class ArtifactResolutionResult
|
||||||
|
|
|
@ -137,10 +137,10 @@ public class DefaultBeanConfigurationRequest
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginManagement mngt = build.getPluginManagement();
|
PluginManagement mgmt = build.getPluginManagement();
|
||||||
if ( mngt != null )
|
if ( mgmt != null )
|
||||||
{
|
{
|
||||||
for ( Plugin plugin : mngt.getPlugins() )
|
for ( Plugin plugin : mgmt.getPlugins() )
|
||||||
{
|
{
|
||||||
if ( groupId.equals( plugin.getGroupId() ) && artifactId.equals( plugin.getArtifactId() ) )
|
if ( groupId.equals( plugin.getGroupId() ) && artifactId.equals( plugin.getArtifactId() ) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -24,7 +24,7 @@ import java.util.Map;
|
||||||
/**
|
/**
|
||||||
* A core extension to monitor Maven's execution. Typically, such an extension gets loaded into Maven by specifying the
|
* A core extension to monitor Maven's execution. Typically, such an extension gets loaded into Maven by specifying the
|
||||||
* system property {@code maven.ext.class.path} on the command line. As soon as dependency injection is setup, Maven
|
* system property {@code maven.ext.class.path} on the command line. As soon as dependency injection is setup, Maven
|
||||||
* looks up all implementators of this interface and calls their {@link #init(Context)} method. <em>Note:</em>
|
* looks up all implementers of this interface and calls their {@link #init(Context)} method. <em>Note:</em>
|
||||||
* Implementors are strongly advised to inherit from {@link AbstractEventSpy} instead of directly implementing this
|
* Implementors are strongly advised to inherit from {@link AbstractEventSpy} instead of directly implementing this
|
||||||
* interface.
|
* interface.
|
||||||
* @since 3.0.2
|
* @since 3.0.2
|
||||||
|
|
|
@ -121,8 +121,10 @@ public class DefaultRepositorySystemSessionFactory
|
||||||
}
|
}
|
||||||
|
|
||||||
int errorPolicy = 0;
|
int errorPolicy = 0;
|
||||||
errorPolicy |= request.isCacheNotFound() ? ResolutionErrorPolicy.CACHE_NOT_FOUND : 0;
|
errorPolicy |= request.isCacheNotFound() ? ResolutionErrorPolicy.CACHE_NOT_FOUND
|
||||||
errorPolicy |= request.isCacheTransferError() ? ResolutionErrorPolicy.CACHE_TRANSFER_ERROR : 0;
|
: ResolutionErrorPolicy.CACHE_DISABLED;
|
||||||
|
errorPolicy |= request.isCacheTransferError() ? ResolutionErrorPolicy.CACHE_TRANSFER_ERROR
|
||||||
|
: ResolutionErrorPolicy.CACHE_DISABLED;
|
||||||
session.setResolutionErrorPolicy(
|
session.setResolutionErrorPolicy(
|
||||||
new SimpleResolutionErrorPolicy( errorPolicy, errorPolicy | ResolutionErrorPolicy.CACHE_NOT_FOUND ) );
|
new SimpleResolutionErrorPolicy( errorPolicy, errorPolicy | ResolutionErrorPolicy.CACHE_NOT_FOUND ) );
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ package org.apache.maven.lifecycle.internal;
|
||||||
/**
|
/**
|
||||||
* A task that is a goal
|
* A task that is a goal
|
||||||
* <p/>
|
* <p/>
|
||||||
* TODO: From a concurrecy perspective, this class is not good. The combination of mutable/immutable state is not nice
|
* TODO: From a concurrency perspective, this class is not good. The combination of mutable/immutable state is not nice
|
||||||
*
|
*
|
||||||
* @since 3.0
|
* @since 3.0
|
||||||
* @author Benjamin Bentmann
|
* @author Benjamin Bentmann
|
||||||
|
|
|
@ -69,5 +69,5 @@ public final class TaskSegment
|
||||||
return aggregating;
|
return aggregating;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Consider throwing UnsupprtedSomething on hashCode/equals
|
// TODO: Consider throwing UnsupportedSomething on hashCode/equals
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ import org.apache.maven.lifecycle.internal.ProjectSegment;
|
||||||
* @author Kristian Rosenvold
|
* @author Kristian Rosenvold
|
||||||
* <p/>
|
* <p/>
|
||||||
* NOTE: This class is not part of any public api and can be changed or deleted without prior notice.
|
* NOTE: This class is not part of any public api and can be changed or deleted without prior notice.
|
||||||
* This class in particular may spontaneusly self-combust and be replaced by a plexus-compliant thread aware
|
* This class in particular may spontaneously self-combust and be replaced by a plexus-compliant thread aware
|
||||||
* logger implementation at any time.
|
* logger implementation at any time.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings( { "SynchronizationOnLocalVariableOrMethodParameter" } )
|
@SuppressWarnings( { "SynchronizationOnLocalVariableOrMethodParameter" } )
|
||||||
|
@ -54,7 +54,7 @@ public class ThreadOutputMuxer
|
||||||
|
|
||||||
private final ByteArrayOutputStream defaultOutputStreamForUnknownData = new ByteArrayOutputStream();
|
private final ByteArrayOutputStream defaultOutputStreamForUnknownData = new ByteArrayOutputStream();
|
||||||
|
|
||||||
private final PrintStream defaultPringStream = new PrintStream( defaultOutputStreamForUnknownData );
|
private final PrintStream defaultPrintStream = new PrintStream( defaultOutputStreamForUnknownData );
|
||||||
|
|
||||||
private final Set<ProjectSegment> completedBuilds = Collections.synchronizedSet( new HashSet<ProjectSegment>() );
|
private final Set<ProjectSegment> completedBuilds = Collections.synchronizedSet( new HashSet<ProjectSegment>() );
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ public class ThreadOutputMuxer
|
||||||
ProjectSegment threadProject = projectBuildThreadLocal.get();
|
ProjectSegment threadProject = projectBuildThreadLocal.get();
|
||||||
if ( threadProject == null )
|
if ( threadProject == null )
|
||||||
{
|
{
|
||||||
return defaultPringStream;
|
return defaultPrintStream;
|
||||||
}
|
}
|
||||||
if ( ownsRealOutputStream( threadProject ) )
|
if ( ownsRealOutputStream( threadProject ) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class DebugConfigurationListener
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a human-friendly string represenation of the specified object.
|
* Creates a human-friendly string representation of the specified object.
|
||||||
*
|
*
|
||||||
* @param obj The object to create a string representation for, may be <code>null</code>.
|
* @param obj The object to create a string representation for, may be <code>null</code>.
|
||||||
* @return The string representation, never <code>null</code>.
|
* @return The string representation, never <code>null</code>.
|
||||||
|
|
|
@ -49,14 +49,14 @@ public interface ExtensionRealmCache
|
||||||
|
|
||||||
public final ClassRealm realm;
|
public final ClassRealm realm;
|
||||||
|
|
||||||
public final ExtensionDescriptor desciptor;
|
public final ExtensionDescriptor descriptor;
|
||||||
|
|
||||||
public final List<Artifact> artifacts;
|
public final List<Artifact> artifacts;
|
||||||
|
|
||||||
public CacheRecord( ClassRealm realm, ExtensionDescriptor descriptor, List<Artifact> artifacts )
|
public CacheRecord( ClassRealm realm, ExtensionDescriptor descriptor, List<Artifact> artifacts )
|
||||||
{
|
{
|
||||||
this.realm = realm;
|
this.realm = realm;
|
||||||
this.desciptor = descriptor;
|
this.descriptor = descriptor;
|
||||||
this.artifacts = artifacts;
|
this.artifacts = artifacts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ public interface PluginVersionRequest
|
||||||
/**
|
/**
|
||||||
* Gets the POM whose build plugins are to be scanned for the version.
|
* Gets the POM whose build plugins are to be scanned for the version.
|
||||||
*
|
*
|
||||||
* @return The POM whose build plugins are to be scanned for the verion or {@code null} to only search the plugin
|
* @return The POM whose build plugins are to be scanned for the version or {@code null} to only search the plugin
|
||||||
* repositories.
|
* repositories.
|
||||||
*/
|
*/
|
||||||
Model getPom();
|
Model getPom();
|
||||||
|
|
|
@ -197,7 +197,7 @@ public class DefaultProjectBuildingHelper
|
||||||
pluginManager.setupExtensionsRealm( project, plugin, request.getRepositorySession() );
|
pluginManager.setupExtensionsRealm( project, plugin, request.getRepositorySession() );
|
||||||
|
|
||||||
final ClassRealm extensionRealm = recordRealm.realm;
|
final ClassRealm extensionRealm = recordRealm.realm;
|
||||||
final ExtensionDescriptor extensionDescriptor = recordRealm.desciptor;
|
final ExtensionDescriptor extensionDescriptor = recordRealm.descriptor;
|
||||||
final List<Artifact> artifacts = recordRealm.artifacts;
|
final List<Artifact> artifacts = recordRealm.artifacts;
|
||||||
|
|
||||||
extensionRealms.add( extensionRealm );
|
extensionRealms.add( extensionRealm );
|
||||||
|
|
|
@ -48,7 +48,7 @@ class DefaultProjectBuildingResult
|
||||||
* Creates a new result with the specified contents.
|
* Creates a new result with the specified contents.
|
||||||
*
|
*
|
||||||
* @param project The project that was built, may be {@code null}.
|
* @param project The project that was built, may be {@code null}.
|
||||||
* @param problems The problems that were encouterned, may be {@code null}.
|
* @param problems The problems that were encountered, may be {@code null}.
|
||||||
* @param dependencyResolutionResult The result of the resolution for the project dependencies, may be {@code null}.
|
* @param dependencyResolutionResult The result of the resolution for the project dependencies, may be {@code null}.
|
||||||
*/
|
*/
|
||||||
public DefaultProjectBuildingResult( MavenProject project, List<ModelProblem> problems,
|
public DefaultProjectBuildingResult( MavenProject project, List<ModelProblem> problems,
|
||||||
|
@ -68,7 +68,7 @@ class DefaultProjectBuildingResult
|
||||||
*
|
*
|
||||||
* @param projectId The identifier of the project, may be {@code null}.
|
* @param projectId The identifier of the project, may be {@code null}.
|
||||||
* @param pomFile The POM file from which the project was built, may be {@code null}.
|
* @param pomFile The POM file from which the project was built, may be {@code null}.
|
||||||
* @param problems The problems that were encouterned, may be {@code null}.
|
* @param problems The problems that were encountered, may be {@code null}.
|
||||||
*/
|
*/
|
||||||
public DefaultProjectBuildingResult( String projectId, File pomFile, List<ModelProblem> problems )
|
public DefaultProjectBuildingResult( String projectId, File pomFile, List<ModelProblem> problems )
|
||||||
{
|
{
|
||||||
|
|
|
@ -153,10 +153,10 @@ public class DefaultProjectDependenciesResolver
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DependencyManagement depMngt = project.getDependencyManagement();
|
DependencyManagement depMgmt = project.getDependencyManagement();
|
||||||
if ( depMngt != null )
|
if ( depMgmt != null )
|
||||||
{
|
{
|
||||||
for ( Dependency dependency : depMngt.getDependencies() )
|
for ( Dependency dependency : depMgmt.getDependencies() )
|
||||||
{
|
{
|
||||||
collect.addManagedDependency( RepositoryUtils.toDependency( dependency, stereotypes ) );
|
collect.addManagedDependency( RepositoryUtils.toDependency( dependency, stereotypes ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ public interface MavenProjectHelper
|
||||||
* * See {@link #attachArtifact(MavenProject, String, String, java.io.File)}, but with classifier set to null.
|
* * See {@link #attachArtifact(MavenProject, String, String, java.io.File)}, but with classifier set to null.
|
||||||
* @param project project reference.
|
* @param project project reference.
|
||||||
* @param artifactType artifact type.
|
* @param artifactType artifact type.
|
||||||
* @param artifactFile arrifact file.
|
* @param artifactFile artifact file.
|
||||||
*/
|
*/
|
||||||
void attachArtifact( MavenProject project, String artifactType, File artifactFile );
|
void attachArtifact( MavenProject project, String artifactType, File artifactFile );
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ public interface ProjectBuildingRequest
|
||||||
|
|
||||||
List<ArtifactRepository> getRemoteRepositories();
|
List<ArtifactRepository> getRemoteRepositories();
|
||||||
|
|
||||||
ProjectBuildingRequest setPluginArtifactRepositories( List<ArtifactRepository> pluginArtifacgRepositories );
|
ProjectBuildingRequest setPluginArtifactRepositories( List<ArtifactRepository> pluginArtifactRepositories );
|
||||||
|
|
||||||
List<ArtifactRepository> getPluginArtifactRepositories();
|
List<ArtifactRepository> getPluginArtifactRepositories();
|
||||||
|
|
||||||
|
|
|
@ -208,8 +208,8 @@ public class MavenMetadataSource
|
||||||
{
|
{
|
||||||
dependencies = rel.project.getDependencies();
|
dependencies = rel.project.getDependencies();
|
||||||
|
|
||||||
DependencyManagement depMngt = rel.project.getDependencyManagement();
|
DependencyManagement depMgmt = rel.project.getDependencyManagement();
|
||||||
managedDependencies = ( depMngt != null ) ? depMngt.getDependencies() : null;
|
managedDependencies = ( depMgmt != null ) ? depMgmt.getDependencies() : null;
|
||||||
|
|
||||||
pomRepositories = rel.project.getRemoteArtifactRepositories();
|
pomRepositories = rel.project.getRemoteArtifactRepositories();
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,8 +55,8 @@ public class ProjectArtifact
|
||||||
|
|
||||||
public List<Dependency> getManagedDependencies()
|
public List<Dependency> getManagedDependencies()
|
||||||
{
|
{
|
||||||
DependencyManagement depMngt = project.getDependencyManagement();
|
DependencyManagement depMgmt = project.getDependencyManagement();
|
||||||
return ( depMngt != null ) ? depMngt.getDependencies() : Collections.<Dependency>emptyList();
|
return ( depMgmt != null ) ? depMgmt.getDependencies() : Collections.<Dependency>emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
static class PomArtifactHandler
|
static class PomArtifactHandler
|
||||||
|
|
|
@ -102,7 +102,7 @@ public interface MetadataResolutionRequest
|
||||||
boolean isResolveManagedVersions();
|
boolean isResolveManagedVersions();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enables/disables resolution of the dependency manageemnt information.
|
* Enables/disables resolution of the dependency management information.
|
||||||
*
|
*
|
||||||
* @param resolveManagedVersions {@code true} if the dependency management information should be retrieved, {@code
|
* @param resolveManagedVersions {@code true} if the dependency management information should be retrieved, {@code
|
||||||
* false} otherwise.
|
* false} otherwise.
|
||||||
|
|
|
@ -168,7 +168,7 @@
|
||||||
<description>
|
<description>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<p>Toolchain configuration information, like location or any information that is to be retrieved.</p>
|
<p>Toolchain configuration information, like location or any information that is to be retrieved.</p>
|
||||||
<p>Actual content structure is completely open: each toochain type will define its own format and semantics.</p>
|
<p>Actual content structure is completely open: each toolchain type will define its own format and semantics.</p>
|
||||||
<p>In general, this is a properties format: <code><name>value</name></code> with
|
<p>In general, this is a properties format: <code><name>value</name></code> with
|
||||||
per-toolchain defined properties names.</p>
|
per-toolchain defined properties names.</p>
|
||||||
]]></description>
|
]]></description>
|
||||||
|
|
|
@ -66,7 +66,7 @@ ${maven.home}
|
||||||
We once had a document that Vincent and I agreed upon and I was about to
|
We once had a document that Vincent and I agreed upon and I was about to
|
||||||
implement it and then I disappeared for 8 months so it never came to pass.
|
implement it and then I disappeared for 8 months so it never came to pass.
|
||||||
|
|
||||||
So I guess it's important to figure out what people are using propeties
|
So I guess it's important to figure out what people are using properties
|
||||||
files for and see if we can't incorporate it all into the POM. Or if we do
|
files for and see if we can't incorporate it all into the POM. Or if we do
|
||||||
have properties file (something I would like to avoid) say they don't
|
have properties file (something I would like to avoid) say they don't
|
||||||
contribute in any meaningful way to information in the POM. For example a
|
contribute in any meaningful way to information in the POM. For example a
|
||||||
|
@ -110,9 +110,9 @@ Unified source directory
|
||||||
itself. This way locations of intermediary artifacts of a build would be
|
itself. This way locations of intermediary artifacts of a build would be
|
||||||
in a known location. This would also help with developer setup i.e. getting
|
in a known location. This would also help with developer setup i.e. getting
|
||||||
new developers up and running. They could run a maven command and have all
|
new developers up and running. They could run a maven command and have all
|
||||||
their source trees set up in the same way as their collegues.
|
their source trees set up in the same way as their colleagues.
|
||||||
|
|
||||||
here's what I do currently in the netbeans part of the mevenide project to
|
here's what I do currently in the netbeans part of the mavenide project to
|
||||||
find the relevant subprojects/sibling projects. I check if the user has
|
find the relevant subprojects/sibling projects. I check if the user has
|
||||||
defined the maven.multiproject.includes property in any of his properties
|
defined the maven.multiproject.includes property in any of his properties
|
||||||
files for the current project. if yes. then I'm able to find projects that
|
files for the current project. if yes. then I'm able to find projects that
|
||||||
|
@ -120,7 +120,7 @@ Unified source directory
|
||||||
problems with the current solution are:
|
problems with the current solution are:
|
||||||
1. information is duplicate. once in POM's dependencies and once in the
|
1. information is duplicate. once in POM's dependencies and once in the
|
||||||
maven.multiproject.includes property.
|
maven.multiproject.includes property.
|
||||||
2. it works without problems only for projects with relative paths, eg. from
|
2. it works without problems only for projects with relative paths, e.g., from
|
||||||
one CVS repository.. for projects from multiple SCM repositories it's harder
|
one CVS repository.. for projects from multiple SCM repositories it's harder
|
||||||
to maintain the same relative links on all developer computers.
|
to maintain the same relative links on all developer computers.
|
||||||
not sure the unified source directory structure addresses this issue.
|
not sure the unified source directory structure addresses this issue.
|
||||||
|
|
|
@ -167,7 +167,7 @@ Offline Mode Design
|
||||||
This is wholly dependent on Maven-Wagon, above.
|
This is wholly dependent on Maven-Wagon, above.
|
||||||
|
|
||||||
We could possibly use a flag on a particular Wagon to see whether it supports
|
We could possibly use a flag on a particular Wagon to see whether it supports
|
||||||
offline mode, and then test to see if the file-based basedir for an aritfact
|
offline mode, and then test to see if the file-based basedir for an artifact
|
||||||
repository works...if it doesn't work, we can mark that repository offline...
|
repository works...if it doesn't work, we can mark that repository offline...
|
||||||
|
|
||||||
OTOH, all offline-mode checks can probably be run from Wagon-based APIs.
|
OTOH, all offline-mode checks can probably be run from Wagon-based APIs.
|
||||||
|
@ -201,7 +201,7 @@ Offline Mode Design
|
||||||
The majority of mojos will leave the requiresOnline == false,
|
The majority of mojos will leave the requiresOnline == false,
|
||||||
since online/offline status will be irrelevant, provided they have
|
since online/offline status will be irrelevant, provided they have
|
||||||
access to their required artifacts and other classpath elements. In the case
|
access to their required artifacts and other classpath elements. In the case
|
||||||
of required artifacts and other classpath elemtents, this is assumed by the
|
of required artifacts and other classpath elements, this is assumed by the
|
||||||
mojo API to be in a correct state, and will be handled by the Wagon
|
mojo API to be in a correct state, and will be handled by the Wagon
|
||||||
modifications.
|
modifications.
|
||||||
|
|
||||||
|
|
|
@ -40,9 +40,9 @@ Maven plugin execution isolation
|
||||||
|
|
||||||
The <<<plexus.core>>> realm contains the resources required to run any
|
The <<<plexus.core>>> realm contains the resources required to run any
|
||||||
plexus application; The <<<plexus.core.maven>>> realm contains all of the
|
plexus application; The <<<plexus.core.maven>>> realm contains all of the
|
||||||
resources required to run Maven. Each subseqent plugin realm contains the
|
resources required to run Maven. Each subsequent plugin realm contains the
|
||||||
JAR plugin as well as its dependencies. The realms noted above are setup
|
JAR plugin as well as its dependencies. The realms noted above are setup
|
||||||
in a hierachical structure where the resources in the parent realms are
|
in a hierarchical structure where the resources in the parent realms are
|
||||||
available but the <<realm is searched first before a search is made in
|
available but the <<realm is searched first before a search is made in
|
||||||
the parent realm>>.
|
the parent realm>>.
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class DefaultProjectDependencyGraphTest
|
||||||
public void testVerifyExpectedParentStructure()
|
public void testVerifyExpectedParentStructure()
|
||||||
throws CycleDetectedException, DuplicateProjectException
|
throws CycleDetectedException, DuplicateProjectException
|
||||||
{
|
{
|
||||||
// This test verifies the baseline structure used in susequent tests. If this fails, the rest will fail.
|
// This test verifies the baseline structure used in subsequent tests. If this fails, the rest will fail.
|
||||||
ProjectDependencyGraph graph = threeProjectsDependingOnASingle();
|
ProjectDependencyGraph graph = threeProjectsDependingOnASingle();
|
||||||
final List<MavenProject> sortedProjects = graph.getSortedProjects();
|
final List<MavenProject> sortedProjects = graph.getSortedProjects();
|
||||||
assertEquals( aProject, sortedProjects.get( 0 ) );
|
assertEquals( aProject, sortedProjects.get( 0 ) );
|
||||||
|
@ -66,7 +66,7 @@ public class DefaultProjectDependencyGraphTest
|
||||||
assertEquals( depender3, sortedProjects.get( 3 ) );
|
assertEquals( depender3, sortedProjects.get( 3 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testVerifyThatDownsteamProjectsComeInSortedOrder()
|
public void testVerifyThatDownstreamProjectsComeInSortedOrder()
|
||||||
throws CycleDetectedException, DuplicateProjectException
|
throws CycleDetectedException, DuplicateProjectException
|
||||||
{
|
{
|
||||||
final List<MavenProject> downstreamProjects =
|
final List<MavenProject> downstreamProjects =
|
||||||
|
@ -102,7 +102,7 @@ public class DefaultProjectDependencyGraphTest
|
||||||
assertEquals( depender2, downstreamProjects.get( 3 ) );
|
assertEquals( depender2, downstreamProjects.get( 3 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testWithTranistiveOnly()
|
public void testWithTransitiveOnly()
|
||||||
throws CycleDetectedException, DuplicateProjectException
|
throws CycleDetectedException, DuplicateProjectException
|
||||||
{
|
{
|
||||||
final ProjectDependencyGraph graph = new DefaultProjectDependencyGraph(
|
final ProjectDependencyGraph graph = new DefaultProjectDependencyGraph(
|
||||||
|
@ -115,7 +115,7 @@ public class DefaultProjectDependencyGraphTest
|
||||||
assertEquals( depender2, downstreamProjects.get( 3 ) );
|
assertEquals( depender2, downstreamProjects.get( 3 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testWithMissingTranistiveOnly()
|
public void testWithMissingTransitiveOnly()
|
||||||
throws CycleDetectedException, DuplicateProjectException
|
throws CycleDetectedException, DuplicateProjectException
|
||||||
{
|
{
|
||||||
final ProjectDependencyGraph graph = new DefaultProjectDependencyGraph(
|
final ProjectDependencyGraph graph = new DefaultProjectDependencyGraph(
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class LifecycleExecutorSubModulesTest
|
||||||
return "src/test/projects/lifecycle-executor";
|
return "src/test/projects/lifecycle-executor";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testCrweation()
|
public void testCreation()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
assertNotNull( defaultLifeCycles );
|
assertNotNull( defaultLifeCycles );
|
||||||
|
|
|
@ -25,7 +25,7 @@ under the License.
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h2>Design</h2>
|
<h2>Design</h2>
|
||||||
These stubs can be thought of as hand-coded mock obects. They allow unit tests to test only specific
|
These stubs can be thought of as hand-coded mock objects. They allow unit tests to test only specific
|
||||||
aspects of a component while ignoring others.
|
aspects of a component while ignoring others.
|
||||||
|
|
||||||
These stubs form an internally consistent data-set that is not expected to change. They are
|
These stubs form an internally consistent data-set that is not expected to change. They are
|
||||||
|
|
|
@ -171,7 +171,7 @@ public class ProjectDependencyGraphStub
|
||||||
|
|
||||||
public List<MavenProject> getSortedProjects()
|
public List<MavenProject> getSortedProjects()
|
||||||
{
|
{
|
||||||
return Arrays.asList( A, B, C, X, Y, Z ); // I'm not entirely sure about the order but this shold do...
|
return Arrays.asList( A, B, C, X, Y, Z ); // I'm not entirely sure about the order but this should do...
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<MavenProject> getDownstreamProjects( MavenProject project, boolean transitive )
|
public List<MavenProject> getDownstreamProjects( MavenProject project, boolean transitive )
|
||||||
|
|
|
@ -119,7 +119,7 @@ public class PluginManagerTest
|
||||||
|
|
||||||
This will not work until the RR plugin is released to get rid of the binding to the reporting exception which is a mistake.
|
This will not work until the RR plugin is released to get rid of the binding to the reporting exception which is a mistake.
|
||||||
|
|
||||||
This happpens after removing the reporting API from the core:
|
This happens after removing the reporting API from the core:
|
||||||
|
|
||||||
java.lang.NoClassDefFoundError: org/apache/maven/reporting/MavenReportException
|
java.lang.NoClassDefFoundError: org/apache/maven/reporting/MavenReportException
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class DefaultLegacySupportTest extends TestCase {
|
||||||
{
|
{
|
||||||
latch.await();
|
latch.await();
|
||||||
}
|
}
|
||||||
catch (InterruptedException ingore)
|
catch (InterruptedException ignore)
|
||||||
{
|
{
|
||||||
// Test may fail if we get interrupted
|
// Test may fail if we get interrupted
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ public class DefaultMavenProjectBuilderTest
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check that we can build ok from the middle pom of a (parent,child,grandchild) heirarchy
|
* Check that we can build ok from the middle pom of a (parent,child,grandchild) hierarchy
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public void testBuildFromMiddlePom() throws Exception
|
public void testBuildFromMiddlePom() throws Exception
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class EmptyProjectBuildingHelper
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProjectRealmCache.CacheRecord createProjectRealm( MavenProject proejct,
|
public ProjectRealmCache.CacheRecord createProjectRealm( MavenProject project,
|
||||||
Model model, ProjectBuildingRequest request )
|
Model model, ProjectBuildingRequest request )
|
||||||
{
|
{
|
||||||
return new ProjectRealmCache.CacheRecord( null, null );
|
return new ProjectRealmCache.CacheRecord( null, null );
|
||||||
|
|
|
@ -94,7 +94,7 @@ public class PomConstructionTest
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests that modules is not overriden by profile
|
* Tests that modules is not overridden by profile
|
||||||
*
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
|
@ -207,7 +207,7 @@ public class PomConstructionTest
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
buildPom( "unique-dependency-key/dep-mngt" );
|
buildPom( "unique-dependency-key/dep-mgmt" );
|
||||||
fail( "Non-unique dependency keys did not cause validation error" );
|
fail( "Non-unique dependency keys did not cause validation error" );
|
||||||
}
|
}
|
||||||
catch ( ProjectBuildingException e )
|
catch ( ProjectBuildingException e )
|
||||||
|
@ -235,7 +235,7 @@ public class PomConstructionTest
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
buildPom( "unique-dependency-key/dep-mngt-in-profile" );
|
buildPom( "unique-dependency-key/dep-mgmt-in-profile" );
|
||||||
fail( "Non-unique dependency keys did not cause validation error" );
|
fail( "Non-unique dependency keys did not cause validation error" );
|
||||||
}
|
}
|
||||||
catch ( ProjectBuildingException e )
|
catch ( ProjectBuildingException e )
|
||||||
|
@ -414,7 +414,7 @@ public class PomConstructionTest
|
||||||
public void testOrderOfGoalsFromPluginExecutionWithoutPluginManagement()
|
public void testOrderOfGoalsFromPluginExecutionWithoutPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "plugin-exec-goals-order/wo-plugin-mngt" );
|
PomTestWrapper pom = buildPom( "plugin-exec-goals-order/wo-plugin-mgmt" );
|
||||||
assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions[1]/goals" ) ).size() );
|
assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions[1]/goals" ) ).size() );
|
||||||
assertEquals( "b", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) );
|
assertEquals( "b", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) );
|
||||||
assertEquals( "a", pom.getValue( "build/plugins[1]/executions[1]/goals[2]" ) );
|
assertEquals( "a", pom.getValue( "build/plugins[1]/executions[1]/goals[2]" ) );
|
||||||
|
@ -427,7 +427,7 @@ public class PomConstructionTest
|
||||||
public void testOrderOfGoalsFromPluginExecutionWithPluginManagement()
|
public void testOrderOfGoalsFromPluginExecutionWithPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "plugin-exec-goals-order/w-plugin-mngt" );
|
PomTestWrapper pom = buildPom( "plugin-exec-goals-order/w-plugin-mgmt" );
|
||||||
assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions[1]/goals" ) ).size() );
|
assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions[1]/goals" ) ).size() );
|
||||||
assertEquals( "b", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) );
|
assertEquals( "b", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) );
|
||||||
assertEquals( "a", pom.getValue( "build/plugins[1]/executions[1]/goals[2]" ) );
|
assertEquals( "a", pom.getValue( "build/plugins[1]/executions[1]/goals[2]" ) );
|
||||||
|
@ -439,7 +439,7 @@ public class PomConstructionTest
|
||||||
public void testOrderOfPluginExecutionsWithoutPluginManagement()
|
public void testOrderOfPluginExecutionsWithoutPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "plugin-exec-order/wo-plugin-mngt" );
|
PomTestWrapper pom = buildPom( "plugin-exec-order/wo-plugin-mgmt" );
|
||||||
assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
|
assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
|
||||||
assertEquals( "b", pom.getValue( "build/plugins[1]/executions[1]/id" ) );
|
assertEquals( "b", pom.getValue( "build/plugins[1]/executions[1]/id" ) );
|
||||||
assertEquals( "a", pom.getValue( "build/plugins[1]/executions[2]/id" ) );
|
assertEquals( "a", pom.getValue( "build/plugins[1]/executions[2]/id" ) );
|
||||||
|
@ -452,7 +452,7 @@ public class PomConstructionTest
|
||||||
public void testOrderOfPluginExecutionsWithPluginManagement()
|
public void testOrderOfPluginExecutionsWithPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "plugin-exec-order/w-plugin-mngt" );
|
PomTestWrapper pom = buildPom( "plugin-exec-order/w-plugin-mgmt" );
|
||||||
assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
|
assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
|
||||||
assertEquals( "b", pom.getValue( "build/plugins[1]/executions[1]/id" ) );
|
assertEquals( "b", pom.getValue( "build/plugins[1]/executions[1]/id" ) );
|
||||||
assertEquals( "a", pom.getValue( "build/plugins[1]/executions[2]/id" ) );
|
assertEquals( "a", pom.getValue( "build/plugins[1]/executions[2]/id" ) );
|
||||||
|
@ -488,7 +488,7 @@ public class PomConstructionTest
|
||||||
public void testOrderOfMergedPluginExecutionsWithoutPluginManagement()
|
public void testOrderOfMergedPluginExecutionsWithoutPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "merged-plugin-exec-order/wo-plugin-mngt/sub" );
|
PomTestWrapper pom = buildPom( "merged-plugin-exec-order/wo-plugin-mgmt/sub" );
|
||||||
assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
|
assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
|
||||||
assertEquals( "parent-1", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) );
|
assertEquals( "parent-1", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) );
|
||||||
assertEquals( "parent-2", pom.getValue( "build/plugins[1]/executions[2]/goals[1]" ) );
|
assertEquals( "parent-2", pom.getValue( "build/plugins[1]/executions[2]/goals[1]" ) );
|
||||||
|
@ -500,7 +500,7 @@ public class PomConstructionTest
|
||||||
public void testOrderOfMergedPluginExecutionsWithPluginManagement()
|
public void testOrderOfMergedPluginExecutionsWithPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "merged-plugin-exec-order/w-plugin-mngt/sub" );
|
PomTestWrapper pom = buildPom( "merged-plugin-exec-order/w-plugin-mgmt/sub" );
|
||||||
assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
|
assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
|
||||||
assertEquals( "parent-1", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) );
|
assertEquals( "parent-1", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) );
|
||||||
assertEquals( "parent-2", pom.getValue( "build/plugins[1]/executions[2]/goals[1]" ) );
|
assertEquals( "parent-2", pom.getValue( "build/plugins[1]/executions[2]/goals[1]" ) );
|
||||||
|
@ -522,7 +522,7 @@ public class PomConstructionTest
|
||||||
public void testOrderOfMergedPluginExecutionGoalsWithoutPluginManagement()
|
public void testOrderOfMergedPluginExecutionGoalsWithoutPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "merged-plugin-exec-goals-order/wo-plugin-mngt/sub" );
|
PomTestWrapper pom = buildPom( "merged-plugin-exec-goals-order/wo-plugin-mgmt/sub" );
|
||||||
|
|
||||||
assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions[1]/goals" ) ).size() );
|
assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions[1]/goals" ) ).size() );
|
||||||
assertEquals( "child-a", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) );
|
assertEquals( "child-a", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) );
|
||||||
|
@ -535,7 +535,7 @@ public class PomConstructionTest
|
||||||
public void testOrderOfMergedPluginExecutionGoalsWithPluginManagement()
|
public void testOrderOfMergedPluginExecutionGoalsWithPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "merged-plugin-exec-goals-order/w-plugin-mngt/sub" );
|
PomTestWrapper pom = buildPom( "merged-plugin-exec-goals-order/w-plugin-mgmt/sub" );
|
||||||
assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions[1]/goals" ) ).size() );
|
assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/executions[1]/goals" ) ).size() );
|
||||||
assertEquals( "child-a", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) );
|
assertEquals( "child-a", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) );
|
||||||
assertEquals( "merged", pom.getValue( "build/plugins[1]/executions[1]/goals[2]" ) );
|
assertEquals( "merged", pom.getValue( "build/plugins[1]/executions[1]/goals[2]" ) );
|
||||||
|
@ -548,7 +548,7 @@ public class PomConstructionTest
|
||||||
public void testOverridingOfInheritedPluginExecutionsWithoutPluginManagement()
|
public void testOverridingOfInheritedPluginExecutionsWithoutPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "plugin-exec-merging/wo-plugin-mngt/sub" );
|
PomTestWrapper pom = buildPom( "plugin-exec-merging/wo-plugin-mgmt/sub" );
|
||||||
assertEquals( 2, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
|
assertEquals( 2, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
|
||||||
assertEquals( "child-default", pom.getValue( "build/plugins[1]/executions[@id='default']/phase" ) );
|
assertEquals( "child-default", pom.getValue( "build/plugins[1]/executions[@id='default']/phase" ) );
|
||||||
assertEquals( "child-non-default", pom.getValue( "build/plugins[1]/executions[@id='non-default']/phase" ) );
|
assertEquals( "child-non-default", pom.getValue( "build/plugins[1]/executions[@id='non-default']/phase" ) );
|
||||||
|
@ -558,7 +558,7 @@ public class PomConstructionTest
|
||||||
public void testOverridingOfInheritedPluginExecutionsWithPluginManagement()
|
public void testOverridingOfInheritedPluginExecutionsWithPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "plugin-exec-merging/w-plugin-mngt/sub" );
|
PomTestWrapper pom = buildPom( "plugin-exec-merging/w-plugin-mgmt/sub" );
|
||||||
assertEquals( 2, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
|
assertEquals( 2, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
|
||||||
assertEquals( "child-default", pom.getValue( "build/plugins[1]/executions[@id='default']/phase" ) );
|
assertEquals( "child-default", pom.getValue( "build/plugins[1]/executions[@id='default']/phase" ) );
|
||||||
assertEquals( "child-non-default", pom.getValue( "build/plugins[1]/executions[@id='non-default']/phase" ) );
|
assertEquals( "child-non-default", pom.getValue( "build/plugins[1]/executions[@id='non-default']/phase" ) );
|
||||||
|
@ -569,7 +569,7 @@ public class PomConstructionTest
|
||||||
public void testOrderOfMergedPluginDependenciesWithoutPluginManagement()
|
public void testOrderOfMergedPluginDependenciesWithoutPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "merged-plugin-class-path-order/wo-plugin-mngt/sub" );
|
PomTestWrapper pom = buildPom( "merged-plugin-class-path-order/wo-plugin-mgmt/sub" );
|
||||||
|
|
||||||
assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/dependencies" ) ).size() );
|
assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/dependencies" ) ).size() );
|
||||||
assertNotNull( pom.getValue( "build/plugins[1]/dependencies[1]" ) );
|
assertNotNull( pom.getValue( "build/plugins[1]/dependencies[1]" ) );
|
||||||
|
@ -588,7 +588,7 @@ public class PomConstructionTest
|
||||||
public void testOrderOfMergedPluginDependenciesWithPluginManagement()
|
public void testOrderOfMergedPluginDependenciesWithPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "merged-plugin-class-path-order/w-plugin-mngt/sub" );
|
PomTestWrapper pom = buildPom( "merged-plugin-class-path-order/w-plugin-mgmt/sub" );
|
||||||
assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/dependencies" ) ).size() );
|
assertEquals( 5, ( (List<?>) pom.getValue( "build/plugins[1]/dependencies" ) ).size() );
|
||||||
assertEquals( "c", pom.getValue( "build/plugins[1]/dependencies[1]/artifactId" ) );
|
assertEquals( "c", pom.getValue( "build/plugins[1]/dependencies[1]/artifactId" ) );
|
||||||
assertEquals( "1", pom.getValue( "build/plugins[1]/dependencies[1]/version" ) );
|
assertEquals( "1", pom.getValue( "build/plugins[1]/dependencies[1]/version" ) );
|
||||||
|
@ -769,7 +769,7 @@ public class PomConstructionTest
|
||||||
public void testOrderOfPluginConfigurationElementsWithoutPluginManagement()
|
public void testOrderOfPluginConfigurationElementsWithoutPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "plugin-config-order/wo-plugin-mngt" );
|
PomTestWrapper pom = buildPom( "plugin-config-order/wo-plugin-mgmt" );
|
||||||
assertEquals( "one", pom.getValue( "build/plugins[1]/configuration/stringParams/stringParam[1]" ) );
|
assertEquals( "one", pom.getValue( "build/plugins[1]/configuration/stringParams/stringParam[1]" ) );
|
||||||
assertEquals( "two", pom.getValue( "build/plugins[1]/configuration/stringParams/stringParam[2]" ) );
|
assertEquals( "two", pom.getValue( "build/plugins[1]/configuration/stringParams/stringParam[2]" ) );
|
||||||
assertEquals( "three", pom.getValue( "build/plugins[1]/configuration/stringParams/stringParam[3]" ) );
|
assertEquals( "three", pom.getValue( "build/plugins[1]/configuration/stringParams/stringParam[3]" ) );
|
||||||
|
@ -780,7 +780,7 @@ public class PomConstructionTest
|
||||||
public void testOrderOfPluginConfigurationElementsWithPluginManagement()
|
public void testOrderOfPluginConfigurationElementsWithPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "plugin-config-order/w-plugin-mngt" );
|
PomTestWrapper pom = buildPom( "plugin-config-order/w-plugin-mgmt" );
|
||||||
assertEquals( "one", pom.getValue( "build/plugins[1]/configuration/stringParams/stringParam[1]" ) );
|
assertEquals( "one", pom.getValue( "build/plugins[1]/configuration/stringParams/stringParam[1]" ) );
|
||||||
assertEquals( "two", pom.getValue( "build/plugins[1]/configuration/stringParams/stringParam[2]" ) );
|
assertEquals( "two", pom.getValue( "build/plugins[1]/configuration/stringParams/stringParam[2]" ) );
|
||||||
assertEquals( "three", pom.getValue( "build/plugins[1]/configuration/stringParams/stringParam[3]" ) );
|
assertEquals( "three", pom.getValue( "build/plugins[1]/configuration/stringParams/stringParam[3]" ) );
|
||||||
|
@ -790,7 +790,7 @@ public class PomConstructionTest
|
||||||
public void testOrderOfPluginExecutionConfigurationElementsWithoutPluginManagement()
|
public void testOrderOfPluginExecutionConfigurationElementsWithoutPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "plugin-exec-config-order/wo-plugin-mngt" );
|
PomTestWrapper pom = buildPom( "plugin-exec-config-order/wo-plugin-mgmt" );
|
||||||
String prefix = "build/plugins[1]/executions[1]/configuration/";
|
String prefix = "build/plugins[1]/executions[1]/configuration/";
|
||||||
assertEquals( "one", pom.getValue( prefix + "stringParams/stringParam[1]" ) );
|
assertEquals( "one", pom.getValue( prefix + "stringParams/stringParam[1]" ) );
|
||||||
assertEquals( "two", pom.getValue( prefix + "stringParams/stringParam[2]" ) );
|
assertEquals( "two", pom.getValue( prefix + "stringParams/stringParam[2]" ) );
|
||||||
|
@ -804,7 +804,7 @@ public class PomConstructionTest
|
||||||
public void testOrderOfPluginExecutionConfigurationElementsWithPluginManagement()
|
public void testOrderOfPluginExecutionConfigurationElementsWithPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "plugin-exec-config-order/w-plugin-mngt" );
|
PomTestWrapper pom = buildPom( "plugin-exec-config-order/w-plugin-mgmt" );
|
||||||
String prefix = "build/plugins[1]/executions[1]/configuration/";
|
String prefix = "build/plugins[1]/executions[1]/configuration/";
|
||||||
assertEquals( "one", pom.getValue( prefix + "stringParams/stringParam[1]" ) );
|
assertEquals( "one", pom.getValue( prefix + "stringParams/stringParam[1]" ) );
|
||||||
assertEquals( "two", pom.getValue( prefix + "stringParams/stringParam[2]" ) );
|
assertEquals( "two", pom.getValue( prefix + "stringParams/stringParam[2]" ) );
|
||||||
|
@ -876,7 +876,7 @@ public class PomConstructionTest
|
||||||
public void testMultiplePluginExecutionsWithAndWithoutIdsWithoutPluginManagement()
|
public void testMultiplePluginExecutionsWithAndWithoutIdsWithoutPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "plugin-exec-w-and-wo-id/wo-plugin-mngt" );
|
PomTestWrapper pom = buildPom( "plugin-exec-w-and-wo-id/wo-plugin-mgmt" );
|
||||||
assertEquals( 2, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
|
assertEquals( 2, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
|
||||||
assertEquals( "log-string", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) );
|
assertEquals( "log-string", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) );
|
||||||
assertEquals( "log-string", pom.getValue( "build/plugins[1]/executions[2]/goals[1]" ) );
|
assertEquals( "log-string", pom.getValue( "build/plugins[1]/executions[2]/goals[1]" ) );
|
||||||
|
@ -885,7 +885,7 @@ public class PomConstructionTest
|
||||||
public void testMultiplePluginExecutionsWithAndWithoutIdsWithPluginManagement()
|
public void testMultiplePluginExecutionsWithAndWithoutIdsWithPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "plugin-exec-w-and-wo-id/w-plugin-mngt" );
|
PomTestWrapper pom = buildPom( "plugin-exec-w-and-wo-id/w-plugin-mgmt" );
|
||||||
assertEquals( 2, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
|
assertEquals( 2, ( (List<?>) pom.getValue( "build/plugins[1]/executions" ) ).size() );
|
||||||
assertEquals( "log-string", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) );
|
assertEquals( "log-string", pom.getValue( "build/plugins[1]/executions[1]/goals[1]" ) );
|
||||||
assertEquals( "log-string", pom.getValue( "build/plugins[1]/executions[2]/goals[1]" ) );
|
assertEquals( "log-string", pom.getValue( "build/plugins[1]/executions[2]/goals[1]" ) );
|
||||||
|
@ -894,7 +894,7 @@ public class PomConstructionTest
|
||||||
public void testDependencyOrderWithoutPluginManagement()
|
public void testDependencyOrderWithoutPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "dependency-order/wo-plugin-mngt" );
|
PomTestWrapper pom = buildPom( "dependency-order/wo-plugin-mgmt" );
|
||||||
assertEquals( 4, ( (List<?>) pom.getValue( "dependencies" ) ).size() );
|
assertEquals( 4, ( (List<?>) pom.getValue( "dependencies" ) ).size() );
|
||||||
assertEquals( "a", pom.getValue( "dependencies[1]/artifactId" ) );
|
assertEquals( "a", pom.getValue( "dependencies[1]/artifactId" ) );
|
||||||
assertEquals( "c", pom.getValue( "dependencies[2]/artifactId" ) );
|
assertEquals( "c", pom.getValue( "dependencies[2]/artifactId" ) );
|
||||||
|
@ -905,7 +905,7 @@ public class PomConstructionTest
|
||||||
public void testDependencyOrderWithPluginManagement()
|
public void testDependencyOrderWithPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "dependency-order/w-plugin-mngt" );
|
PomTestWrapper pom = buildPom( "dependency-order/w-plugin-mgmt" );
|
||||||
assertEquals( 4, ( (List<?>) pom.getValue( "dependencies" ) ).size() );
|
assertEquals( 4, ( (List<?>) pom.getValue( "dependencies" ) ).size() );
|
||||||
assertEquals( "a", pom.getValue( "dependencies[1]/artifactId" ) );
|
assertEquals( "a", pom.getValue( "dependencies[1]/artifactId" ) );
|
||||||
assertEquals( "c", pom.getValue( "dependencies[2]/artifactId" ) );
|
assertEquals( "c", pom.getValue( "dependencies[2]/artifactId" ) );
|
||||||
|
@ -1033,7 +1033,7 @@ public class PomConstructionTest
|
||||||
public void testPluginConfigurationUsingAttributesWithoutPluginManagement()
|
public void testPluginConfigurationUsingAttributesWithoutPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "plugin-config-attributes/wo-plugin-mngt" );
|
PomTestWrapper pom = buildPom( "plugin-config-attributes/wo-plugin-mgmt" );
|
||||||
assertEquals( "src", pom.getValue( "build/plugins[1]/configuration/domParam/copy/@todir" ) );
|
assertEquals( "src", pom.getValue( "build/plugins[1]/configuration/domParam/copy/@todir" ) );
|
||||||
assertEquals( "true", pom.getValue( "build/plugins[1]/configuration/domParam/copy/@overwrite" ) );
|
assertEquals( "true", pom.getValue( "build/plugins[1]/configuration/domParam/copy/@overwrite" ) );
|
||||||
assertEquals( "target", pom.getValue( "build/plugins[1]/configuration/domParam/copy/fileset/@dir" ) );
|
assertEquals( "target", pom.getValue( "build/plugins[1]/configuration/domParam/copy/fileset/@dir" ) );
|
||||||
|
@ -1045,7 +1045,7 @@ public class PomConstructionTest
|
||||||
public void testPluginConfigurationUsingAttributesWithPluginManagement()
|
public void testPluginConfigurationUsingAttributesWithPluginManagement()
|
||||||
throws Exception
|
throws Exception
|
||||||
{
|
{
|
||||||
PomTestWrapper pom = buildPom( "plugin-config-attributes/w-plugin-mngt" );
|
PomTestWrapper pom = buildPom( "plugin-config-attributes/w-plugin-mgmt" );
|
||||||
assertEquals( "src", pom.getValue( "build/plugins[1]/configuration/domParam/copy/@todir" ) );
|
assertEquals( "src", pom.getValue( "build/plugins[1]/configuration/domParam/copy/@todir" ) );
|
||||||
assertEquals( "true", pom.getValue( "build/plugins[1]/configuration/domParam/copy/@overwrite" ) );
|
assertEquals( "true", pom.getValue( "build/plugins[1]/configuration/domParam/copy/@overwrite" ) );
|
||||||
assertEquals( "target", pom.getValue( "build/plugins[1]/configuration/domParam/copy/fileset/@dir" ) );
|
assertEquals( "target", pom.getValue( "build/plugins[1]/configuration/domParam/copy/fileset/@dir" ) );
|
||||||
|
@ -1518,7 +1518,7 @@ public class PomConstructionTest
|
||||||
{
|
{
|
||||||
Properties sysProps = new Properties();
|
Properties sysProps = new Properties();
|
||||||
sysProps.setProperty( "system.property", "PASSED" );
|
sysProps.setProperty( "system.property", "PASSED" );
|
||||||
PomTestWrapper pom = buildPom( "sytem-property-interpolation", sysProps );
|
PomTestWrapper pom = buildPom( "system-property-interpolation", sysProps );
|
||||||
assertEquals( "PASSED", pom.getValue( "name" ) );
|
assertEquals( "PASSED", pom.getValue( "name" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,11 +64,11 @@ public class ProjectSorterTest
|
||||||
|
|
||||||
private Dependency createDependency( String groupId, String artifactId, String version )
|
private Dependency createDependency( String groupId, String artifactId, String version )
|
||||||
{
|
{
|
||||||
Dependency depdendency = new Dependency();
|
Dependency dependency = new Dependency();
|
||||||
depdendency.setGroupId( groupId );
|
dependency.setGroupId( groupId );
|
||||||
depdendency.setArtifactId( artifactId );
|
dependency.setArtifactId( artifactId );
|
||||||
depdendency.setVersion( version );
|
dependency.setVersion( version );
|
||||||
return depdendency;
|
return dependency;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Plugin createPlugin( MavenProject project )
|
private Plugin createPlugin( MavenProject project )
|
||||||
|
|
|
@ -84,7 +84,7 @@ public class MavenToolchainMergerTest
|
||||||
PersistedToolchains jdksExtra = reader.read( jdksExtraIS );
|
PersistedToolchains jdksExtra = reader.read( jdksExtraIS );
|
||||||
assertEquals( 2, jdks.getToolchains().size() );
|
assertEquals( 2, jdks.getToolchains().size() );
|
||||||
|
|
||||||
// switch dominant with reccessive
|
// switch dominant with recessive
|
||||||
merger.merge( jdksExtra, jdks, TrackableBase.USER_LEVEL );
|
merger.merge( jdksExtra, jdks, TrackableBase.USER_LEVEL );
|
||||||
assertEquals( 4, jdksExtra.getToolchains().size() );
|
assertEquals( 4, jdksExtra.getToolchains().size() );
|
||||||
assertEquals( 2, jdks.getToolchains().size() );
|
assertEquals( 2, jdks.getToolchains().size() );
|
||||||
|
@ -119,7 +119,7 @@ public class MavenToolchainMergerTest
|
||||||
PersistedToolchains jdksExtend = reader.read( jdksExtendIS );
|
PersistedToolchains jdksExtend = reader.read( jdksExtendIS );
|
||||||
assertEquals( 2, jdks.getToolchains().size() );
|
assertEquals( 2, jdks.getToolchains().size() );
|
||||||
|
|
||||||
// switch dominant with reccessive
|
// switch dominant with recessive
|
||||||
merger.merge( jdksExtend, jdks, TrackableBase.USER_LEVEL );
|
merger.merge( jdksExtend, jdks, TrackableBase.USER_LEVEL );
|
||||||
assertEquals( 2, jdksExtend.getToolchains().size() );
|
assertEquals( 2, jdksExtend.getToolchains().size() );
|
||||||
Xpp3Dom config0 = (Xpp3Dom) jdksExtend.getToolchains().get( 0 ).getConfiguration();
|
Xpp3Dom config0 = (Xpp3Dom) jdksExtend.getToolchains().get( 0 ).getConfiguration();
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class AppTest
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rigourous Test :-)
|
* Rigorous Test :-)
|
||||||
*/
|
*/
|
||||||
public void testApp()
|
public void testApp()
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,7 +29,7 @@ under the License.
|
||||||
|
|
||||||
<name>Maven Integration Test :: MNG-3808</name>
|
<name>Maven Integration Test :: MNG-3808</name>
|
||||||
<description>
|
<description>
|
||||||
Test the reports are executeed in the order given in the POM.
|
Test the reports are executed in the order given in the POM.
|
||||||
</description>
|
</description>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -23,7 +23,7 @@ under the License.
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This minimalistic POM tests mere inheritance from its parent.
|
This minimalist POM tests mere inheritance from its parent.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
|
|
|
@ -23,7 +23,7 @@ under the License.
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This minimalistic POM tests mere inheritance from its parent. The <prerequisites> should not be inherited.
|
This minimalist POM tests mere inheritance from its parent. The <prerequisites> should not be inherited.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
|
|
|
@ -27,7 +27,7 @@ under the License.
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
|
||||||
<name>Maven Integration Test :: it0043</name>
|
<name>Maven Integration Test :: it0043</name>
|
||||||
<description>Test for repository inheritence - ensure using the same id overrides the defaults</description>
|
<description>Test for repository inheritance - ensure using the same id overrides the defaults</description>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue