The maven appassembler plugin does not include the current artifact if it is called iterative

[Refresh] The original question (below) is being resolved. I need to call

mvn package appassembler:assemble

instead

mvn package
mvn appassembler:assemble

Question: Why is there a difference?

[Original]

I am trying to use the maven appassembler plugin to create a command line tool with all the dependencies compiled. It almost works, but the artifact of the current module is missing. All dependent artifacts are copied to the repo, and the class path in the bat includes the current artifact. The configuration is as follows:

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>appassembler-maven-plugin</artifactId>
            <configuration>
                <platforms>
                    <platform>windows</platform>
                    <platform>unix</platform>
                </platforms>
                <programs>
                    <program>
                        <mainClass>${mainclass}</mainClass>
                        <name>huffman</name>
                    </program>
                </programs>
            </configuration>
        </plugin>

Any ideas?

+5
source share
1 answer

, - , package, , . Maven, .

- :

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>appassembler-maven-plugin</artifactId>
  <configuration>
   ... 
  </configuration>
  <executions>
    <execution>
      <id>assemble</id>
      <goals>
        <goal>assemble</goal>
      </goals>
    </execution>
  </executions>
</plugin>

, mvn package, .

appassembler, , .

+11

All Articles