Java

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • use mvn install inside POM.xml

    5 answers - 324 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi all,
    I have project requirement where we need to install custom jar file
    (generated using another project) into the maven local repository using mvn
    install command.
    My question is: How can we run mvn install command from PM.xml? Kindly let
    me know if this is not possible.
    Thanks & regards,
  • No.1 | | 489 bytes | |

    It doesn't look like it because you can't override artifactId,
    groupId, file, etc.

    3/12/07, sirji <sr.misc (AT) gmail (DOT) comwrote:

    Hi all,

    I have project requirement where we need to install custom jar file
    (generated using another project) into the maven local repository using mvn
    install command.

    My question is: How can we run mvn install command from PM.xml? Kindly let
    me know if this is not possible.

    Thanks & regards,
  • No.2 | | 709 bytes | |

    There are two solution

    1)put that jar manually in the Repository

    2) or use ANT task inside the Pom.xml (use copy task of ant)

    3/12/07, Gregory Kick <gk5885 (AT) gmail (DOT) comwrote:

    It doesn't look like it because you can't override artifactId,
    groupId, file, etc.

    3/12/07, sirji <sr.misc (AT) gmail (DOT) comwrote:

    Hi all,

    I have project requirement where we need to install custom jar file
    (generated using another project) into the maven local repository using
    mvn
    install command.

    My question is: How can we run mvn install command from PM.xml? Kindly
    let
    me know if this is not possible.

    Thanks & regards,
  • No.3 | | 410 bytes | |

    Hi,

    I've tried to change the smtp host for Continuum in Maestro 1.1 but the
    log says that it tries to connect to localhost and not the host I set in
    the page for Continnum services.

    Any suggestion?

    Regards
    Gunnar

    To unsubscribe, e-mail: users-unsubscribe (AT) maven (DOT) apache.org
    For additional commands, e-mail: users-help (AT) maven (DOT) apache.org
  • No.4 | | 3337 bytes | |

    Thanks alot Neeraj for your response :) I believe you understood my issue.

    requirement doesn't allow us to use manual procedure. :(

    Now, regarding the ant task for Maven, I have been trying "Antlib for Maven
    2.0" [] Unfortunately, this isn't
    working for me. I am facing two issues with it.

    First, "" required for this task is
    available for Maven 2.0.4 not for Maven 2.0.5. Even with Maven 2.0.4, I am
    getting following error:-
    C:\>mvn install

    [INF]

    [ERRR] FATAL ERRR
    [INF]

    [INF]
    (;)V
    [INF]

    [INF] Trace
    java.lang.NoSuchMethodError:
    (Lorg/apache/maven/settings/Se
    ttings;)V
    at (DefaultMaven.java:273)
    at (DefaultMaven.java:115)
    at (MavenCli.java:256)
    at (Native Method)
    at
    ()
    at
    ()
    at (Method.java:324)
    at
    (Launcher.java:315)
    at (Launcher.java:255)
    at
    (Launcher.java:430)
    at (Launcher.java:375)
    [INF]

    [INF] Total time: < 1 second
    [INF] Finished at: Mon Mar 12 18:11:25 IST 2007
    [INF] Final Memory: 1M/3M
    [INF]

    This happens after I place "" into the
    Maven's lib directory. And if I remove this jar file, I get following
    error:-

    [INF]

    [ERRR] BUILD ERRR
    [INF]

    [INF] Error executing ant tasks

    Embedded error: Could not create task or type of type: artifact:install.

    Ant could not find the task or a class this task relies upon.

    Kindly let me where I am going wrong?

    Thanks & regards,
    SR

    Neeraj Bisht wrote:

    There are two solution

    1)put that jar manually in the Repository

    2) or use ANT task inside the Pom.xml (use copy task of ant)

    3/12/07, Gregory Kick <gk5885 (AT) gmail (DOT) comwrote:
    >>

    >It doesn't look like it because you can't override artifactId,
    >groupId, file, etc.
    >>

    >3/12/07, sirji <sr.misc (AT) gmail (DOT) comwrote:
    >>

    >Hi all,
    >>

    >I have project requirement where we need to install custom jar file
    >(generated using another project) into the maven local repository using
    >mvn
    >install command.
    >>

    >My question is: How can we run mvn install command from PM.xml? Kindly
    >let
    >me know if this is not possible.
    >>

    >Thanks & regards,
    >>

    >--
    >View this message in context:
    >#a9432558
    >Sent from the Maven - Users mailing list archive at Nabble.com.
    >>
    >>

    >
    >To unsubscribe, e-mail: users-unsubscribe (AT) maven (DOT) apache.org
    >For additional commands, e-mail: users-help (AT) maven (DOT) apache.org
    >>
    >>
    >>
    >>

    >--
    >Gregory Kick
    >gk5885 (AT) gmail (DOT) com
    >>

    >
    >To unsubscribe, e-mail: users-unsubscribe (AT) maven (DOT) apache.org
    >For additional commands, e-mail: users-help (AT) maven (DOT) apache.org
    >>
    >>
  • No.5 | | 1992 bytes | |

    Hi,

    Now, regarding the ant task for Maven, I have been trying "Antlib for
    Maven
    2.0" [] Unfortunately, this isn't
    working for me. I am facing two issues with it.

    The following is a short snippet taken from one of my pom.xml's that works quite well for me (I need to execute some special Ant tasks from within my PM):

    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-antrun-plugin</artifactId>
    <version>1.1</version>
    <executions>
    <execution>
    <id>compile</id>
    <phase>compile</phase>
    <goals>
    <goal>run</goal>
    </goals>
    <configuration>
    <tasks>
    <property name="srcdir" value="${basedir}//" />
    <property name="websrcdir" value="${srcdir}/" />
    <property name="destdir" value="${project.build.directory}/${project.artifactId}-${project.version}" />
    <property name="webdestdir" value="${destdir}/WEB-INF/classes/META-INF" />
    <copy file="${srcdir}/form/file.xml" tofile="${destdir}/form/copied-file.xml" overwrite="true" />

    <delete dir="${destdir}/tmp" failonerror="false" />
    </tasks>
    </configuration>
    </execution>
    </executions>
    </plugin>

    Place your Maven commands inside the <tasks></taskssection (should be <install:install-fileor something similar; see the above URL), and it should work. You only should ensure that you bind the plugin to the correct phase.

    This happens after I place "" into the
    Maven's lib directory.

    This file is for _Ant_, not for Maven (see the topic "Installing the Ant Tasks" in the URL you mentioned above)

    HTH

    Thorsten

    To unsubscribe, e-mail: users-unsubscribe (AT) maven (DOT) apache.org
    For additional commands, e-mail: users-help (AT) maven (DOT) apache.org

Re: use mvn install inside POM.xml


max 4000 letters.
Your nickname that display:
In order to stop the spam: 3 + 2 =
QUESTION ON "Java"

EMSDN.COM