3

I have a school project where i'am going to change the CQL (Caasandra Query Language), after doing that I need to create my specific Cassandra Java Driver, the problem that i couldn't run the source code of the driver on Eclipse i tried many things and i search in the internet but nothing work every time I have those kind of problem:

[DEBUG] Looking up lifecyle mappings for packaging bundle from ClassRealm[project>com.datastax.cassandra:cassandra-driver-core:2.1.9-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]
[ERROR] The build could not read 1 project -> [Help 1] org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[ERROR] Malformed POM I:\_Cassandra\java-driver-2.1\driver-core\pom.xml: Unrecognised tag: 'groupId' (position: START_TAG seen ...<dependencies>\n  <groupId>... @36:12)  @ I:\_Cassandra\java-driver-2.1\driver-core\pom.xml, line 36, column 12
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:363)
at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:636)
kenorb
  • 155,785
  • 88
  • 678
  • 743
ZIED
  • 31
  • 1
  • 1
  • 3

2 Answers2

4

The error:

pom.xml: Unrecognised tag: 'groupId'

means that you've malformed POM file (pom.xml) in line 36, column 12. In other words your placed groupId tag in the wrong place.

Since you didn't posted your Project Object Model file, we can still see this part: <dependencies>\n <groupId> which is incorrect. If you didn't change anything, you probably running old syntax of POM file under newer Maven.

To fix it, edit your pom.xml and correct the syntax. So under dependencies tag you should have dependency tags instead, then you can place your groupId tag, for example:

<dependencies>
  <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>3.8.1</version>
    <scope>test</scope>
  </dependency>
</dependencies>

After correction re-run your Maven command (e.g. mvn compile/mvn test).

See also: Maven2: Missing artifact but jars are in place

kenorb
  • 155,785
  • 88
  • 678
  • 743
  • 1
    I also received same error , this post https://stackoverflow.com/questions/6111408/maven2-missing-artifact-but-jars-are-in-place can help future visitors. – infiniteLearner Apr 09 '19 at 19:30
-1
   <build>
        <pluginManagement>
        <plugins>
            <plugin>
            <groupId> ----- </groupId>
            <artifactId>maven-jar-plugin</artifactId> (check your plugin ) 
            <version>3.0.2</version>
            <configuration>
                <archive>
                    <manifest>
                        <addClasspath>true</addClasspath>
                        <mainClass> ------ </mainClass>
                    </manifest>
                </archive>
            </configuration>
            </plugin>
        </plugins>
        </pluginManagement>
    </build>

this will work ! replace ----- ;)