Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot assign configuration entry 'host' to 'class java.net.URI' #34

Closed
SaschaMoellering opened this issue Nov 19, 2014 · 5 comments
Closed
Labels

Comments

@SaschaMoellering
Copy link

Hi,

I have to following problem:

# mvn docker:package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Mediaslot Tracker
[INFO]    task-segment: [docker:package]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to configure plugin parameters for: com.alexecollins.docker:docker-maven-plugin:2.2.0

on the command line, specify: '-Ddocker.host=VALUE'

Cause: Cannot assign configuration entry 'host' to 'class java.net.URI' from '${docker.host}', which is of type class java.lang.String
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Wed Nov 19 15:17:48 CET 2014
[INFO] Final Memory: 22M/356M
[INFO] ------------------------------------------------------------------------

My maven-opts are:

# echo $MAVEN_OPTS
-Xms128m -Xmx1G -Ddocker.host=http://127.0.0.1:2375

Thanks and Regards,
Sascha

@alexec
Copy link
Owner

alexec commented Nov 19, 2014

Hi @SaschaMoellering , can you confirm if this is a new issue? It looks to me that it think that the host is '${docker.host}'. Can you check that's correct? Otherwise, are you able to give me repro steps?

@alexec alexec added the bug label Nov 19, 2014
@SaschaMoellering
Copy link
Author

Hi,

yes, this seems to be the case. I tested this using Debian Wheezy with backport kernel 3.16 and Docker 1.3.1, however in it worked in AWS using latest Amazon Linux and Docker 1.3.1.

So setup is:

Debian:

# mvn -e -Ddocker.host=http://127.0.0.1:2375 docker:package
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Mediaslot Tracker
[INFO]    task-segment: [docker:package]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to configure plugin parameters for: com.alexecollins.docker:docker-maven-plugin:2.2.0

on the command line, specify: '-Ddocker.host=VALUE'

Cause: Cannot assign configuration entry 'host' to 'class java.net.URI' from '${docker.host}', which is of type class java.lang.String
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring: com.alexecollins.docker:docker-maven-plugin. Reason: Unable to parse the created DOM for plugin configuration
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:723)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
    at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
    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:622)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.PluginConfigurationException: Error configuring: com.alexecollins.docker:docker-maven-plugin. Reason: Unable to parse the created DOM for plugin configuration
    at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1363)
    at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:724)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:468)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
    ... 17 more
Caused by: org.codehaus.plexus.component.configurator.ComponentConfigurationException: Cannot assign configuration entry 'host' to 'class java.net.URI' from '${docker.host}', which is of type class java.lang.String
    at org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter.fromExpression(AbstractConfigurationConverter.java:149)
    at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.fromConfiguration(ObjectWithFieldsConverter.java:80)
    at org.codehaus.plexus.component.configurator.converters.ComponentValueSetter.configure(ComponentValueSetter.java:247)
    at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:137)
    at org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:56)
    at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1357)
    ... 20 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Thu Nov 20 10:42:04 CET 2014
[INFO] Final Memory: 19M/344M
[INFO] ------------------------------------------------------------------------

On Amazon Linux it works perfectly fine.

Thanks and Regards,
Sascha

@alexec
Copy link
Owner

alexec commented Dec 7, 2014

Can you let me know your Maven version?

@SaschaMoellering
Copy link
Author

Yes, it's Maven 3.0.5

@alexec
Copy link
Owner

alexec commented Dec 20, 2014

Try the fix on the latest snapshot.

@alexec alexec closed this as completed Dec 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants