Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 951025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:39:51+00:00 2026-05-15T23:39:51+00:00

I try to upload an ear created by maven to an application server using

  • 0

I try to upload an ear created by maven to an application server using scp.

When I tried to run

mvn wagon:upload-single

But I get the following error:

[ERROR] Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:upload-single (default-cli) on project de.volkswagen.dps.ear: Unable to create a Wagon instance for null: url can not be null -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:upload-single (default-cli) on project de.volkswagen.dps.ear: Unable to create a Wagon instance for null
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:585)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:324)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:247)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:104)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:427)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:157)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:121)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    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.MojoExecutionException: Unable to create a Wagon instance for null
    at org.codehaus.mojo.wagon.AbstractWagonMojo.createWagon(AbstractWagonMojo.java:83)
    at org.codehaus.mojo.wagon.AbstractSingleWagonMojo.execute(AbstractSingleWagonMojo.java:62)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:577)
    ... 14 more
Caused by: java.lang.NullPointerException: url can not be null
    at org.apache.maven.wagon.repository.Repository.(Repository.java:88)
    at org.codehaus.mojo.wagon.shared.WagonUtils.createWagon(WagonUtils.java:51)
    at org.codehaus.mojo.wagon.AbstractWagonMojo.createWagon(AbstractWagonMojo.java:79)
    ... 17 more

I tried to add this to the pom, but it doesn’t seem to have any effect:

I added the following to the pom.xml:

...
    <extensions>
        <extension>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-ssh</artifactId>
            <version>1.0-beta-6</version>
        </extension>
    </extensions>

    <plugins>

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>wagon-maven-plugin</artifactId>
            <version>1.0-beta-3</version>
            <executions>
                <execution>
                    <id>upload-ear</id>
                    <phase>deploy</phase>
                    <goals>
                        <goal>upload</goal>
                    </goals>
                    <configuration>
                        <fromFile>${project.build.directory}/${project.build.finalName}.ear</fromFile> 
                        <url>scp://servername/</url>
                        <toDir>.</toDir>
                    </configuration>
                </execution>
            </executions>
        </plugin>
....

Can anybody explain how I can make this work?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T23:39:52+00:00Added an answer on May 15, 2026 at 11:39 pm

    Your current configuration follows the example given in the Usage page and is correct. However, in this example the configuration element is declared inside an execution and thus only applies to this particular execution.

    So when you call mvn wagon:upload-single on the command line, the configuration isn’t “used” and there is indeed no url parameter configured.

    If you want to call the plugin from the command line, either pass the parameters on the command line using -Durl=foo and so on or add a “global” configuration element:

    <build>
      <extensions>
        <extension>
          <groupId>org.apache.maven.wagon</groupId>
          <artifactId>wagon-ssh</artifactId>
          <version>1.0-beta-6</version>
        </extension>
      </extensions>  
    
      <plugins>   
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>wagon-maven-plugin</artifactId>
          <version>1.0-beta-3</version>
          <configuration>
            <fromFile>${project.build.directory}/${project.build.finalName}.ear</fromFile> 
            <url>scp://servername/</url>
            <toDir>.</toDir>
          </configuration>
          ...
        </plugin>
        ...
      </plugins>
      ...
    </build>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.