You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Brett Porter <br...@apache.org> on 2005/11/03 22:15:05 UTC
Re: svn commit: r330634 - /maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java
Where is the test?
There are already a set of unit tests for scoping, this needs to be
added. The behaviour also need sto be documented (with a reason) so that
it doesn't later get changed for someone using it differently.
- Brett
jdcasey@apache.org wrote:
> Author: jdcasey
> Date: Thu Nov 3 13:09:08 2005
> New Revision: 330634
>
> URL: http://svn.apache.org/viewcvs?rev=330634&view=rev
> Log:
> Fixing problem with system scope being overridden by transitive parent's scope. System scope is always preserved now.
>
> Modified:
> maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java
>
> Modified: maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java
> URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java?rev=330634&r1=330633&r2=330634&view=diff
> ==============================================================================
> --- maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java (original)
> +++ maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java Thu Nov 3 13:09:08 2005
> @@ -127,11 +127,6 @@
> // added to retain compile scope. Remove if you want compile inherited as runtime
> desiredScope = Artifact.SCOPE_COMPILE;
> }
> - else if ( Artifact.SCOPE_SYSTEM.equals( scope ) )
> - {
> - // system scopes come through unchanged...
> - desiredScope = Artifact.SCOPE_SYSTEM;
> - }
>
> if ( Artifact.SCOPE_TEST.equals( inheritedScope ) )
> {
> @@ -143,6 +138,12 @@
> desiredScope = Artifact.SCOPE_PROVIDED;
> }
>
> + if ( Artifact.SCOPE_SYSTEM.equals( scope ) )
> + {
> + // system scopes come through unchanged...
> + desiredScope = Artifact.SCOPE_SYSTEM;
> + }
> +
> ArtifactHandler handler = artifactHandlerManager.getArtifactHandler( type );
>
> return new DefaultArtifact( groupId, artifactId, versionRange, desiredScope, type, classifier, handler,
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: svn commit: r330634 - /maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java
Posted by Jesse McConnell <je...@gmail.com>.
it was a tiny bit convoluted, took a while to explain it clearly
thanks though jdcasey
On 11/3/05, John Casey <jd...@commonjava.org> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I'll go back and add a test tonight.
>
> Brett Porter wrote:
> | Where is the test?
> |
> | There are already a set of unit tests for scoping, this needs to be
> | added. The behaviour also need sto be documented (with a reason) so that
> | it doesn't later get changed for someone using it differently.
> |
> | - Brett
> |
> | jdcasey@apache.org wrote:
> |
> |> Author: jdcasey
> |> Date: Thu Nov 3 13:09:08 2005
> |> New Revision: 330634
> |>
> |> URL: http://svn.apache.org/viewcvs?rev=330634&view=rev
> |> Log:
> |> Fixing problem with system scope being overridden by transitive
> |> parent's scope. System scope is always preserved now.
> |>
> |> Modified:
> |>
> |>
>
> maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java
>
> |>
> |>
> |> Modified:
> |>
>
> maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java
>
> |>
> |> URL:
> |>
>
> http://svn.apache.org/viewcvs/maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java?rev=330634&r1=330633&r2=330634&view=diff
>
> |>
> |>
>
> ==============================================================================
>
> |>
> |> ---
> |>
>
> maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java
>
> |> (original)
> |> +++
> |>
>
> maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java
>
> |> Thu Nov 3 13:09:08 2005
> |> @@ -127,11 +127,6 @@
> |> // added to retain compile scope. Remove if you want
> |> compile inherited as runtime
> |> desiredScope = Artifact.SCOPE_COMPILE;
> |> }
> |> - else if ( Artifact.SCOPE_SYSTEM.equals( scope ) )
> |> - {
> |> - // system scopes come through unchanged...
> |> - desiredScope = Artifact.SCOPE_SYSTEM;
> |> - }
> |>
> |> if ( Artifact.SCOPE_TEST.equals( inheritedScope ) )
> |> {
> |> @@ -143,6 +138,12 @@
> |> desiredScope = Artifact.SCOPE_PROVIDED;
> |> }
> |>
> |> + if ( Artifact.SCOPE_SYSTEM.equals( scope ) )
> |> + {
> |> + // system scopes come through unchanged...
> |> + desiredScope = Artifact.SCOPE_SYSTEM;
> |> + }
> |> + ArtifactHandler handler =
> |> artifactHandlerManager.getArtifactHandler( type );
> |>
> |> return new DefaultArtifact( groupId, artifactId,
> |> versionRange, desiredScope, type, classifier, handler,
> |>
> |>
> |
> | ---------------------------------------------------------------------
> | To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> | For additional commands, e-mail: dev-help@maven.apache.org
> |
> |
> |
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.6 (GNU/Linux)
>
> iD8DBQFDapstK3h2CZwO/4URApwFAKCh2aB9sXY516DrgUNW0Ul/HwPhVQCgkWPg
> ZBtRaZ1KXVxH61dpfPQoCxI=
> =A6Zk
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
--
jesse mcconnell
jesseDOTmcconnellATgmailDOTcom
Re: svn commit: r330634 - /maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java
Posted by John Casey <jd...@commonjava.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'll go back and add a test tonight.
Brett Porter wrote:
| Where is the test?
|
| There are already a set of unit tests for scoping, this needs to be
| added. The behaviour also need sto be documented (with a reason) so that
| it doesn't later get changed for someone using it differently.
|
| - Brett
|
| jdcasey@apache.org wrote:
|
|> Author: jdcasey
|> Date: Thu Nov 3 13:09:08 2005
|> New Revision: 330634
|>
|> URL: http://svn.apache.org/viewcvs?rev=330634&view=rev
|> Log:
|> Fixing problem with system scope being overridden by transitive
|> parent's scope. System scope is always preserved now.
|>
|> Modified:
|>
|>
maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java
|>
|>
|> Modified:
|>
maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java
|>
|> URL:
|>
http://svn.apache.org/viewcvs/maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java?rev=330634&r1=330633&r2=330634&view=diff
|>
|>
==============================================================================
|>
|> ---
|>
maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java
|> (original)
|> +++
|>
maven/components/trunk/maven-artifact/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java
|> Thu Nov 3 13:09:08 2005
|> @@ -127,11 +127,6 @@
|> // added to retain compile scope. Remove if you want
|> compile inherited as runtime
|> desiredScope = Artifact.SCOPE_COMPILE;
|> }
|> - else if ( Artifact.SCOPE_SYSTEM.equals( scope ) )
|> - {
|> - // system scopes come through unchanged...
|> - desiredScope = Artifact.SCOPE_SYSTEM;
|> - }
|>
|> if ( Artifact.SCOPE_TEST.equals( inheritedScope ) )
|> {
|> @@ -143,6 +138,12 @@
|> desiredScope = Artifact.SCOPE_PROVIDED;
|> }
|>
|> + if ( Artifact.SCOPE_SYSTEM.equals( scope ) )
|> + {
|> + // system scopes come through unchanged...
|> + desiredScope = Artifact.SCOPE_SYSTEM;
|> + }
|> + ArtifactHandler handler =
|> artifactHandlerManager.getArtifactHandler( type );
|>
|> return new DefaultArtifact( groupId, artifactId,
|> versionRange, desiredScope, type, classifier, handler,
|>
|>
|
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
| For additional commands, e-mail: dev-help@maven.apache.org
|
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQFDapstK3h2CZwO/4URApwFAKCh2aB9sXY516DrgUNW0Ul/HwPhVQCgkWPg
ZBtRaZ1KXVxH61dpfPQoCxI=
=A6Zk
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org