When the component diagram gets a bit more complex, it seems that the ports are misplaced.
They are not any more connected to the edge of the corresponding component they belong to.
Try this example, please ("123", "q7" and "EE" should be connected to the edge of "x1"):
@startuml
package "x11" {
component "x1" {
[Controller]
[cx]
[Ba]
[Q]
[Q] --> Ba
port 123
[Controller] --> 123
port EE
cx--> EE
port Q7
}
component "q1" {
port k
}
Q7 --> k
component "App" {
port API
}
123 --> API
}
cloud u {
port xx
}
EE --> xx
@enduml