[ARCH-2] module cli in created project, checkstyle fail. Created: 31/May/18  Updated: 08/Jun/18  Resolved: 08/Jun/18

Status: Done
Project: archetypes
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Medium
Reporter: Geng Xingyuan Assignee: Michael Vorburger
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

package order checkstyle fail if you set groupId as com.xxx

 

import org.apache.karaf.shell.commands.Command;
import org.apache.karaf.shell.commands.Option;
import org.apache.karaf.shell.console.AbstractAction;
import com.future.network.cli.api.HelloCliCommands;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

 



 Comments   
Comment by Michael Vorburger [ 08/Jun/18 ]

xygeng you are right. This is because the order is fixed here:

https://github.com/opendaylight/archetypes/blob/master/opendaylight-startup/src/main/resources/archetype-resources/cli/src/main/java/__packageInPathFormat__/cli/commands/__classPrefix__CliTestCommand.java#L16

it works for org.opendaylight but that import line needs to be manually moved for com.future.

There is no obvious easy fix for this (if we moved it, it would work for com.future, but break org.opendaylight), so I'll close this.

If you have an idea how the Maven archetype could be made smarter to handle this, then we would welcome your contribution to the project!

Generated at Wed Feb 07 19:09:20 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.