maven-3

Failed to deploy war on heroku

蹲街弑〆低调 提交于 2019-12-24 13:09:08
问题 trying to deploy war to heroku using maven 3.2.5 mvn clean heroku:deploy-war getting this exception: [ERROR] Failed to execute goal com.heroku.sdk:heroku-maven-plugin:0.3.0:deploy-war (default-cli) on project MyApp: Failed to deploy application: There was an exception invoking the remote service: HTTP(404): https://api.heroku.com/apps/MyApp/config-vars -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.heroku.sdk:heroku-maven-plugin:0.3.0:deploy-war

Not getting values from properties files in context.xml file

这一生的挚爱 提交于 2019-12-24 12:08:11
问题 I am unable to retrieve value from .properties file into my context.xml pom.xml ( didn't mention dependencies ) <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</groupId> <artifactId>myproj</artifactId> <version>0.1.1</version> <packaging>war</packaging> <name>myproj</name> <url>http://maven

Maven Project Aggregation and Variables

雨燕双飞 提交于 2019-12-24 11:25:22
问题 Agregate Project 1: <groupId>com.mycompany</groupId> <artifactId>builder</artifactId> <version>1.0.0</version> <packaging>pom</packaging> <modules> <module>../module-1</module> <module>../module-2</module> </modules> <properties> <project.parent.pom>../builder-v1/pom.xml</project.parent.pom> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <lib.version>2.5.1</lib.version> </properties> Agregate Project 2: <groupId>com.mycompany</groupId> <artifactId>builder</artifactId>

Travis CI fails with Child module … does not exist

江枫思渺然 提交于 2019-12-24 11:23:20
问题 My git repository structure is as following: -my-repo -.mvn -.travis.yml -my-parent-project -child-module -pom.xml -pom.xml Where the parent pom includes <modules> <module>child-module</module> </modules> And my .travis.yml looks like: sudo: true language: java jdk: oraclejdk9 os: linux before_install: - chmod +x ./my-project-parent/* - cd my-project-parent install: true script: ./mvnw clean install cache: directories: - $HOME/.m2 When Travis CI build runs I'm getting: [ERROR] The project io

multiple src/main/resources folders without profiles (I wish to build multiple versions at once)

核能气质少年 提交于 2019-12-24 10:58:21
问题 I'm working on trying to have my project automatically build two different versions of a project. What I have done is I have added two different plug-in executions as follows <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.1.1</version> <executions> <execution> <phase>compile</phase> <goals> <goal>exploded</goal> </goals> </execution> </executions> <configuration> <resources> <resource> <directory>src/main/resources/first</directory> <

Different persistence units for different Maven profiles

元气小坏坏 提交于 2019-12-24 09:07:11
问题 I want to use two different databases depending on the selected Maven profile. For the profile "production" I want to use a MySQL database and for the "development" profile I want to use an in-memory HSQLDB. I found out that it is possible to have two persistence.xml files. One in "src/main/resources/META-INF" and the other one stored in "src/test/resources/META-INF". This gives the possibility to choose a different database for testing. But is it also possible to do the database selection

Error while building Spring MVC application

梦想与她 提交于 2019-12-24 07:48:29
问题 I am new at Spring framework. I have Spring Tool Suite Version 3.1.0 installed with JDK 1.7 on my system. Recently I imported into my IDE a pre-built Spring MVC project already working on another system. But when I am trying to build it, it is giving the following error :- Errors occurred during the build. Errors running builder 'Maven Project Builder' on project 'vdm'. Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could

install maven on mac

十年热恋 提交于 2019-12-24 05:46:06
问题 i'm trying to install maven on my mac first i downloaded apache-maven-3.3.9 and then i entered this code on my bash: export M2_HOME=$(/usr/local/apache-maven/apache-maven-3.3.9) and export PATH=${PATH}:/Users/sabrine/ant/bin:$JAVA_HOME/bin:$ANT_HOME/bin:$M2_HOME/bin: but it doesn't work i got(i tried with mvn -v ) -bash: mvn: command not found where is the problem? what should i do? 回答1: Don't add $( ) around the paths, just use: export M2_HOME=/usr/local/apache-maven/apache-maven-3.3.9

Maven Profile with different config files

别等时光非礼了梦想. 提交于 2019-12-24 05:01:08
问题 my project structure looks like this -src/main/java -src/main/resources -dev -app.properties -prod -app.properties -sandbox -app.properties and I defined a maven profiles like this <profiles> <profile> <id>dev</id> <properties> <build.profile>dev</build.profile> </properties> <build> <resources> <resource> <directory>src/main/resources/dev</directory> </resource> </resources> </build> </profile> <profile> <id>prod</id> <properties> <build.profile>prod</build.profile> </properties> <build>

Maven shade unable to locate Spring NamespaceHandler for XML schema namespace

百般思念 提交于 2019-12-24 02:32:53
问题 I've a small Spring project, that I've booted up with roo 1.2.2 I can run the main class just fine within Eclipse Juno. However when I try to run the JAR file built with mvn package , I get the following error: Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/tx] Offending resource: class path resource [META-INF