If a dependency on another project is found, don't parse its
POM again, but instead use the model we already have in memory.
This saves a large amount of time and memory for builds that have
lots of subprojects and dependencies between them.
The approach was directly copied from DefaultArtifactDescriptorReader,
which does the same optimization.
This closes#244
ExcludesArtifactFilter was highly inefficient.
It took the group and artifact ID of an Exclusion, concatenated them into
a new String, which was kept in memory for the whole duration
of the build and then compared that String against the concatenation
of group and artifact ID of each incoming artifact, adding more
CPU cycles than necessary.
Instead we now just wrap the existing Exclusion object and check its
groupId and artifactId against the artifact to tell whether it should
be excluded.
The old class is kept around for binary compatibility, but is now unused.
Closes#243
Switch from OptionBuilder to Option.Builder. Confirm by
inspection that the resulting Option objects are the same.
For now, leave GnuParser. Despite the upgrade advice in the GnuParser
Javadoc ("since 1.3, use the DefaultParser instead"), it behaves
differently.
Closes#247
By not allocating the canonical representation for equals/hashcode,
but instead using the items we already have. This saves both time
and memory.
I left the canonical field around for testing purposes.
* [MNG-6405] Fix basedir in MavenProject.deepCopy.
* Reproduced bug in test.
Failure without patch:
junit.framework.AssertionFailedError: Base directory is preserved across clone expected:<…/maven-core/target/test-classes> but was:<…/maven-core/target/test-classes/target>
at org.apache.maven.project.MavenProjectTest.testCloneWithBaseDir(MavenProjectTest.java:188)
* Code style. Not enforced in tests during build?
ComparableVersion
- Added class IntItem and LongItem for handling numbers lower than 2^31
and 2^63.
- Renamed IntegerItem to BigIntegerItem for handling larger numbers.
- Changed old Stack implementation to LinkedList.
- Changed LinkedList to ArrayDeque.
- Changed thrown RuntimeException by IllegalStateException.
- Ensure numeric values don't have leading zeroes, therefore ensuring
that IntItem, LongItem and BigIntItem represent bigger numeric values,
respectively.
- Only compare item value when the other Item is of the same type.
Otherwise infer comparison result from the quantity of digits of the
numerical value representing the other Item.
- Added tests.