how to use it ?

Issue #1 resolved
Dmitry Vasilets created an issue

hello I tried use your plugins, but i can't build it or download somewhere.

Comments (11)

  1. Dmitry Vasilets reporter

    hello error is

    Non-resolvable parent POM: Could not find artifact com.atlassian.pom:atlassian-private-pom:pom:25.13
    
  2. Apostolos Giannakidis

    Hello Adrien,

    Would it be possible for you to push this plugin to maven central?

    Thank you very much, Apostolos

  3. Adrien Ragot (Personal)

    Hi Apostolos, I can't do it right now, I'll be busy until the end of the July, I'm sorry. It would be a nice thing to do, indeed. Cheers, Adrien

  4. Apostolos Giannakidis

    Thank you for your reply.

    I am facing a problem while trying to use the plugin.

    My environment is:

    Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)

    Maven home: /usr/share/maven

    Java version: 1.7.0_17, vendor: Oracle Corporation

    Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/jre

    Default locale: en_US, platform encoding: UTF-8

    OS name: "mac os x", version: "10.8.4", arch: "x86_64", family: "mac"

    So, this is my project's set up: -pom.xml

    -src

    |-test

    |-resources

    Then I perform: $ cd src/test/resources

    $ git clone git@bitbucket.org:atlassian/bash-maven-plugin.git

    $ cd bash-maven-plugin

    $ mvn clean install

    At this point "mvn clean install" completes successfully. Then I edit my project's pom file to use the bash-maven-plugin using the sample pom configuration as you provide. Then I return to the parent directory:

    $ cd ../../..

    $ mvn clean verify -X

    At this point it fails. It fails even if I execute "mvn clean install".

    Following is part of the output:

    [DEBUG] (f) script = COOK="Ducasse" echo "The best cook is: $COOK" echo "Variable replacement is available from Maven." exit 1 [DEBUG] -- end configuration -- [INFO] Executing bash script in debug mode [INFO] File contents: COOK="Ducasse" [INFO] File contents: echo "The best cook is: $COOK" [INFO] File contents: echo "Variable replacement is available from Maven." [INFO] File contents: exit 1 [INFO] Execution - Debug is on [INFO] Execution: + COOK=Ducasse [INFO] Execution: + echo 'The best cook is: Ducasse' [INFO] Execution: The best cook is: Ducasse [INFO] Execution: + echo 'Variable replacement is available from Maven.' [INFO] Execution: Variable replacement is available from Maven. [INFO] Execution: + exit 1 [ERROR] Execution Exit Code: 1 [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 13.885s [INFO] Finished at: Sat Jul 06 01:00:22 BST 2013 [INFO] Final Memory: 41M/422M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.atlassian.maven.plugins:bash-maven-plugin:1.0-SNAPSHOT:run (test) on project gora-oracle: The execution exited with code 1 -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.atlassian.maven.plugins:bash-maven-plugin:1.0-SNAPSHOT:run (test) on project gora-oracle: The execution exited with code 1 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoFailureException: The execution exited with code 1 at com.atlassian.maven.plugins.bash.RunMojo.execute(RunMojo.java:115) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more

    Thank you very much for your help, Apostolos

  5. Adrien Ragot (Personal)

    Hi Apostolos,

    When I execute without debug mode, I see the following:

    mvn install
    ...
    [INFO] Executing bash script
    [INFO] File contents: COOK="Ducasse"
    [INFO] File contents:                         echo "The best cook is: $COOK"
    [INFO] File contents:                         echo "Variable replacement is available from Maven."
    [INFO] File contents:                         exit 1
    [INFO] Execution - Debug is on
    [INFO] Execution: The best cook is: Ducasse
    [INFO] Execution: Variable replacement is available from Maven.
    [ERROR] Execution Exit Code: 1
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] The execution exited with code 1
    [INFO] ------------------------------------------------------------------------
    [INFO] For more information, run Maven with the -e switch
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 7 seconds
    [INFO] Finished at: Sat Jul 06 19:30:13 EST 2013
    [INFO] Final Memory: 14M/81M
    [INFO] ------------------------------------------------------------------------
    

    Maven says "The execution exited with code 1". If you look at the script in your pom.xml, there's a command also named "exit 1" and it is the cause of the termination of Maven. This is a standard command in Bash to exit with an error code. If you remove this command from the bash script and replace it with a valid script of yours, then Maven will exit with success.

  6. Log in to comment