maven-3

Package contains object and package with same name

心已入冬 提交于 2019-12-19 00:17:04
问题 I am having problems compiling some Scala with Maven or Eclipse where I try to import a class from a Java jar which contains both a namespace and class of the same name. I can compile with scalac , however. E.g. the Java project (jar) contains: src/foo/bar.java src/foo/bar/some_resource.txt -> foobar.jar Scala project references foobar.jar Foobartest.scala: import foo.bar class foobartest { } The compiler complains with: package foo contains object and package with same name: bar one of them

Could not find artifact in maven central repo when search returns a match

纵饮孤独 提交于 2019-12-18 19:16:22
问题 I am attempting to introduce a dependency on the castor library in my pom. Since my project is at a preliminary stage, all artifacts are from maven central. So I search in search.maven.org for "castor". I take the first result which gives me the following dependency snippet: <dependency> <groupId>org.codehaus.castor</groupId> <artifactId>castor</artifactId> <version>1.3.3</version> </dependency> Now I "mvn clean install" and get the following: [ERROR] Failed to execute goal on project jaxb:

Plugin execution not covered by lifecycle configuration: com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.0:generate-sources

孤人 提交于 2019-12-18 19:01:40
问题 I have an Android application, which is built using pom.xml file given below. mvn clean install works without errors, but in Eclipse I get following errors: Plugin execution not covered by lifecycle configuration: com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.0:generate-sources (execution: default-generate-sources, phase: generate-sources) Plugin execution not covered by lifecycle configuration: com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.0

Is dependency-reduced-pom.xml automatically used instead of pom.xml?

左心房为你撑大大i 提交于 2019-12-18 14:04:45
问题 Is dependency-reduced-pom.xml created by Maven shade plugin automatically used in projects that depends on the uberjar (instead of the ordinary pom.xml )? Asking this after reading a number of dependency-reduced-pom.xml related questions and haven't founding the answer: Maven shade plugin adding dependency-reduced-pom.xml to base directory What is the purpose of dependency-reduced-pom.xml generated by the shade plugin? What is `dependency-reduced-pom.xml` file which created when calling maven

Maven assembly plugin warning “The assembly descriptor contains a filesystem-root relative reference”

梦想与她 提交于 2019-12-18 13:52:26
问题 Starting from some assembly plugin version maven builds issue the following warning: [WARNING] The assembly descriptor contains a filesystem-root relative reference,which is not cross platform compatible / Is there any recommended ready-to-use solution for this? Direct googling provided me with lot of trash and no real help. Re-check of Maven assembly plugin help did not provide answer for me, maybe someone else has better search skill and can help. UPDATE Yes, this is probably because of

How to have maven-assembly-plugin respect the exclusions defined in pom.xml?

雨燕双飞 提交于 2019-12-18 13:16:14
问题 TL;DR When some (specific) transitive dependencies are excluded in the POM file but the assembly descriptor is set to fetch all dependencies , the excluded dependencies will be included in assembly. How can I prevent this? A bit of background Some dependencies may be tricky to handle because their groupIds and artifactIds change at almost each version (in my case, bouncycastle). I am retrieving several versions of bouncycastle (138, 1.38, 1.45 and 1.50). My purpose is to eliminate all

Is there a good way to mavenify a play! framework application?

自闭症网瘾萝莉.ら 提交于 2019-12-18 13:01:42
问题 I am using play as web app framework and I love it, but I would like to know if there is a good way to declare the pom for a play! app ? As the sources files are meant to be in specials (not maven standard) folders, and that the goal is not to generate a target file, but to permit to manage the projet in diferents IDE (Eclipse, Netbeans, ...) It would be great if it would be possible to link pom.xml dependencies with the 1.2.X conf/dependencies.yml specific format. Thanks. 回答1: Yes, there are

Maven managed dependencies - resolving ${project.version} from parent pom

房东的猫 提交于 2019-12-18 12:45:16
问题 How is placeholder ${project.version} resolved for managed properties from parent pom? I've expected that it is resolved globally, so when the parent pom has version 2, ${project.version} would also be resolved to version 2. In parent pom I have: <groupId>my.group</groupId> <artifactId>parent</artifactId> <version>2</version> <packaging>pom</packaging> <dependencyManagement> <dependencies> <dependency> <groupId>my.group</groupId> <artifactId>dep</artifactId> <version>${project.version}<

Why are Maven generated-sources not getting compiled? [duplicate]

谁说我不能喝 提交于 2019-12-18 12:13:20
问题 This question already has answers here : maven can't add files in generated-sources for compilation phase (2 answers) Closed 2 years ago . I have a plugin which generates sources under the target/generated-sources/wrappers directory. It's wired into the generate-sources phase like this: <plugin> <groupId>mygroupid</groupId> <artifactId>myartifactid</artifactId> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>xml2java</goal> </goals> </execution> </executions> </plugin>

How to assemble multimodule maven project into one WAR?

柔情痞子 提交于 2019-12-18 11:56:54
问题 Similar question here. I would like to get ONE resulting WAR to be deployed from 3 different maven modules. The war modules are absolutely non-conflicting : First one that has Java classes and some WEB-INF/artifacts Second one are just API - interfaces - that must be either already present in container or part of the resulting war (that's what I want) Third one with Implementation classes, WEB-INF/artifacts ( spring infrastructure, web.xml, etc) First one depends on interfaces and