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

  • Home
  • SEARCH
  • 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 7623141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:37:59+00:00 2026-05-31T04:37:59+00:00

I am currently trying to build a Java Project with several dependencies. I have

  • 0

I am currently trying to build a Java Project with several dependencies. I have created it as a Maven Web Application and I have added all the necessary dependencies. Yet, the imports are not getting resolved.

In the link below, I have attached a screenshot of my Netbeans wherein in the right panel, the import errors are visible. In the left panel, I have highlighted the libraries that I have added. Could anyone please tell me why this is happening ? Any help would be very much appreciated. Thank you 🙂

http://img20.imageshack.us/img20/5558/screenshotat20120312121.png

POM FILE CONTENTS :

<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycompany</groupId>
<artifactId>nutchTest2</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>nutchTest2 Java EE 6 Webapp</name>
<url>http://maven.apache.org</url>
<repositories>
    <repository>
        <id>java.net2</id>
        <name>Repository hosting the jee6 artifacts</name>
        <url>http://download.java.net/maven/2</url>
    </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.6.4</version>
    </dependency>
    <dependency>
        <groupId>org.jvnet.hudson.hadoop</groupId>
        <artifactId>hadoop-core</artifactId>
        <version>0.19.1-hudson-3</version>
    </dependency>
    <dependency>
        <groupId>com.saucelabs.selenium</groupId>
        <artifactId>selenium-htmlunit-driver</artifactId>
        <version>1.2</version>
    </dependency>
    <dependency>
        <groupId>solrj</groupId>
        <artifactId>solr-solrj-1.3.0.jar</artifactId>
        <version>1.3.0</version>
    </dependency>
    <dependency>
        <groupId>solr</groupId>
        <artifactId>solr-common-1.3.0-sources</artifactId>
        <version>1.3.0</version>
    </dependency>
    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-web-api</artifactId>
        <version>6.0</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.2</version>
        <scope>test</scope>
    </dependency>

</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.0.2</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.1-beta-1</version>
            <configuration>
                <failOnMissingWebXml>false</failOnMissingWebXml>
            </configuration>
        </plugin>
    </plugins>
    <finalName>nutchTest2</finalName>
</build>
<profiles>
    <profile>
        <id>endorsed</id>
        <activation>
            <property>
                <name>sun.boot.class.path</name>
            </property>
        </activation>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.0.2</version>
                    <configuration>
                        <!-- javaee6 contains upgrades of APIs contained within the JDK itself.
                             As such these need to be placed on the bootclasspath, rather than classpath of the
                             compiler.
                             If you don't make use of these new updated API, you can delete the profile.
                             On non-SUN jdk, you will need to create a similar profile for your jdk, with the similar property as sun.boot.class.path in Sun's JDK.-->
                        <compilerArguments>
                            <bootclasspath>${settings.localRepository}/javax/javaee-endorsed-api/6.0/javaee-endorsed-api-6.0.jar${path.separator}${sun.boot.class.path}</bootclasspath>
                        </compilerArguments>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>javax</groupId>
                            <artifactId>javaee-endorsed-api</artifactId>
                            <version>6.0</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>

</project>
  • 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-31T04:38:01+00:00Added an answer on May 31, 2026 at 4:38 am

    maybe because the files you show us are in the source bundle (solr-common*sources*jar)(notice than you point to files with .java extension, not .class), not in compiled library. Include compiled library to your project.
    Need to see pom file to provide more detailed answer


    After I saw .pom file: you should change

    <dependency>
        <groupId>solr</groupId>
        <artifactId>solr-common-1.3.0-sources</artifactId>
        <version>1.3.0</version>
    </dependency>
    

    to

    <dependency>
        <groupId>solr</groupId>
        <artifactId>solr-common</artifactId>
        <version>1.3.0</version>
    </dependency>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to build my Flex/Java web app from within IntelliJ rather than have
I'm currently trying to build an application that inherently needs good time synchronization across
I'm trying to build firefox but I'm having some problems. I currently have Visual
I am currently trying to develop a basic pixel editor application to build up
I'm trying to build and GWT MVP application using Guice and Gin. I added
I'm trying to set up a Web Project created in the NetBeans IDE on
I have a maven web project that imported into eclipse. I have another maven
I'm currently trying to build a personal website to create a presence on the
I'm currently trying to build a simple component which should monitor, if the user
I am currently trying to build on TeamCity, which uses Microsoft.Office.Interop dll. This will

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.