Anton, Vyacheslav — are you proposing assembly process shift to package phase, 
yet leaving the special profile for assembly itself?



> On 1 Mar 2018, at 14:36, Vyacheslav Daradur <daradu...@gmail.com> wrote:
> 
> I agree with Anton, especially with the following statement:
>>> Ignite should be assemblied using package phase,
>>> not install in case you want only to assembly it.
> 
> Approach with "install" phase may lead to hidden issues in a
> development environment.
> 
> On Thu, Mar 1, 2018 at 2:26 PM, Nikolay Izhikov <nizhi...@apache.org> wrote:
>>> May be it will be enough to add a profile to parent pom.xml which
>> activates on deploy stage only.
>> 
>> I think it will be enough to solve my issue.
>> 
>>> What pom.xml becomes flattened, what is removed from it and how it effects
>> other modules of the same project?
>> 
>> pom.xml that are installed to local repository is flattened.
>> 
>>> Yet, I still do not get a mechanism that causes a problem.
>> 
>> If you want to reproduce it, just do the following steps:
>> 
>> 1. remove spark dependencies with `scope=test` from `spark/pom.xml`
>> 
>> 2. run:
>> 
>> `~/src/ignite/modules/spark> mvn install -U
>> -Plgpl,examples,scala,-clean-libs,-release,ml
>> -Dtest=org.apache.ignite.testsuites.IgniteRDDTestSuite
>> -Dmaven.javadoc.skip=true -DfailIfNoTests=false`
>> 
>> It will execute OK, because maven uses pom.xml from source.
>> 
>> 3. run(only root dir is changed)
>> 
>> `~/src/ignite/> mvn install -U
>> -Plgpl,examples,scala,-clean-libs,-release,ml
>> -Dtest=org.apache.ignite.testsuites.IgniteRDDTestSuite
>> -Dmaven.javadoc.skip=true -DfailIfNoTests=false`
>> 
>> Test will fail with ClassNoDefFoundError because maven will use
>> pom.xml from local repository which is flattened.
>> 
>> 4. remove flatten plugin from `parent/pom.xml`. Re Install parent pom.
>> Retry step 3. It will succeed.
>> 
>> 
>> 2018-03-01 14:18 GMT+03:00 Petr Ivanov <mr.wei...@gmail.com>:
>> 
>>> May be it will be enough to add a profile to parent pom.xml which
>>> activates on deploy stage only.
>>> 
>>> Yet, I still do not get a mechanism that causes a problem. What pom.xml
>>> becomes flattened, what is removed from it and how it effects other modules
>>> of the same project?
>>> 
>>> 
>>> 
>>>> On 1 Mar 2018, at 14:06, Nikolay Izhikov <nizhi...@apache.org> wrote:
>>>> 
>>>> Andrey, thank you.
>>>> 
>>>> If there are no other objections I will create ticket for pom structure
>>>> refactoring.
>>>> 
>>>> Anton, can you help me with it as an Ignite Release Manager?
>>>> 
>>>> 2018-03-01 13:45 GMT+03:00 Andrey Novikov <anovi...@apache.org>:
>>>> 
>>>>> Nikolay,
>>>>> 
>>>>> I think it can be removed, if parent-pom will be installed(deployed).
>>>>> 
>>>>> On Thu, Mar 1, 2018 at 5:05 PM, Nikolay Izhikov <nizhi...@apache.org>
>>>>> wrote:
>>>>>> Hello, Andrey.
>>>>>> 
>>>>>> Thanks for an answer.
>>>>>> 
>>>>>>> As I remember we use `flatten-maven-plugin` for flattening and
>>> removing
>>>>> parent relationship in deployed artifacts
>>>>>> 
>>>>>> So we need it only in `release` profile?
>>>>>> 
>>>>>> I found some earlier discussion about plugin [1]
>>>>>> 
>>>>>>> in first versions of build, version was stored in variable in parent
>>> pom
>>>>>> 
>>>>>> Got it. Do we need this plugin now?
>>>>>> 
>>>>>> [1] http://apache-ignite-developers.2346864.n4.nabble.
>>>>> com/Difference-between-pom-xml-and-pom-installed-xml-td2171.html
>>>>>> 
>>>>>> В Чт, 01/03/2018 в 16:59 +0700, Andrey Novikov пишет:
>>>>>>> Nikolay,
>>>>>>> 
>>>>>>> As I remember we use `flatten-maven-plugin` for flattening and
>>>>>>> removing parent relationship in deployed artifacts (parent pom does
>>>>>>> not deploy to repository and in first versions of build, version was
>>>>>>> stored in variable in parent pom)
>>>>>>> 
>>>>>>> On Thu, Mar 1, 2018 at 4:57 PM, Nikolay Izhikov <nizhi...@apache.org>
>>>>> wrote:
>>>>>>>> Hello, Petr.
>>>>>>>> 
>>>>>>>>> Can you describe your problem
>>>>>>>> 
>>>>>>>> In Ignite, maven doesn't include transitive dependencies to test
>>>>> classpath.
>>>>>>>> So we have enlist all dependencies in project pom.xml.
>>>>>>>> 
>>>>>>>>> desired behaviour
>>>>>>>> 
>>>>>>>> All I want is default maven behavior.
>>>>>>>> 
>>>>>>>> Please, take a look at pom.xml [1] from line 144.
>>>>>>>> There is a long list of dependencies with `test` scope.
>>>>>>>> Actually, all of them are available as a transitive dependency from
>>>>> `spark-core`.
>>>>>>>> 
>>>>>>>> We doesn't have to enlist them in every other project that doesn't
>>>>> use `flatten-plugin`.
>>>>>>>> 
>>>>>>>> [1] https://github.com/apache/ignite/blob/master/modules/
>>>>> spark/pom.xml#L144
>>>>>>>> 
>>>>>>>> В Чт, 01/03/2018 в 11:49 +0300, Petr Ivanov пишет:
>>>>>>>>> Nikolay,
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> Can you describe your problem and desired behaviour more
>>>>> thoroughly, please?
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>>> On 28 Feb 2018, at 21:16, Nikolay Izhikov <nizhi...@apache.org>
>>>>> wrote:
>>>>>>>>>> 
>>>>>>>>>> Hello, Igniters.
>>>>>>>>>> 
>>>>>>>>>> We have `flatten-maven-plugin` in `parent/pom.xml` [1]
>>>>>>>>>> As far as I can understand it minimize pom.xml before it
>>>>> installed in repository.
>>>>>>>>>> 
>>>>>>>>>> It introduce some strange behavior in modules:
>>>>>>>>>> 
>>>>>>>>>> I must to enlist all test dependencies in my module to get tests
>>>>> work.
>>>>>>>>>> Otherwise tests fails with ClassNoDefFoundError for transitive
>>>>> dependencies.
>>>>>>>>>> It happens in `spark` [2] and `spark_2.10` [3] modules.
>>>>>>>>>> Now, when I want to enable testing of Spark Examples I has to
>>>>> enlist same dependencies in `examples/pom.xml`
>>>>>>>>>> 
>>>>>>>>>> It looks like a mess for me.
>>>>>>>>>> 
>>>>>>>>>> Please, help me:
>>>>>>>>>> 
>>>>>>>>>> 1. Am I miss something and can make pom.xml much clearer?
>>>>>>>>>> 
>>>>>>>>>> 2. Why we need to minimize pom.xml? It looks like other Apache
>>>>> project doesn't do it [5].
>>>>>>>>>> 
>>>>>>>>>> [1] https://github.com/apache/ignite/blob/master/parent/pom.
>>>>> xml#L612
>>>>>>>>>> [2] https://github.com/apache/ignite/blob/master/modules/
>>>>> spark/pom.xml#L144
>>>>>>>>>> [3] https://github.com/apache/ignite/blob/master/modules/
>>>>> spark-2.10/pom.xml#L150
>>>>>>>>>> [4] https://github.com/apache/ignite/pull/3590/files#diff-
>>>>> 08740066c64337d38cccd84991ac0912R155
>>>>>>>>>> [5] http://central.maven.org/maven2/org/apache/kafka/kafka_
>>>>> 2.12/1.0.0/kafka_2.12-1.0.0.pom
>>>>>>>>> 
>>>>>>>>> 
>>>>> 
>>> 
>>> 
> 
> 
> 
> -- 
> Best Regards, Vyacheslav D.

Reply via email to