title: Could not generate DSL.xtext in maven
body: <p>I have xtext project. I usualy generate src-gen by double clicking on my DSL.xtext and click generate artifacts but I don't know how to do that in pom xml.</p>
  <p>I instead used inappropraite way which is copy all the src-gen and xtend-gen to target which not good. I need maven to take care of my the generation.</p>
  <p>The ultimale goal is mvn install then getting a jar file.</p>
  <p>myxtext called : DSL.xtext</p>
  <p>can someone advise me ?</p>
  <p>My pom.xml</p>
  <pre><code>&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;org.xtext.DSL&lt;/groupId&gt;
    &lt;artifactId&gt;org.xtext.DSL&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;packaging&gt;jar&lt;/packaging&gt;
     &lt;properties&gt;
   
          &lt;xtextVersion&gt;2.27.0&lt;/xtextVersion&gt;
           &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;maven.compiler.source&gt;11&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;11&lt;/maven.compiler.target&gt;
          &lt;SdlFileName&gt;sdl2-v8.1.2&lt;/SdlFileName&gt;
          
  
      &lt;/properties&gt;
    &lt;build&gt;
      &lt;sourceDirectory&gt;src&lt;/sourceDirectory&gt;
                
  
      &lt;resources&gt;
         &lt;resource&gt;
          &lt;directory&gt;src&lt;/directory&gt;
  
         &lt;includes&gt;
                      &lt;include&gt;**/*.java&lt;/include&gt;
                      &lt;include&gt;**/*.xtend&lt;/include&gt;
                      &lt;include&gt;**/*.xtext&lt;/include&gt;
                      &lt;include&gt;**/*.mwe2&lt;/include&gt;
                      &lt;include&gt;**/*.tokens&lt;/include&gt;
                      &lt;include&gt;**/*.xtextbin&lt;/include&gt;
                  &lt;/includes&gt;
        &lt;/resource&gt;
        
      
               &lt;resource&gt;
          &lt;directory&gt;src-gen&lt;/directory&gt;
  
         &lt;includes&gt;
                      &lt;include&gt;**/*.java&lt;/include&gt;
                      &lt;include&gt;**/*.xtend&lt;/include&gt;
                      &lt;include&gt;**/*.xtext&lt;/include&gt;
                      &lt;include&gt;**/*.mwe2&lt;/include&gt;
                      &lt;include&gt;**/*.tokens&lt;/include&gt;
                      &lt;include&gt;**/*.xtextbin&lt;/include&gt;
                  &lt;/includes&gt;
        &lt;/resource&gt;
        
        
       
         &lt;resource&gt;
          &lt;directory&gt;xtend-gen&lt;/directory&gt;
  
         &lt;includes&gt;
                      &lt;include&gt;**/*.java&lt;/include&gt;
                      &lt;include&gt;**/*.xtend&lt;/include&gt;
                      &lt;include&gt;**/*.xtext&lt;/include&gt;
                      &lt;include&gt;**/*.mwe2&lt;/include&gt;
                      &lt;include&gt;**/*.tokens&lt;/include&gt;
                      &lt;include&gt;**/*.xtextbin&lt;/include&gt;
                  &lt;/includes&gt;
        &lt;/resource&gt;
  
  
      
   
      
       
         &lt;resource&gt;
          &lt;directory&gt;resources&lt;/directory&gt;
                      &lt;includes&gt;                      
  
                      &lt;include&gt;**/*.properties&lt;/include&gt;
              &lt;/includes&gt;                      
  
        &lt;/resource&gt;
      &lt;/resources&gt;
      
      &lt;plugins&gt;
      &lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                  &lt;artifactId&gt;build-helper-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.3.0&lt;/version&gt;
                  &lt;executions&gt;
                  &lt;execution&gt;
              &lt;id&gt;add-gen-source&lt;/id&gt;
              &lt;phase&gt;generate-sources&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;add-source&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                &lt;sources&gt;
                 &lt;source&gt;src-gen&lt;/source&gt;
               
                &lt;/sources&gt;
              &lt;/configuration&gt;
            &lt;/execution&gt;
            &lt;execution&gt;
              &lt;id&gt;add-extra-source&lt;/id&gt;
              &lt;phase&gt;generate-sources&lt;/phase&gt;
              &lt;goals&gt;
                &lt;goal&gt;add-source&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                &lt;sources&gt;
                  &lt;source&gt;xtend-gen&lt;/source&gt;
                 
                &lt;/sources&gt;
              &lt;/configuration&gt;
            &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
    
          &lt;plugin&gt;
          &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
          &lt;configuration&gt;
              &lt;archive&gt;
                  &lt;manifest&gt;
                      &lt;mainClass&gt;org.xtext.DSL.Main&lt;/mainClass&gt;
                  &lt;/manifest&gt;
              &lt;/archive&gt;
              &lt;descriptorRefs&gt;
                  &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
              &lt;/descriptorRefs&gt;
                       
                  &lt;finalName&gt;${SdlFileName}&lt;/finalName&gt;
                  &lt;appendAssemblyId&gt;false&lt;/appendAssemblyId&gt;
  
  
          &lt;/configuration&gt;
                &lt;executions&gt;
          &lt;execution&gt;
            &lt;id&gt;make-assembly&lt;/id&gt; &lt;!-- this is used for inheritance merges --&gt;
            &lt;phase&gt;package&lt;/phase&gt; &lt;!-- bind to the packaging phase --&gt;
            &lt;goals&gt;
              &lt;goal&gt;single&lt;/goal&gt;
            &lt;/goals&gt;
          &lt;/execution&gt;
        &lt;/executions&gt;
  
      &lt;/plugin&gt;
  
       &lt;plugin&gt;
      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
      &lt;version&gt;3.8.1&lt;/version&gt;
     
  &lt;/plugin&gt;
     
                                  
  
  
       
                  
  &lt;plugin&gt;
                  &lt;groupId&gt;org.eclipse.xtend&lt;/groupId&gt;
                  &lt;artifactId&gt;xtend-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${xtextVersion}&lt;/version&gt;
                    
  
              &lt;/plugin&gt;
      &lt;/plugins&gt;
      &lt;pluginManagement&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.eclipse.m2e&lt;/groupId&gt;
                      &lt;artifactId&gt;lifecycle-mapping&lt;/artifactId&gt;
                      &lt;version&gt;1.0.0&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;lifecycleMappingMetadata&gt;
                              &lt;pluginExecutions&gt;
                                  &lt;pluginExecution&gt;
                                      &lt;pluginExecutionFilter&gt;
                                          &lt;groupId&gt;
                                              org.codehaus.mojo
                                          &lt;/groupId&gt;
                                          &lt;artifactId&gt;
                                              exec-maven-plugin
                                          &lt;/artifactId&gt;
                                          &lt;versionRange&gt;
                                              [1.2.1,)
                                          &lt;/versionRange&gt;
                                          &lt;goals&gt;
                                              &lt;goal&gt;java&lt;/goal&gt;
                                          &lt;/goals&gt;
                                      &lt;/pluginExecutionFilter&gt;
                                      &lt;action&gt;
                                          &lt;ignore&gt;&lt;/ignore&gt;
                                      &lt;/action&gt;
                                  &lt;/pluginExecution&gt;
                              &lt;/pluginExecutions&gt;
                          &lt;/lifecycleMappingMetadata&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
    &lt;/build&gt;
     &lt;dependencies&gt;
      &lt;dependency&gt;
              &lt;groupId&gt;org.eclipse.emf&lt;/groupId&gt;
              &lt;artifactId&gt;org.eclipse.emf.ecore&lt;/artifactId&gt;
              &lt;version&gt;2.6.0.v20100614-1136&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
                  &lt;groupId&gt;org.eclipse.emf&lt;/groupId&gt;
                  &lt;artifactId&gt;org.eclipse.emf.common&lt;/artifactId&gt;
                  &lt;version&gt;2.20.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
      &lt;groupId&gt;org.eclipse.emf&lt;/groupId&gt;
      &lt;artifactId&gt;org.eclipse.emf.mwe2.language&lt;/artifactId&gt;
      &lt;version&gt;2.13.0&lt;/version&gt;
  &lt;/dependency&gt;
  
     &lt;dependency&gt;
    &lt;groupId&gt;org.eclipse.xtend&lt;/groupId&gt;
                  &lt;artifactId&gt;xtend-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${xtextVersion}&lt;/version&gt;
                  &lt;/dependency&gt;
                                  &lt;dependency&gt;
              &lt;groupId&gt;org.eclipse.xtext&lt;/groupId&gt;
              &lt;artifactId&gt;org.eclipse.xtext&lt;/artifactId&gt;
              &lt;version&gt;${xtextVersion}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.eclipse.xtext&lt;/groupId&gt;
              &lt;artifactId&gt;org.eclipse.xtext.xbase&lt;/artifactId&gt;
              &lt;version&gt;${xtextVersion}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.eclipse.xtext&lt;/groupId&gt;
              &lt;artifactId&gt;org.eclipse.xtext.xtext.generator&lt;/artifactId&gt;
              &lt;version&gt;${xtextVersion}&lt;/version&gt;
  
          &lt;/dependency&gt;
                      
      &lt;!--&lt;dependency&gt;
      &lt;groupId&gt;org.eclipse.emf&lt;/groupId&gt;
      &lt;artifactId&gt;org.eclipse.emf.mwe2.launch&lt;/artifactId&gt;
      &lt;version&gt;2.13.0&lt;/version&gt;
  &lt;/dependency&gt;
              
  --&gt;
          &lt;!-- https://mvnrepository.com/artifact/com.google.guava/guava --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;com.google.guava&lt;/groupId&gt;
      &lt;artifactId&gt;guava&lt;/artifactId&gt;
      &lt;version&gt;30.0-jre&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
      &lt;groupId&gt;com.google.inject&lt;/groupId&gt;
      &lt;artifactId&gt;guice&lt;/artifactId&gt;
      &lt;version&gt;5.0.1&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;dependency&gt;
  
      &lt;groupId&gt;javax.json&lt;/groupId&gt;
      &lt;artifactId&gt;javax.json-api&lt;/artifactId&gt;
      &lt;version&gt;1.1.4&lt;/version&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.glassfish&lt;/groupId&gt;
      &lt;artifactId&gt;javax.json&lt;/artifactId&gt;
      &lt;version&gt;1.1.4&lt;/version&gt;
  &lt;/dependency&gt;
  
  &lt;!-- https://mvnrepository.com/artifact/org.eclipse.emf/org.eclipse.emf.ecore.xmi --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;org.eclipse.emf&lt;/groupId&gt;
      &lt;artifactId&gt;org.eclipse.emf.ecore.xmi&lt;/artifactId&gt;
      &lt;version&gt;2.16.0&lt;/version&gt;
  &lt;/dependency&gt;
  
  
   &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  <p>If you noticed, instead of making maven generating the files, I copied them from eclipse. However the generated jar is working in this way, but i maven to take care and generate for me the src-gen and xtend-gen</p>