In my code during runtime (product building), it calls the default implementation of createArtifact and not the implementation in LegacyRepositorySystem class. Because of this am not getting the correct location of the zip file from the local repository (.m2). How do I fix this so that it pulls from the implementation class (LegacyRepositorySystem), i.e., the same way as tycho-p2-director-plugin in my custom p2 plugin?
As a workaround, I put the following in my product pom but this gives an error [3]. Any idea as to why this is?
[ERROR] Internal error: java.lang.ClassCastException: org.eclipse.tycho.core.osgitools.DefaultReactorProject cannot be cast to org.eclipse.tycho.ReactorProject -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.ClassCastException: org.eclipse.tycho.core.osgitools.DefaultReactorProject cannot be cast to org.eclipse.tycho.ReactorProject
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:121)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.ClassCastException: org.eclipse.tycho.core.osgitools.DefaultReactorProject cannot be cast to org.eclipse.tycho.ReactorProject
at org.eclipse.tycho.core.osgitools.DefaultReactorProject.adapt(DefaultReactorProject.java:45)
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:70)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:266)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
... 11 more
[ERROR]