A man discovered growing 251 cannabis plants in a rural outbuilding has been jailed for 14 months and faces being deported.