“optional” dependency with scope “provided” in Maven

Did you check this documentation. It describes your use case very good. Marking dependencies as optional will not resolve them as transitive dependencies in the application which use your library (even if the scope is compile). In difference to <scope>provided</scope> which is used for required dependencies which will be provided by the runtime environment an … Read more

How to execute a maven plugin twice with different property

Given the simple Maven Source Plugin configuration (as an example) you have a shared configuration across all of its executions (outside the executions element) and then a custom configuration per each execution, for the same phase, as requested by your question: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>2.4</version> <configuration> <includePom>true</includePom> </configuration> <executions> <execution> <id>test-id1</id> <phase>verify</phase> <goals> … Read more

Increase timeout for gradle to get a maven dependency

The feature was added in Gradle here: https://github.com/gradle/gradle/pull/3041 You can increase the timeout with 2 properties: ./gradlew build -Dhttp.socketTimeout=60000 -Dhttp.connectionTimeout=60000 As commented by Sue C, If you are using gradle 4.10.2 or later version use following properties: ./gradlew build -Dorg.gradle.internal.http.socketTimeout=60000 -Dorg.gradle.internal.http.connectionTimeout=60000

maven assembly include the current project jar in the final zip/tar

In <dependencySet> you can exclude the current project jar by saying <useProjectArtifact>false</useProjectArtifact>, but it’s true by default, so it should work. From the warning, it seems that you need to do mvn package first, but due to some internal maven issue, it does not work if you do mvn package and mvn assembly:single in separate … Read more

“maven.compiler.release” as an replacement for source and target?

The “simple suggestion” in the other answer won’t work correctly because unfortunately the situation is not simple. The compiler options mean slightly different things. The maven.compiler.source and maven.compiler.target options refer to the source code format and the format of the generated class files, respectively. But they do not take into account API changes as maven.compiler.release … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)