On Wed, 2023-07-05 at 14:04 +0200, Carsten Ziegeler wrote: > Hi Robert, > > On 05.07.2023 13:17, Robert Munteanu wrote: > > > > The bundle is not added automatically, it's defined in a feature > > file, > > see [4]. > > > If the project is of type "bundle" or "jar", the main artifact > (bundle) > should be added automatically to the feature, see: > > https://github.com/apache/sling-slingfeature-maven-plugin/blob/master/src/main/java/org/apache/sling/feature/maven/Preprocessor.java#L152
That simplifies things, thanks! > > > Thinking about it some more, we already have the 'repository' goal > > for > > the slingfeature-maven-plugin. To keep the plug-ins focused I think > > the > > ideal flow would be: > > > > a. slingfeature-maven-plugin creates the complete repository after > > the > > bundle is packaged > > b. feature-launcher-maven-plugin launches with the single > > repository > > url set to the above-created repository > > > > b. is something I can add, but unfortunately a. does not seem to > > work > > yet. > > > > When the slingfeature-maven-plugin creates a repository that > > includes > > the project currenly being built, it always looks under > > target/classes > > for it. > > > I think this is something we should fix, I can try to have a look at > it I created https://issues.apache.org/jira/browse/SLING-11932, with steps to reproduce. I don't have a standalone project yet, but you think that will help I can create one. Thanks, Robert > > Regards > Carsten > > > The simplest configuration is > > > > <repositories> > > <repository> > > <embedArtifact> > > <groupId>${project.groupId}</groupId> > > <artifactId>${project.artifactId}</artifactId> > > <version>${project.version}</version> > > </embedArtifact> > > </repository> > > </repositories> > > > > When building, the following error is reported > > > > [ERROR] Failed to execute goal org.apache.sling:slingfeature-maven- > > plugin:1.7.0:repository (create-repository) on project > > org.apache.sling.servlets.oidc-rp: Execution create-repository of > > goal > > org.apache.sling:slingfeature-maven-plugin:1.7.0:repository failed: > > Parameter 'srcFile' is not a file: > > /home/robert/sources/apache/sling/whiteboard/org.apache.sling.servl > > ets. > > oidc-rp/target/classes > > > > I checked with the maven-dependency-plugin and is able to copy the > > project dependency as a jar file after it has been packaged, so it > > seems like there is an opportunity to improve things. > > > > Do you think this is something worth fixing in the slingfeature- > > maven- > > plugin? Then the improvement for the feature-launcher-maven-plugin > > would make sense and close the gap on this particular usage > > scenario. > > > > Thanks, > > Robert > > > > [4]: > > https://github.com/apache/sling-whiteboard/blob/6c7a129f1d59b759727ec7d469107e03fc331670/org.apache.sling.servlets.oidc-rp/src/main/features/main.json#L31-L34 > > > >
