Unable to use Intellij with a generated sources folder

后端 未结 11 1853
孤城傲影
孤城傲影 2020-12-01 01:00

Related question How to configure IntelliJ IDEA and/or Maven to automatically add directories with Java source code generated using jaxb2-maven-plugin?

I have a cust

11条回答
  •  情深已故
    2020-12-01 01:31

    I wanted to update at the comment earlier made by DaShaun, but as it is my first time commenting, application didn't allow me.

    Nonetheless, I am using eclipse and after I added the below mention code snippet to my pom.xml as suggested by Dashun and I ran the mvn clean package to generate the avro source files, but I was still getting compilation error in the workspace.

    I right clicked on project_name -> maven -> update project and updated the project, which added the target/generated-sources as a source folder to my eclipse project.

    
        org.codehaus.mojo
        build-helper-maven-plugin
        1.4
        
            
                test
                generate-sources
                
                    add-source
                
                
                    
                        ${basedir}/target/generated-sources
                    
                
            
        
    
    

提交回复
热议问题