Re: Artifact "has been attached with deprecated code" warning
On 06/06/17 23:24, Guillaume Boué wrote:
> Thanks for confirming this Karl. So in this case, I think that part of
> the code in maven-artifact-transfer can be safely deleted (calling
> setRepository and catching an exception). The repository to deploy to is
> set on the main artifact and, even if it didn't throw an exception,
> there would be no need to set the same again for its attached artifacts,
> What do you think?
Sure that's correct..
Karl Heinz Marbaise
> Le 06/06/2017 à 22:53, Karl Heinz Marbaise a écrit :
>> On 06/06/17 22:38, Guillaume Boué wrote:
>>> In the new API ProjectDeployer (in maven-artifact-transfer), I
>>> noticed the default implementation raises a warning in the case that
>>> it cannot set the repository to an attached artifact:
>> Yes this code has been "stolen" from the maven-deploy-plugin which
>> means we need to adapt the implementation to get it correctly working...
>> We don't have reached 1.0.0 release so we can change it ...and fix the
>> other plugins which already used the maven-artifact-transfer...
>> So first changing the maven-artifact-transfer component......and
>> afterwards going forward for maven-deploy-plugin and
>> Kind regards
>> Karl Heinz Marbaise
>>> https://github.com/apache/maven-shared/blob/f45e7ad855acfb5d29e7c2b79c6ae57729602133/maven-artifact-transfer/src/main/java/org/apache/maven/shared/project/deploy/internal/DefaultProjectDeployer.java#L129-L138 >>>
>>> I'm not sure I understand this warning correctly. It seems to come
>>> from the fact that an attached artifact is represented by an instance
>>> of the AttachArtifact class, that is deprecated with Maven 3, and
>>> this class always throws an exception when trying to set a repository
>>> to it. But with all current Maven 3 versions, the MavenProjectHelper,
>>> which is used to attach artifact to a project, relies on this class
>>> and so this warning looks inevitable.
>>> If so, why is the warning pointing to "responsible plugin" when this
>>> comes from maven-core itself? And, if I'm not mistaken, should this
>>> really be a warning when the user doesn't seem to be able to do
>>> anything about it?
>>> I noticed it when using latest 3.0.0-SNAPSHOT of the Deploy Plugin:
>>> the warning is raised for every attach artifact that is deployed.
To unsubscribe, e-mail: [hidden email] For additional commands, e-mail: [hidden email]