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

Goals failing with Access Configuration #1616

Closed
Loucher opened this issue Apr 9, 2019 · 6 comments
Closed

Goals failing with Access Configuration #1616

Loucher opened this issue Apr 9, 2019 · 6 comments
Labels
cat/bug Bug which needs fixing

Comments

@Loucher
Copy link
Contributor

Loucher commented Apr 9, 2019

Description

After I defined Access Configuration for k8s cluster all plugin goals fail with same error message:

[ERROR] Failed to execute goal io.fabric8:fabric8-maven-plugin:4.0.0:build (default-cli) on project <project name>: Unable to parse configuration of mojo io.fabric8:fabric8-maven-plugin:4.0.0:build for parameter access: Cannot create instance of class io.fabric8.maven.core.access.ClusterConfiguration: Class org.codehaus.plexus.component.configurator.converters.AbstractConfigurationConverter can not access a member of class io.fabric8.maven.core.access.ClusterConfiguration with modifiers "private" -> [Help 1]

Info

  • f-m-p version : 4.0.0
  • Maven version (mvn -v) :
Apache Maven 3.5.2
Maven home: /usr/share/maven
Java version: 1.8.0_201, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-46-generic", arch: "amd64", family: "unix"
  • Kubernetes / OpenShift setup and version : 1.8.5
  • If it's a bug, how to reproduce :
    Define any Access Configuration parameter with Property (maven or system); or define any Access Configuration parameter in plugin configuration. <access> block can be even empty.

Sample minimal pom.xml that is failing:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.example</groupId>
    <artifactId>fmp</artifactId>
    <version>1.0.0</version>
    <build>
        <plugins>
            <plugin>
                <groupId>io.fabric8</groupId>
                <artifactId>fabric8-maven-plugin</artifactId>
                <version>4.0.0</version>
                <configuration>
                    <access>
                        <masterUrl>https://example.com</masterUrl>
                    </access>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
@rohanKanojia
Copy link
Member

@Loucher : HI, Could you please share a sample pom which we can use to reproduce this issue?

@rohanKanojia
Copy link
Member

@lordofthejars : Could you please take a look at this? Since you implemented ClusterConfiguration support....

@Loucher
Copy link
Contributor Author

Loucher commented Apr 9, 2019

@rohanKanojia updated my issue

@rohanKanojia
Copy link
Member

@Loucher : Thanks, would provide an update soon.

@Loucher
Copy link
Contributor Author

Loucher commented Apr 10, 2019

@rohanKanojia @lordofthejars I probably found a very easy fix.

All that has to be done is to change access level modifier on ClusterConfiguration.java constructor from private to public.

Private access level was causing exception in ObjectWithFieldsConverter.java(line 54), where it was trying to create new instance of ClusterConfiguration.

@rohanKanojia
Copy link
Member

@Loucher : Great! Thanks a lot. Could you please raise a PR to fix this? It would be available in 4.1.0 which is due in 1-2 weeks ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat/bug Bug which needs fixing
Projects
None yet
Development

No branches or pull requests

2 participants