Hi,
I am using maven-antrun-plugin 1.8 in interactive mode to accept user
inputs for build version for my project.  i want to use this version to be
updated in all manifests file of all the jars of my project creates.
I have added this plugin in the parent pom, which has all the modules to be
built and also the plugin for jar to add manifest info. But the input
received from prompt i.e build version, not able to update the manifest
info from this variable (build version). I getting this value as empty. How
to make this value available to all the jars while updating manifest info.
This is my sample code in the parent POM. I dont want to pass these
parameters as command line arguments which i am able to update manifest
info. My option is only interactive mode. I have set
<inherited>false</inherited> without this, it prompts for each jar which
when it creates. Any help is highly appreciated.
                                        <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <version>1.7</version>
                        <executions>
                            <execution>
                                <id>catch-new-version</id>
                                <inherited>false</inherited>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <phase>validate</phase>
                                <configuration>
                                    <target>

                                        <input
                                        message="Please enter the new build
version : "
                                        addproperty=build-version" />
                                    </target>

<exportAntProperties>true</exportAntProperties>
                                </configuration>
                            </execution>
                                                   </executions>
                                               </plugin>

                                            <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>2.3.1</version>

-------------------------------
                                                <archive>
                                <manifestEntries>

<Release-Test-Label>${build-version}</Release-Test-Label>
                                </manifestEntries>
                            </archive>
                                                </plugin>

Thanks
virg

Reply via email to