maven-3

Maven3 : How to get all the project dependencies in a Custom Maven Extension

守給你的承諾、 提交于 2019-12-11 23:42:45
问题 In Maven 3.x , how I can get all the dependencies of a project including the transitive in a custom maven extension (By not using Aether) Currently I have this : @Component(role = AbstractMavenLifecycleParticipant.class, hint = "Test") public class sampleExtension extends AbstractMavenLifecycleParticipant implements LogEnabled { private Logger logger; @Override public void afterSessionStart(MavenSession session) throws MavenExecutionException { this.logger.info("Starting afterSessionStart()")

set up maven pom file for different deployment scenarios

落爺英雄遲暮 提交于 2019-12-11 23:42:27
问题 Very new to maven. I have a pom file that I can use to do a build and deploy of my j2ee project and its working fine. (using maven 3). I was wondering how to set up two different deployment scenario's in the same pom - one to build and deploy in my dev environment and one to build and deploy to a test environment. The only differences between the two (for now) will be: dev-build does NOT do an SCM checkout dev-build deploys to tomcat server A test build does do an SCM checkout test build

Maven and Android SDK Deployer issue with Mediarouter

一个人想着一个人 提交于 2019-12-11 23:26:58
问题 I am simply trying to setup maven on my machine to build Android projects. I have maven 3.1.1. And have installed all platforms from the Android SDK Manager. When I do: mvn clean install on Maven-Android-SDK-Deployer , Everything seems to work until it encounters Compatibility v7 Mediarouter Library and then the build fails. See the logs below: [INFO] ------------------------------------------------------------------------ [INFO] Building Android Compatibility Extra V7 Mediarouter Library 2.4

Create datasource and deploy application

元气小坏坏 提交于 2019-12-11 23:16:10
问题 I have a maven project which creates a war file and this should be deployed to a bundled wildfly server via wildfly:run . That works so far, but I need to create a datasource before deploying. I have tried to bind the add-resource goal to different phases like deploy, install or package. None of them worked. What is wrong? An idea would be to use the wildfly:start attach an execution to add the datasource and deploy the application, but I don't know how. <groupId>org.wildfly.plugins</groupId>

No goals have been specified for this build

若如初见. 提交于 2019-12-11 22:52:51
问题 I'm trying to create a project using Project-generator.jar from Linux terminal. I'm using command java -jar project-generator.jar at last step this is showing error [ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process

Runtime.exec trying to load spring beans in jar of your project from you .war?

陌路散爱 提交于 2019-12-11 21:26:18
问题 I would like to launch some external java class or jar from my project. But i'd like to use the Bo class from my web app project. I'd like to load them in my main class but i get some weird error. I run a clean install to get a .war and a .jar with maven. Until that everything works fine. To get the .jar with dependencies i use : <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <archive> <manifest> <mainClass>com.clb.genomic.lyon.external.MainExternal</mainClass> <

Using maven ant plugin in javafx application, How to add Dependencies in javaFX jar. Still facing class not found exception

牧云@^-^@ 提交于 2019-12-11 20:58:45
问题 I using this guide added my dependencies to main jar JavaFX jar with dependencies bundled i am facing dependencies issue which causing Class not found exception. My Pom is exactly like mentioned in above link. i use dependencies plugin to copy dependencies to lib folder in target. Here is my stack trace Try calling Class.forName(com.client.main.App) using classLoader = j ava.net.URLClassLoader@3c9076d found class: class com.client.main.App launchApp: Try calling com.sun.javafx.application

How to package resources so that they can be accessed from other Maven artifacts?

拜拜、爱过 提交于 2019-12-11 20:57:27
问题 I'm writing a system, which will consist of proprietary, closed-source core component and several plugins, which I intend to distribute with their source. For now, these are simply Maven projects, let's say myapp-core (proprietary) and myapp-plugin1 (distributed with the source code). myapp-plugin1 uses myapp-core in the following way. There is a main class in myapp-plugin1 : public class DisplayHouseholdsOnMapApp { public static void main(final String[] aArgs) { CoreApp app = new CoreApp();

couldn't execute maven multi module project using exec-maven-plugin

六眼飞鱼酱① 提交于 2019-12-11 20:39:45
问题 I've a multi module maven project here . The parent project has 3 modules common, with-paranamer, without-paranamer. The with-paranamer and without-paranamer modules are independent of each other and both are depend on common module. In without-paranamer module I have added dependency to common module like this. Below is the structure of the project. . ├── pom.xml ├── common │ ├── pom.xml │ ├─ src │ ├── main │ ├─ java │ ├── ParanamerUtil.java │ ├── PersonV03.java │ └── TestCaseClasses.java │

Get reosurce in a modular project

*爱你&永不变心* 提交于 2019-12-11 18:57:07
问题 I'm working on a maven modular project that has a structure that look like at the following: |-- parent |-- model --pom.xml |-- services --pom.xml |-- web-app --pom.xml No in my service module I have some resources in src/main/resources. But when i try to get them: String fileName = getClass().getResource("/myFile.txt").getPath(); map.put("myReport",JasperCompileManager.compileReport(fileName)); the file name has the following value file:/home/myUser/apache-tomcat-8.0.3/webapps/myApp/WEB-INF