I followed the post install jar built from ant task into local maven repository
I cannot figure out what is the problem, but this simply does not work. I do not know why they used <arg value="mvn.bat"/> instead of <arg value="mvn "/>
Anyway I have the following xml file:
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>1.8</version>
            <executions>
                <execution>
                    <phase>generate-sources</phase>
                    <configuration>  
         <target name="mvn">
          <property environment="env" />
          <property name="appname" value="hellojavaworld" />
           <exec dir="." executable="cmd">
             <arg value="/c"/>
             <arg value="mvn "/>
             <arg value="install:install-file"/>
             <arg value="-Dfile=c:\Documents and Settings\bbb\workspace\HelloServlet\hellojavaworld\src\main\java\hellojavaworld.bin\hellojavaworld.jar"/>
             <arg value ="-DgroupId=${appname}"/>
             <arg value="-DartifactId=${appname}"/>
             <arg value="-Dversion=1.0"/>
             <arg value="-Dpackaging=jar"/>
             <arg value="-DgeneratePOM=true"/>  
           </exec>
         </target>
                    </configuration>
                    <goals>
                        <goal>run</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.5.1</version>
            <configuration>
                <source>1.5</source>
                <target>1.5</target>
            </configuration>
        </plugin>
    </plugins>
</build>
It returns errors:
Error resolving version for plugin ' install:install-file -D file=c' from the repositories [local (C:\Documents and Settings\bbb.m2\repository), central (https://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository