Delany,

What goal do you invoke to get this? "mvn validate"?
Do you have any plugin bound to this phase?

T

On Tue, Mar 26, 2024 at 3:54 PM Delany <[email protected]> wrote:

> If a pom says it has a dependency "<version>2.4.1-SNAPSHOT</version>" then
> I don't want the validation failing in offline mode because
> "2.4.1-20240322.141808-12 has not been downloaded".
> Delany
>
>
> On Tue, 26 Mar 2024 at 16:15, Tamás Cservenák <[email protected]> wrote:
>
> > Delany,
> >
> > What do you mean by "All SNAPSHOT versions are equal"?
> >
> > T
> >
> > On Tue, Mar 26, 2024 at 10:33 AM Delany <[email protected]>
> > wrote:
> >
> > > Ok, I want to validate various aspects of the project without going
> > network
> > > since there are a lot of modules, some of them quite big, and they get
> > > rebuilt every day, so its hundreds of Mb that get updated.
> > > I want to check the well-formedness of the pom.xml files, sort them,
> also
> > > run a yak4j-filename-conventions-maven-plugin, etc.
> > > All things to do with the integrity of the files and the configuration
> > > model that's unrelated to classes and dependencies.
> > > Probably a lot of these should actually be handled with git hooks, but
> > for
> > > various reasons that's not currently an option.
> > > I'm looking for a button to push that will say "All SNAPSHOT versions
> are
> > > equal". And you can add to that "from any repository".
> > > I get why you wouldn't want to introduce that though. Thanks for
> > answering.
> > > Delany
> > >
> > >
> > > On Tue, 26 Mar 2024 at 10:49, Tamás Cservenák <[email protected]>
> > wrote:
> > >
> > > > Howdy,
> > > >
> > > > you are conflating several things here:
> > > > - timestamped snapshots are coming from remote (as locally installed
> > ones
> > > > are NOT timestamped), these snapshots can be resolved ONLY via
> metadata
> > > > - artifact origin tracking: if artifact A was downloaded from
> > repository
> > > > R1, a subsequent build run on same local repo that does not have R1
> > > defined
> > > > (obviously, R1 cannot be central) will NOT have A reported as
> > "available"
> > > > only as it is present on disk (Maven2 did this, Maven3 fixed did
> this).
> > > > - update policy is unrelated to both above
> > > >
> > > > Hence, to me your question does not make sense.
> > > > Let me reverse: what is your goal you want to achieve?
> > > >
> > > > T
> > > >
> > > > On Mon, Mar 25, 2024 at 9:21 AM Delany <[email protected]>
> > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I have a bunch of plugins like enforcer that I want to run with
> `mvn
> > > > > validate -o` but I get
> > > > > Cannot access *repo* in offline mode and the artifact
> > > > > *artifact*:jar:2.4.1-20240322.141808-12 has not been downloaded
> from
> > it
> > > > > before
> > > > >
> > > > > There are snapshots of that artifact available in local maven repo,
> > > just
> > > > > not that specific one.
> > > > > I thought changing the updatePolicy to NEVER would solve this, but
> > the
> > > > new
> > > > > enforcer (which now uses resolver) fails nonetheless.
> > > > >
> > > > > Is there a way to get resolver to treat all snapshots as equal in
> > > offline
> > > > > mode? Is there a reason this isn't the default?
> > > > >
> > > > > Thanks,
> > > > > Delany
> > > > >
> > > >
> > >
> >
>

Reply via email to