"cannot find symbol DynamicPropertyFactory" while building eureka-examples with Maven

303 views
Skip to first unread message

Fabrizio Cucci

unread,
Mar 29, 2016, 10:14:06 AM3/29/16
to eureka_netflix
Hello everyone,

I'm posting the following question to understand if this is an expected behavior, a misconfiguration on my side or something else.

Starting from https://github.com/Netflix/eureka/tree/master/eureka-examples I've created two Maven project:
1) eureka-client (which contains just the class ExampleEurekaClient.java)
2) eureka-service (which contains just the classes ExampleEurekaService.java and ExampleServiceBase.java)

The pom of both projects is (except for the artifactId):

<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>my.eureka.example</groupId>
   
<artifactId>client</artifactId>
   
<version>0.0.1-SNAPSHOT</version>

   
<properties>
       
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
       
<maven.compiler.source>1.8</maven.compiler.source>
       
<maven.compiler.target>1.8</maven.compiler.target>
   
</properties>

   
<dependencies>
       
<dependency>
           
<groupId>com.netflix.eureka</groupId>
           
<artifactId>eureka-client</artifactId>
           
<version>1.4.5</version>
       
</dependency>
   
</dependencies>

</project>

When I try to build the projects using "mvn clean package" I get the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project client: Compilation failure: Compilation failure:
[ERROR] /.../ExampleEurekaClient.java:[13,26] package com.netflix.config does not exist
[ERROR] /.../ExampleEurekaClient.java:[19,30] cannot find symbol
[ERROR] symbol:   class DynamicPropertyFactory
[ERROR] location: class eureka.client.ExampleEurekaClient
[ERROR] /.../ExampleEurekaClient.java:[19,88] package com.netflix.config does not exist

If I simply change the pom forcing the archaius-core transitive dependency to have scope compile:

    <dependencyManagement>
       
<dependencies>
           
<dependency>
               
<groupId>com.netflix.archaius</groupId>
               
<artifactId>archaius-core</artifactId>
               
<version>0.7.3</version>
               
<scope>compile</scope>
           
</dependency>
       
</dependencies>
   
</dependencyManagement>

everything works fine.

I understand that the eureka project uses Gradle as dependency management tool but is the previous scenario something expected?

Thanks,
Fabrizio

Nova Guy

unread,
Aug 21, 2016, 11:56:43 AM8/21/16
to eureka_netflix
Any update on your issue, I too am having similar issue. Thanks
Reply all
Reply to author
Forward
0 new messages