Hi Cameleers,
I think I've found the core issue and committed a solution, we'll see
how the build goes.

The issue was that we were using <classifier> to reference a javadoc
dependency, whereas we should be using <type>. I think when a
multi-module Maven build is run without the goal that produces the
artifact the <classifier> resolves the dependency as pointing to the
modules `target/classes` directory instead of the artifact that is
previously built, cached or available in a remote repository. This
changes if the artifact is already present in the Maven reactor, and
then it points to the artifact built in the target directory. And
again it changes if <classifier> is switched with <type> to resolve
from local repository or, I would assume, from remote repository.

I could see this when running `mvn -X install` and `mvn -X test` -
that would fail; in `components/camel-as2` directory. The first would
output:

[DEBUG] Adding project path
file:/.../components/camel-as2/camel-as2-api/target/camel-as2-api-2.22.0-SNAPSHOT-javadoc.jar

And the second would output:

[DEBUG] Adding project path
file:/.../components/camel-as2/camel-as2-api/target/classes/

This changed when I changed the <classifier> to a <type> and now when
I run `mvn test` the javadoc dependency is picked up from my local
repository:

[DEBUG] Adding project path
file:/.../.m2/repository/org/apache/camel/camel-as2-api/2.22.0-SNAPSHOT/camel-as2-api-2.22.0-SNAPSHOT-javadoc.jar

I've changed all components that had <classifier>javadoc</classifier>
to <type>javadoc</type>, I hope this helps :)

zoran

On Sun, May 6, 2018 at 8:08 PM, Pascal Schumacher
<pascalschumac...@gmx.net> wrote:
> As the failure still occurs, I took a look and was able to replicate it
> locally.
>
> It occurs if I execute |"mvn test|" (like jenkins does) and do not have
> |camel-as2-api-2.22.0-SNAPSHOT-javadoc.jar| in my local maven repository.
>
> If I execute |"mvn install|" the build works.
>
> For some reason the javadoc artifact is not downloaded from the camel
> snapshot repository.
>
> What is confusing me, is that the build of |camel-box| does not display the
> same problem, even though is very similar.
>
>
>
> Am 02.05.2018 um 09:18 schrieb Claus Ibsen:
>>
>> Hi
>>
>> Andrea found out that missing docs is a problem, so we can just add an
>> basic doc file in the src/main/docs folder to make the build work.
>>
>> Andrea maybe you can do this?
>>
>> On Sun, Apr 29, 2018 at 2:42 PM, Pascal Schumacher
>> <pascalschumac...@gmx.net> wrote:
>>>
>>> Hello everybody,
>>>
>>> since the camel-as2 component was added, all master builds on
>>> builds.apache.org fail with:
>>>
>>> [INFO] BUILD FAILURE
>>> ...
>>> [ERROR] Failed to execute goal
>>>
>>> org.apache.camel:camel-api-component-maven-plugin:2.22.0-SNAPSHOT:fromApis
>>> (generate-test-component-classes) on project camel-as2:
>>> Error generating source for
>>> org.apache.camel.component.as2.api.AS2ClientManager:
>>> No public non-static methods found, make sure Javadoc is available as
>>> project test dependency -> [Help 1]
>>> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
>>> goal
>>>
>>> org.apache.camel:camel-api-component-maven-plugin:2.22.0-SNAPSHOT:fromApis
>>> (generate-test-component-classes) on project camel-as2:
>>> Error generating source for
>>> org.apache.camel.component.as2.api.AS2ClientManager: No public non-static
>>> methods found, make sure Javadoc is available as project test dependency
>>>
>>> See e.g.:
>>>
>>> https://builds.apache.org/view/C/view/Apache%20Camel/job/Camel/job/master/256/console
>>>
>>> I guess something was forgotten when adding the component? It would be
>>> great
>>> if somebody could fix this.
>>>
>>> Thanks,
>>>
>>> Pascal
>>>
>>
>>
>



-- 
Zoran Regvart

Reply via email to