How do I execute only the process-sources phase without building the whole maven project?

45 views Asked by At

So according this this: https://maven.apache.org/ref/3.9.4/maven-core/lifecycles.html

I should be able to run something like: mvn process-sources

But it fails, for being unable to resolve an artifact from a module in this project...

And when I run: mvn clean compile OR mvn clean package, etc, they all work.

Am I missing something with Maven?

How do I execute only the process-sources phase without building the whole maven project?

Edit/Addition:

Here is the error output: Failed to execute goal on project alarmsandevents-configuration: Could not resolve dependencies for project com.unnamedcorp.alarmsandevents:alarmsandevents-configuration:jar:23.02.01.1-SNAPSHOT: com.unnamedcorp.alarmsandevents:alarmsandevents-common:jar:23.02.01.1-SNAPSHOT was not found in https://artifactory-na.unnamedcorp.com:443/artifactory/embeddedservices-maven-stable-virtual during a previous attempt.

What I don't understand is why it's looking for an artifact that hasn't been built yet when I run mvn process-sources but when I run mvn compile it doesn't, even though that is a later phase. I thought maven runs all preceeding phases when running one, which should yield the same error.

0

There are 0 answers