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 8096545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:29:08+00:00 2026-06-05T21:29:08+00:00

My main class references a Settings.java class, and running maven w/o referencing the new

  • 0

My main class references a Settings.java class, and running maven w/o referencing the new properties it works fine when I do:

mvn assembly:assembly

If I reference a new property, I get this error:

[ERROR] /Users/.../service.java:[41,58] cannot find symbol
[ERROR] symbol  : method getDefaultScore()

This is a multi-maven project. The dependency is a local one that is just another maven module, so not sure why it isn’t picking this new property up.

I did run mvn clean at the root just in case things where cached.

Note: This application works fine when I build and run it via IntelliJ, but using maven it doesn’t seem to be liking this new property (which doesn’t is simply a string property that returns a value that I assign, it isn’t reading from a property file or anything).

When running with debug:

mvn assembly:assembly -X

I get the same ‘cannot find symbol’ and the location is my other maven module’s class, and then I get:

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project myapp-jobs: Compilation failure
    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.MojoExecutor.executeForkedExecutions(MojoExecutor.java:365)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
    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: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.CompilationFailureException: Compilation failure
    at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:656)
    at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 23 more

Just to make sure, I replaced the reference of the new property with a property that is older, and the mvn command ran fine, so it is def. having an issue with the new property, which is simply:

public class Settings {
..
..
private String defaultScore = "100";

  public String getDefaultScore() {
        return defaultScore;
    }

}

My computer/maven versions etc:

  • Apache Maven 3.0.3 (r1075438; 2011-02-28 12:31:09-0500)
  • Maven home: /Users/../java/apache-maven-3.0.3
  • Java version: 1.6.0_31, vendor: Apple Inc.
  • Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
  • Default locale: en_US, platform encoding: MacRoman
  • OS name: “mac os x”, version: “10.7.4”, arch: “x86_64”, family: “mac”
  • 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-06-05T21:29:09+00:00Added an answer on June 5, 2026 at 9:29 pm

    Please make sure that you use the right version of the dependency project where you added the new property. If this project has version 1.0.0-SNAPSHOT (it’s a snapshot version, right?), make sure to reference this version in the project where you want to see the property.

    Once the versions have been verified, run a mvn clean install in the root to rebuild all of your dependencies.

    If that doesn’t work, please check your local Maven repository (in ~/.m2) to check that the JAR file of the dependency contains the latest version of the class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

import java.io.*; import jxl.*; class Xlparsing { Workbook wb =wb.getWorkbook(new File( C:\\Documents and Settings\\kmoorthi\\Desktop\\ak\\new.xls));
// Here's my code: Main Class: import java.awt.*; import java.awt.image.BufferedImage; import java.awt.image.DataBufferInt; import java.awt.image.BufferStrategy;
I have a small Java test app in Netbeans where the main() class reads
public static void main(String Data[]) { ConnectionPoolDataSource dps; try { cnt=new InitialContext(); cnt.rebind(java:comp/env/jdbc/pool/dragon, dps);
Is it OK to reference this when initializing a field? public class MainClass {
I have a main class in a program that launches another class that handles
I have a main class(which is basically a netbeans form;drag and drop) from where
I have a Main class and a HelloWorld class. I have created a button
I have a Class(call it main class) and the method in main class calls
I subclassed UIScrollView Then created an object of it in the main class. Added

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.