Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Cannot add artifact descriptor which has not been created by this repository

I found the issue.

Basically for some reason (project needs) I had to change the "sourceDirectory" and the "outputDirectory" of the project, pointing them to the classic "src" and "bin" instead of the classic maven "src/main" and "target".

In particular, what was causing the issue was the redefinition of the <outputDirectory> property and the <directory> one. It looks like Tycho does not like it at all.

Thanks,
Alessio

On Tue, Jan 19, 2016 at 3:18 PM, Alessio Di Fazio <alessio.difazio@xxxxxxxxxxxxx> wrote:
Hi Patrik,

thanks for your suggestion. Unfortunately I cannot add the "other project" pom files in the same reactor chain since I have no access to those sources. I resolve them via a P2 repository provided by another entity. The P2 is a normal one like a classic Eclipse project. 

I crosschecked and I can tell you that in my "build pom" I have all the modules of my project. I also noticed during a debug session that the same problem is triggered by one of my fragments (so not only the fragments coming from the "other project").

Best Regards,
Alessio Di Fazio

On Tue, Jan 19, 2016 at 3:04 PM, Patrik Suzzi <psuzzi@xxxxxxxxx> wrote:
Alessio,

It sounds like Tycho can't reference the other project as it is not in
the same reactor.

Have you tried to tweak YourProject.parent by adding a reference to
the OtherProject.parent as module ?

As example, in my case, MyProject.parent/pom.xml is declaring the
OtherProject.parent/pom.xml as a module.

<modules>
<module>../MyProject</module>
<module>../OtherProject.parent</module>
<module>../MyProject.test</module>
<module>../MyProject.feature</module>
<module>../MyProject.repository</module>
</modules>

Let me know if this work.

Kind Regards,

Patrik Suzzi
R&D Software Engineer.
https://about.me/psuzzi


On Tue, Jan 19, 2016 at 2:45 PM, Alessio Di Fazio
<alessio.difazio@xxxxxxxxxxxxx> wrote:
> Hi,
>
> I'm new here in this mailing list. I have used Tycho several times with
> success but now I'm facing an error I have no idea how to fix, even after
> several attempts.
>
> I have a project with a set of plugins and fragments and it refers to
> another framework which is composed by a set of plugins and fragments as
> well as mine. Mine extends the other one which is of course based on Eclipse
> (Luna).
>
> I'm using Tycho 0.24.0 and when it comes the time to packetize my product,
> the Maven build fail with the following error:
>
> [ERROR] Failed to execute goal
> org.eclipse.tycho:tycho-p2-repository-plugin:0.24.0:assemble-repository
> (default-assemble-repository) on project XXXXXX.hci.product: Execution
> default-assemble-repository of goal
> org.eclipse.tycho:tycho-p2-repository-plugin:0.24.0:assemble-repository
> failed: Cannot add artifact descriptor which has not been created by this
> repository -> [Help 1]
>
> I was digging into the source code (even using the remote debug) and the
> error occurs in the file ModuleArtifactRepository.java at line 169.
>
> Here's the snippet:
> @Override
> protected ModuleArtifactDescriptor
> getInternalDescriptorForAdding(IArtifactDescriptor descriptor)
>         throws IllegalArgumentException {
>     if (descriptor == null) {
>         throw new NullPointerException();
>     } else if (!(descriptor instanceof ModuleArtifactDescriptor) ||
> descriptor.getRepository() != this) {
>         throw new IllegalArgumentException(
>                 "Cannot add artifact descriptor which has not been created
> by this repository");
>     }
>
> In my case the descriptor.getRepository() is not this. In particular it
> happens with the fragments.
>
> Thanks.
> Alessio
>
> _______________________________________________
> tycho-user mailing list
> tycho-user@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit
> https://dev.eclipse.org/mailman/listinfo/tycho-user
_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user



--

Alessio Di Fazio
Software Architect
Business Unit E-SPACE & Geo Information 

CS Systèmes d'Information
ECOS Office center - Berliner Allee 65
D-64295 Darmstadt - GERMANY
Tel : +49 6151 3975 208
Email : alessio.difazio@xxxxxxxxxxxxx



--

Alessio Di Fazio
Software Architect
Business Unit E-SPACE & Geo Information 

CS Systèmes d'Information

ECOS Office center Darmstadt - Campus Berliner Allee
Berliner Allee 65
D-64295 Darmstadt - GERMANY
Tel : +49 6151 3975 208
Email : alessio.difazio@xxxxxxxxxxxxx

Back to the top