maven-2

Android Studio 3.1: Could not find gradle-core.jar (gradle-core-3.1.0.jar)

时间秒杀一切 提交于 2019-12-08 18:30:28
问题 I've just installed Android Studio 3.1 over previous version of android. When I try to create new project, during project build it stops and prompts below error. I've used many solution but it did not help. Here is the error message: Error:Could not find gradle-core.jar (com.android.tools.build:gradle-core:3.1.0). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-core/3.1.0/gradle-core-3.1.0.jar When I check the log it shows, altough

How to preserve symlinks when unpacking tar using maven assembly plugin

允我心安 提交于 2019-12-08 16:59:56
问题 I am writting a maven assembly descriptor and one of the task is to download a tar file, unpack it before creating a final tarball out of many components. I cant figure out how to preserve symlinks from the tar using the maven assembly plugin. Has anybody seen this issue before? <assembly> <id>myassembly</id> <formats> <format>dir</format> </formats> <includeBaseDirectory>false</includeBaseDirectory> <dependencySets> <dependencySet> <useProjectArtifact>false</useProjectArtifact>

Maven warning on MacOS: Workspace defines a VM that does not contain a valid jre/lib/rt.jar

坚强是说给别人听的谎言 提交于 2019-12-08 16:51:25
问题 I am trying to clean my Maven and I am getting this warning when I run mvn eclipse:eclipse -Dwtpversion=2.0 [WARNING] Workspace defines a VM that does not contain a valid jre/lib/rt.jar: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Does any one have a clue on how to fix it? I am on MacOS. Here is what I have configured for my eclipse: 回答1: There is a patch here, but it has not been applied to any release so far. :-( As a workaround you can create a symlink as described

How to tell maven-dependency-plugin that the artifact is used in the project?

血红的双手。 提交于 2019-12-08 16:43:27
问题 This is a structure of my multi-module project: /root /api dependencies: slf4j /foo dependencies: slf4j-log4j12, log4j In other words, module api uses slf4j for logging purposes. It doesn't know what the implementation of logging facility will be. Module foo adds slf4j-log4j12 and log4j in order to implement the logging. Pretty simple. Now I'm running maven-dependency-plugin:analyze-only and this is what it says for module foo : [WARNING] Unused declared dependencies found: [WARNING] org

How do I make the manifest available during a Maven/Surefire unittest run “mvn test”?

故事扮演 提交于 2019-12-08 16:03:26
问题 How do I make the manifest available during a Maven/Surefire unittest run "mvn test" ? I have an open-source project that I am converting from Ant to Maven, including its unit tests. Here's the project source repository with the Maven project: http://github.com/znerd/logdoc My question pertains to the primary module, called "base". This module has a unit test that tests the behaviour of the static method getVersion() in the class org.znerd.logdoc.Library . This method returns: Library.class

Update a Maven project version from script

大兔子大兔子 提交于 2019-12-08 15:44:44
问题 First of all, I do have some sort of understanding that the following might not be the generally accepted way to do things. We have a Maven 2 project that has a version number which should be updated each week or so, during a new release. During this process, I've tried to eliminate all the things one has to remember and I've made a bash script that handles the process interactively. However, my problem is updating the pom version from the command line. I can do this with sed but I don't

Determining Maven execution phase within a plugin

↘锁芯ラ 提交于 2019-12-08 15:04:27
问题 I have a plugin which transforms the compiled classes. This transformation needs to be done for both the module's classes and the module's test classes. Thus, I bind the plugin to both the process-classes and process-test-classes phases. The problem I have is that I need to determine which phase the plugin is currently executing in, as I do not (cannot, actually) transform the same set of classes twice. Thus, within the plugin, I would need to know if I'm executing process-classes - in which

What is simple way to fail a build when a property is not set?

旧城冷巷雨未停 提交于 2019-12-08 14:52:03
问题 As stated in the title, how can I modify - in the simplest manner possible - a pom.xml in order to make it fails if a property is not set in the command line. For example, mvn clean package will fail, when mvn clean package -Dfoo=bar will succeed. I'm looking for something like the <prerequisites/> tag in the pom.xml (except that <prerequisites/> only allow me to check the Maven version)... 回答1: You can use the requireProperty goal of the maven-enforcer-plugin to fail a build if a property is

Finding out which compiler Maven uses

本秂侑毒 提交于 2019-12-08 14:46:50
问题 Do you know how I can find out which of my JDKs Maven uses to compile my projects? 回答1: mvn -version will spit out the version of maven and the jdk it is using. 回答2: Sometimes you have to be aware of the Maven compiler plugin configuration, cause it could be that there is defined to use a different source/target configuration or may be to use a different JDK etc. mvn help:effective-pom could give you the needed information. 回答3: The maven-compiler-plugin uses javac by default, and binds by

Finding list of versions available in a Maven repository for a specific plugin?

人盡茶涼 提交于 2019-12-08 14:43:56
问题 Given the following repository URL from my pom.xml how can I determine what the latest versions of spring and hibernate are available in the repository? http://repo1.maven.org/maven2 回答1: Programatically or just manually? Since the repository works over HTTP you can just navigate it manually: http://repo2.maven.org/maven2/org/springframework/spring/ http://repo2.maven.org/maven2/org/hibernate/hibernate/ http://repo2.maven.org/maven2/org/hibernate/hibernate-core/ 回答2: Retrieve the maven