Re: Artifact "has been attached with deprecated code" warning

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

Re: Artifact "has been attached with deprecated code" warning

Karl Heinz Marbaise-3
Hi Buillaum,

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,
> right?
> What do you think?

Sure that's correct..

Kind regards
Karl Heinz Marbaise

> Guillaume
> Le 06/06/2017 à 22:53, Karl Heinz Marbaise a écrit :
>> Hi,
>> 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
>> maven-install-plugin...
>> Kind regards
>> Karl Heinz Marbaise
>>> 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.
>>> Thanks,
>>> Guillaume

To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]