Hi.. Welcome to healthcaremagic community forum..
You haven't mentioned your age??
for more than a year is of concern.. Possibilities of infection and inflammation are to be considered. If you are a smoker with history of lung cancer's in family, cancer is also a possibility. Without a chest examination and radioimaging findings, its hard to specify a single cause.
I recommend you to get a chest Xray and a chest examination.
Report back with the findings of chest xray for more information..