I'm pretty new to maven so I am not sure how to fix this issue.
I am trying to package my maven project (mvn clean package) but I am getting this error:
Failed to execute goal on project TestSDK: Could not resolve
dependencies for project
com.company.idea.qe:qeTestSDK:jar:1.0-SNAPSHOT: Failure to find
org.slf4j:slf4j-parent:jar:1.7.21 in
http://nexus-proxy/nexus/content/groups/public/ was cached in the
local repository, resolution will not be reattempted until the update
interval of Company-nexus has elapsed or updates are forced -> [Help 1]
I believe this is caused by Maven using the repository value as the only source of downloading dependencies. I require this to download the WebDriverBuilder artifact. Being new to Maven I'm not sure how to do this.
my pom.xml currently looks like this:
http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
<groupId>com.company.idea.qe</groupId>
<artifactId>qeTestSDK</artifactId>
<version>1.0-SNAPSHOT</version>
<repositories>
<repository>
<id>company-nexus</id>
<name>Compnay Nexus</name>
<url>http://nexus-proxy/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.company.tools</groupId>
<artifactId>WebDriverBuilder</artifactId>
<version>2.3.3</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.10</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.53.0</version>
</dependency>
<!-- Gson: Java to Json conversion -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.6.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
<version>1.7.21</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
</plugin>
</plugins>
</build>
Your dependency should be for sl4j-api and not sl4j-parent
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.21</version>
</dependency>
Related
I try to import my project on another computer, but when I try to build the project with maven, I get these errors.
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.247 s
[INFO] Finished at: 2022-02-20T10:27:33-06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project serpienteemplumada: Could not resolve dependencies for project com.serpienteemplumada:serpienteemplumada:war:0.0.1-SNAPSHOT: The following artifacts could not be resolved: org.primefaces:primefaces:jar:10.0.0, org.primefaces.extensions:primefaces-extensions:jar:10.0.2, org.modelmapper:modelmapper:jar:2.3.5: Could not transfer artifact org.primefaces:primefaces:jar:10.0.0 from/to spring-plugins (https://repo.spring.io/plugins-release/): Access denied to https://repo.spring.io/plugins-release/org/primefaces/primefaces/10.0.0/primefaces-10.0.0.jar. Error code 401, Unauthorized -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
I've already tried all the methods I found on the internet, maven:clean, update and install; put the repositories at the beginning, work from another IDE, but still, the error persists in those two dependencies.
Here is my Pom.xml file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.serpienteemplumada</groupId>
<artifactId>serpienteemplumada</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>serpienteemplumada</name>
<description>MarketPlace Serpiente Emplumada</description>
<properties>
<java.version>11</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<start-class>com.SerpienteemplumadaApplication</start-class>
</properties>
<repositories>
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>http://repository.primefaces.org</url>
<layout>default</layout>
</repository>
<repository>
<id>spring-plugins</id>
<name>Spring Plugins Repository</name>
<url>https://repo.spring.io/plugins-release/</url>
<layout>default</layout>
</repository>
<repository>
<id>central</id>
<name>central</name>
<url>http://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>ICM</id>
<name>ICM</name>
<url>http://maven.icm.edu.pl/artifactory/repo/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.primefaces/primefaces -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>10.0.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.primefaces.extensions/primefaces-extensions -->
<dependency>
<groupId>org.primefaces.extensions</groupId>
<artifactId>primefaces-extensions</artifactId>
<version>10.0.2</version>
</dependency>
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>all-themes</artifactId>
<version>1.0.10</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.2.20</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.2.20</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>2.0.SP1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.modelmapper</groupId>
<artifactId>modelmapper</artifactId>
<version>2.3.5</version>
</dependency>
<dependency>
<groupId>org.imgscalr</groupId>
<artifactId>imgscalr-lib</artifactId>
<version>4.2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
thx to read.
I finally can...
I had to read those dependencies for project with conflicts, then I download manually, for a weird reason my project cannot access to PrimeFace repository
If org.primefaces.themes fail I just download those files from here:
https://search.maven.org/search?q=g:org.primefaces
then I had to join with my maven2 folder
/Users/$user/.m2/repository/org
Also, I changed the versions of the dependencies.
I'm trying to run a GitHub repo that uses Java and Maven, but I ran into an error while using mvn clean install. I would ask this question in the GitHub thread (linked below), but the author hasn't responded to previous issues. When I run the command I get this error:
Failed to execute goal on project tu: Could not resolve dependencies for project com.vaguehope.tu:tu:jar:1.1-SNAPSHOT: Failed to collect dependencies at args4j:args4j:jar:2.0.21: Failed to read artifact descriptor for args4j:args4j:jar:2.0.21: Could not transfer artifact args4j:args4j:pom:2.0.21 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [maven.jenkins-ci.org (http://maven.jenkins-ci.org/content/repositories/releases/, default, releases)] -> [Help 1]
Here is the pom file:
<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.vaguehope.tu</groupId>
<artifactId>tu</artifactId>
<version>1.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>tu</name>
<properties>
<java.version>1.7</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<args4j.version>2.0.21</args4j.version>
<commonsio.version>2.4</commonsio.version>
<logback.version>1.0.9</logback.version>
<slf4j.version>1.7.2</slf4j.version>
<junit.version>4.11</junit.version>
<hamcrest.version>1.3</hamcrest.version>
<mockito.version>1.9.5</mockito.version>
<powermock.version>1.5</powermock.version>
</properties>
<prerequisites>
<maven>2.2.1</maven>
</prerequisites>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<mainClass>com.vaguehope.tu.Main</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>assembly</id>
<phase>install</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>maven.jenkins-ci.org</id>
<url>http://maven.jenkins-ci.org/content/repositories/releases/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<!-- CLI -->
<dependency>
<groupId>args4j</groupId>
<artifactId>args4j</artifactId>
<version>${args4j.version}</version>
</dependency>
<!-- Util -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commonsio.version}</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- Testing. -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Here is the original GitHub post:
https://github.com/haku/tu
Seems the repository URL is not accessible .
Try updating the repo URL to maven central:
https://repo1.maven.org/maven2
Remove the repositories tag basically from pom.xml.
Share settings.xml if it doesn't help.
The problem is that HTTP repositories are blocked by default since this change to Maven. Maven developers are trying to force people to use HTTPS. This happened a long time after that repo was last touched 4 years ago, which is why the original authors had no problems. See also:
How to disable maven blocking external HTTP repositores?
It seems maven.jenkins-ci.org doesn't exist any more anyway. You can trivially remove the whole dependency on that repo by bumping this version from 2.0.21 to 2.0.22. The latter exists in Maven Central, and the former does not - hence why the original author(s) needed to add a separate repo declaration to get it from somewhere else.
<args4j.version>2.0.22</args4j.version>
Then you can delete the whole <repositories> section
<repositories>
<repository>
<id>maven.jenkins-ci.org</id>
<url>http://maven.jenkins-ci.org/content/repositories/releases/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<checksumPolicy>fail</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
A different solution, related to a corporate environment, is that we are slowly moving out of maven to another dep/build tool, but there is still a 'corporate' settings.xml file defined.
So just rename it to a different file (instead of deleting), like mv settings.xml settings-backup.xml, and returning maven again, would help you to check if it's the issue.
I cannot seem to resolve dependencies in my POM. This project was working for me earlier this morning and is currently working on another machine, but somehow now my project is so borked that all my dependencies are broken, all my imports and most of my classes are just red underlines. I want to go back to where I'm no longer having dependency/pom/maven errors and can search for the original desiredCapabilities errors.
Environment:
MacOS
Apache Maven 3.6.3
Java 8 and 11 are installed on my machine
Project SDK: Java 11
IDE: IntelliJ
Appium 1.16.0
Trying to solve the original problem:
1. Mvn clean install, with and without -U
2. Right click on project > Maven -> reimport
3. Tried to open on eclipse but this project uses graphql and I got errors that there weren't marketplace options for what I needed
4. Restarted intelliJ
5. Restarted my computer
6. Build -> Build project, rebuild project
7. Deleted my .m2 directory and tried a mvn clean install/mvn install etc, but this is where all my artifacts started breaking. Almost all dependencies now say "Dependency not found" when I hover
8. Tried updating maven indices from the pom
9. Blew out the repo and re-cloned it
10. Reverted to a previous commit
The current error on mvn clean install is: [ERROR] Failed to execute goal on project mobile-app-automation: Could not resolve dependencies for project com.automation.cm:mobile-app-automation:jar:1.0-SNAPSHOT: Failed to collect dependencies at org.seleniumhq.selenium:selenium-java:jar:3.141.59: Failed to read artifact descriptor for org.seleniumhq.selenium:selenium-java:jar:3.141.59: Could not transfer artifact org.seleniumhq.selenium:selenium-java:pom:3.141.59 from/to central (http://jcenter.bintray.com): Authorization failed for http://jcenter.bintray.com/org/seleniumhq/selenium/selenium-java/3.141.59/selenium-java-3.141.59.pom 403 Forbidden -> [Help 1]
mvn compile gives the error: "Failure to find org.seleniumhq.selenium:selenium-java:pom:3.141.59 in https://jitpack.io was cached in the local repository, resolution will not be reattempted until the update interval of jitpack.io has elapsed or updates are forced
"
Here is my pom, 90% of the dependencies are red:
<?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.automation.cm</groupId>
<artifactId>mobile-app-automation</artifactId>
<version>1.0-SNAPSHOT</version>
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>7.2.0</version>
</dependency>
<dependency>
<groupId>com.github.annaFedorchenko</groupId>
<artifactId>automation-xray-integration-library</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>2.0.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>2.0.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.saucelabs</groupId>
<artifactId>saucerest</artifactId>
<version>1.0.40</version>
<scope>test</scope>
</dependency>
<!-- DEPENDENCIES FOR THE API TESTING -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>RELEASE</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.9.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.jayway.restassured/rest-assured -->
<dependency>
<groupId>com.jayway.restassured</groupId>
<artifactId>rest-assured</artifactId>
<version>2.9.0</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.10</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.jayway.restassured</groupId>
<artifactId>rest-assured</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.11</version>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-junit4</artifactId>
<version>2.12.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.apollographql.apollo/apollo-android-support -->
<dependency>
<groupId>com.apollographql.apollo</groupId>
<artifactId>apollo-runtime</artifactId>
<version>1.2.3</version>
<scope>system</scope>
<systemPath>${basedir}/libs/apollo-runtime-1.2.3.jar</systemPath>
</dependency>
<dependency>
<groupId>com.apollographql.apollo</groupId>
<artifactId>api</artifactId>
<version>1.2.3</version>
<scope>system</scope>
<systemPath>${basedir}/libs/apollo-api-1.2.3.jar</systemPath>
</dependency>
<!-- Optional, needed only for ANNOTATED nullable type-->
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>13.0</version>
<scope>system</scope>
<systemPath>${basedir}/libs/annotations-13.0.jar</systemPath>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-java-commons</artifactId>
<version>2.12.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
<properties>
<aspectj.version>1.8.10</aspectj.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.github.sparow199</groupId>
<artifactId>apollo-client-maven-plugin</artifactId>
<version>2.2.3</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<!-- <rootPackageName>com.example.graphql.client</rootPackageName>-->
<!-- <skip>false</skip>-->
<!-- <addSourceRoot>true</addSourceRoot>-->
<introspectionFile>
src/main/java/com/automation/api/apiresources/config/schema.json
</introspectionFile>
<!-- <generateTransformedQueries>false</generateTransformedQueries>-->
<!-- transformedQueriesOutputDir>${project.build.directory}/generated-sources/graphql-client/transformedQueries</transformedQueriesOutputDir>-->
<generateIntrospectionFile>true</generateIntrospectionFile>
<schemaUrl>https://qa-kong.command-api.kw.com/graphql/gql</schemaUrl>
<sourceDirName>${project.basedir}/src/main/java/com/automation/api/apiresources/config
</sourceDirName>
<!-- <outputDirectory>${project.build.directory}/generated-sources/graphql-client</outputDirectory>-->
<!-- <generateModelBuilder>true</generateModelBuilder>-->
<!-- <useJavaBeansSemanticNaming>true</useJavaBeansSemanticNaming>-->
<!-- <useSemanticNaming>true</useSemanticNaming>-->
<!-- <nullableValueType>JAVA_OPTIONAL</nullableValueType>-->
<!-- <suppressRawTypesWarning>false</suppressRawTypesWarning>-->
<!-- <generateKotlinModels>false</generateKotlinModels>-->
<!-- <generateAsInternal>false</generateAsInternal>-->
<!-- <generateVisitorForPolymorphicDatatypes>false</generateVisitorForPolymorphicDatatypes>-->
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<configuration>
<testFailureIgnore>false</testFailureIgnore>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
<properties>
<property>
<name>listener</name>
<value>io.qameta.allure.junit4.AllureJunit4</value>
</property>
</properties>
<systemProperties>
<property>
<name>allure.results.directory</name>
<value>${project.build.directory}/allure-results</value>
</property>
</systemProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>2.10.0</version>
<configuration>
<reportVersion>2.4.1</reportVersion>
</configuration>
</plugin>
</plugins>
</build>
As per JFrog, as of Jan 2020, JCenter is available only over https. Your repo snapshot has http instead of https.
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>bintray</name>
<url>https://jcenter.bintray.com</url>
</repository>
</repositories>
It appears I have a problem configuring maven in eclipse. i've installed through eclipse marketplace maven for eclipse and maven wtp and it eclipse won't recognize the first line of the POM. not to mention the <packaging>js</packaging> part
the error for the first line:
"Project build error: Unresolveable build extension: Plugin org.codehaus.mojo:javascript-maven-plugin:2.0.0-alpha-1 or one of its dependencies could not be resolved: Could not transfer artifact org.sonatype.aether:aether-util:jar:1.11 from/to central (http://repo.maven.apache.org/maven2): No response received after 60000"
this is the full pom.xml
<?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>www.bgusched.co.il</groupId>
<artifactId>bgusched1</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>JavaScript RIA</name>
<packaging>js</packaging>
<description>A JavaScript Rich Internet Application using jQuery and jQuery UI.</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<org.springframework.version>3.0.1.RELAESE</org.springframework.version>
<org.hibernate.version.>3.5.1-Final</org.hibernate.version.>
<gwt.version>2.0.3</gwt.version>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jquery-amd</artifactId>
<version>1.7.1-alpha-1</version>
<type>js</type>
</dependency>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jquery-ui-amd</artifactId>
<version>1.8.16-alpha-1</version>
<type>js</type>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>$(org.springframework.version)</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>$(org.springframework.version)</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>$(org.hibernate.version)</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>$(org.hibernate.version)</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>$(org.hibernate.version)</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.0.Final</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.8</version>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.10</version>
</dependency>
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1.2</version>
</dependency>
</dependencies>
<build>
<extensions>
<extension>
<groupId>org.codehaus.mojo</groupId>
<artifactId>javascript-maven-plugin</artifactId>
<version>2.0.0-alpha-1</version>
</extension>
</extensions>
</build>
<!-- FIXME: Temporary declaration of Codehaus repos until this moves to Maven Central -->
<repositories>
<repository>
<id>JBoss</id>
<name>JBoss Repsitory</name>
<layout>default</layout>
<url>http://repository.jboss.org/maven2</url>
</repository>
<repository>
<id>snapshots</id>
<url>https://nexus.codehaus.org/content/repositories/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>snapshots</id>
<url>https://nexus.codehaus.org/content/repositories/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
i've taken it from some online tutorial for building hibernate-gwt-maven project
It proably means you do not have javascript-maven-plugin-2.0.0-alpha-1.jar and aether-util-1.11.jar in your local or global maven repos.
You can find available javascript-maven-plugin and aether-util version at central repo here. Try downloading and installing them to your local m2 repo.
Note - They seem to be optional and I believe you can ditch the extension tag entirely from build tag. They might only help in compressing/cleaning up jquery js files ( ignore them for now )
I have problem importing a maven project which was created by Netbeans into the IDEA 12. The dependency artifacts writen in the pom doesn't work. It told me that "cannot resolve symbol 'springframework'" on "import org.springframework.xxx;". When I runs it, it says that org.springframework.xxx doesn't exist.
Here is the pom file
<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>cn.edu.seu.cose.jellyjolly</groupId>
<artifactId>jellyjolly-openshift-dist</artifactId>
<packaging>war</packaging>
<version>1.0</version>
<name>Jelly Jolly Openshift Distribution</name>
<organization>
<name>College of Software Engineering, Southeast University</name>
<url>http://cose.seu.edu.cn/</url>
</organization>
<repositories>
<repository>
<id>eap</id>
<url>http://maven.repository.redhat.com/techpreview/all</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>maven-restlet</id>
<name>Public online Restlet repository</name>
<url>http://maven.restlet.org</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>eap</id>
<url>http://maven.repository.redhat.com/techpreview/all</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<netbeans.hint.license>gpl30</netbeans.hint.license>
</properties>
<dependencies>
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>3.0.0.Final-redhat-1</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.1.3.RELEASE</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.restlet.jee</groupId>
<artifactId>org.restlet</artifactId>
<version>2.0.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.restlet.jee</groupId>
<artifactId>org.restlet.ext.xml</artifactId>
<version>2.0.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>net.java.dev.rome</groupId>
<artifactId>rome</artifactId>
<version>1.0.0</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.21</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>3.1.3.RELEASE</version>
</dependency>
</dependencies>
<profiles>
<profile>
<!-- When built in OpenShift the 'openshift' profile will be used when
invoking mvn. -->
<!-- Use this profile for any OpenShift specific customization your app
will need. -->
<!-- By default that is to put the resulting archive into the 'webapps'
folder. -->
<!-- http://maven.apache.org/guides/mini/guide-building-for-different-environments.html -->
<id>openshift</id>
<build>
<finalName>jellyjolly</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<outputDirectory>webapps</outputDirectory>
<warName>ROOT</warName>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
When the pom.xml file is available in your project, you can generate the files needed by IntelliJ idea project by running this command:
mvn idea:idea
Check out more options and details here:
http://maven.apache.org/plugins/maven-idea-plugin/usage.html
If the project runs on the command line (mvn clean install) the chance is like 100% it will work in IntelliJ 12 too :-)
After File -> Project Import -> From external Maven Model you should see the modules.
What I would check in the IntelliJ settings is the location of the maven home directory (File -> Settings -> Maven) and the settings.xml files it reads (or does not read).
The mvn install within the IDE should not differ from what happens on the command line. If it does it would compare mvn help:effective-settings output from the command line and from IntelliJ (maybe also from Netbeans).
If you just dont see all modules right click on the parent-pom.xml and choose maven -> reimport. To resolve the dependencies you have to execute an install once. It does not automatically resolve dependencies in all cases.
Had the same problem,
you can simply Right+Click on the code and go Maven->Reimport and it should do the trick
I used mvn -U idea:idea to generate the IntelliJ specific files with dependencies downloaded.