@@ -0,0 +1,1860 @@
+/*%0A * Copyright (C) 2011, Neticoa SAS France - Tous droits r%C3%A9serv%C3%A9s.%0A * Author(s) : Franck Bonin, Neticoa SAS France%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A *%0A */%0Apackage org.codehaus.mojo;%0A%0Aimport java.io.File;%0Aimport java.util.Iterator;%0Aimport java.util.List;%0Aimport java.util.ArrayList;%0A%0Aimport org.apache.maven.plugin.AbstractMojo;%0Aimport org.apache.maven.project.MavenProject;%0A%0A/**%0A * Add more source directories to the POM.%0A *%0A * @goal addsource%0A * @phase initialize%0A * @author Franck Bonin%0A * @version $Id$%0A * @since 0.0.5%0A * @threadSafe%0A */%0Apublic class AddSourceMojo extends AbstractMojo%0A%7B%0A    /**%0A     * directory were sources are%0A     * %0A     * @parameter%0A     * @since 0.0.4%0A     */%0A    private List sourceDirs = new ArrayList();%0A%0A    /**%0A     * @parameter expression=%22$%7Bproject%7D%22%0A     * @required%0A     * @readonly%0A     * @since 0.0.5%0A     */%0A    private MavenProject project;%0A%0A    public void execute()%0A    %7B   %0A        getLog().info( %22Cxx Maven Plugin AddSource %22 );%0A        Iterator it = sourceDirs.iterator();%0A        while(it.hasNext())%0A        %7B%0A            File source = new File( (String) it.next() );%0A            this.project.addCompileSourceRoot( source.getAbsolutePath() );%0A            getLog().info( %22Source directory: %5C%22%22 + source.getAbsolutePath() + %22%5C%22 added to Maven Project.%22 );              %0A        %7D%0A    %7D%0A%7D%0A%0A

Revert "Revert "tracks multiple source dirs inside maven configuration with new goal addsource""