Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"fast" profile does not disable "skip-validate-sources" #2848

Closed
ibuziuk opened this issue Oct 20, 2016 · 5 comments
Closed

"fast" profile does not disable "skip-validate-sources" #2848

ibuziuk opened this issue Oct 20, 2016 · 5 comments
Labels
kind/enhancement A feature request - must adhere to the feature request template.

Comments

@ibuziuk
Copy link
Member

ibuziuk commented Oct 20, 2016

After some tests of this profile it looks like -Pfast is not disabling the validate source profile

using -Dskip-validate-sources is working but using -Pfast not

$ mvn -Pfast help:active-profiles |grep validate-sources
 - validate-sources (source: org.eclipse.che.parent:maven-parent-pom:5.0.0-M6-SNAPSHOT)
 - validate-sources (source: org.eclipse.che.parent:maven-parent-pom:5.0.0-M6-SNAPSHOT)
 - validate-sources (source: org.eclipse.che.parent:maven-parent-pom:5.0.0-M6-SNAPSHOT)

$ mvn -Pfast -Dskip-validate-sources help:active-profiles |grep validate-sources
Expected behavior:
It is expected that using "fast" profile will disable "skip-validate-sources"

Che version: [5.0.0-M6]
OS and version: [All]

Additional information:
more details can be found in the #2733

@ibuziuk
Copy link
Member Author

ibuziuk commented Oct 20, 2016

Basically, one can not activate a profile when another one is activated (chaining activation is prohibited in maven). skip-validate-sources actually enables another profile - https://github.com/eclipse/che-parent/blob/master/pom.xml#L1651

Also it is not possible to configure OR logic for profile activation -

      <profile>
            <id>validate-sources</id>
            <activation>
                <property>
                    <name>!skip-validate-sources</name>
                    <name>fast</name>
                </property>
            </activation>

it used to be possible before v3.2.2 but now it is "fixed" - https://issues.apache.org/jira/browse/MNG-4565

For now it is not possible to configure OR condition for maven profile activation unless using a copy-paste approach - having two identical profiles with different activation logic. At the same time, chaining profile activation is also prohibited. So, there are two possible things we can do:

  1. Remove skip-validate-source from fast profile (using the profile would include resource validation step )
  2. duplicate skip-validate-source profile with different activation logic e.g.
<activation>
  <property>
    <name>fast</name>
  </property>
</activation>

and change fast profile activation logic the same^ way - after that it would be possible to use "-Dfast" for acctivation

WDYT ?

@TylerJewell
Copy link

I think your proposal on #1 is a good enough work around. Skipping validation doesn't buy you that much time.

@TylerJewell TylerJewell added the kind/enhancement A feature request - must adhere to the feature request template. label Oct 20, 2016
@ibuziuk
Copy link
Member Author

ibuziuk commented Oct 20, 2016

@TylerJewell agree, PR for removing "skip-validate-sources" from "fast" maven profile has been sent.
It would be great if some one with maven experience confirm that there is no other options for tackling the issue

@TylerJewell
Copy link

@skabashnyuk will chime in at some point - went ahead and merged the change so that we have it for now.

@ibuziuk
Copy link
Member Author

ibuziuk commented Oct 20, 2016

@TylerJewell great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template.
Projects
None yet
Development

No branches or pull requests

2 participants