Questions tagged [maven]

33124 questions
1

votes
0

answer
190

Views

Got error while migrating to Android Studio 3.1 Canary 5 Build?

I tried following steps: 1.changed to classpath 'com.android.tools.build:gradle:3.1.0-alpha05' maven { url 'https://maven.google.com/' name 'Google' } and added google() android.enableAapt2=false in gradle.properties 4. android { compileSdkVersion 27 buildToolsVersion '27.0.1' defaultConfig { appli...
Swapnil
1

votes
1

answer
307

Views

Eclipse : Can't import class from another project's test folder

I have two projects, lets call them A and B. B is a dependency in A's pom as my.group.id B 0.0.1-SNAPSHOT now i have some unit tests under src/test/java/ in project A. Here is a test class i have src/test/java/packA/testForA.java Also, in project B, I have src/test/java/packB/configForB.java I need...
AbtPst
1

votes
1

answer
571

Views

Kotlin (Maven) - executable JAR without source files

I wanted to create an executable kotlin jar file with maven. But somehow the kotlin source files are packed with the jar. I configured the kotlin plugin and the maven assembly plugin to create a self-contained jar. Here are the dependencies and plugins of my pom: . 1.8 1.8 1.2.0 0.20 server.RunKt ju...
mrdlink
1

votes
0

answer
94

Views

Spring consuming-ws: Exception: java.net.ConnectException: Connection refused (Connection refused)

I run my spring ws application downloaded from official spring.io web site, and it gives me following error Please help me, cant understand what's problem? P.s: It is consuming web service, building on maven, and 'http://www.webservicex.com/stockquote.asmx?WSDL' works if call via browser
matthew
1

votes
1

answer
281

Views

First Dynamic Web Project

I have gone through a tutorial to program a Rest Webservice in Java 8, Jersey and Tomcat 8.5. So far everything has gone smoothly. I was able to build my project in maven. However when I try to deploy it I am getting the following error. Dec 28, 2017 9:11:53 AM org.apache.catalina.core.ApplicationCo...
Kai78
1

votes
1

answer
32

Views

In a maven project, is there a way to find the dependencies whose version is not specified explicitly

My java maven project contains a bunch of sub-projects, something like below |- parent |- core |- db |- xml |- util |- config In all projects' pom.xml files, there are a several dependencies defined. However, only for a few of them, is specified. For example org.apache.ant ant 1.9.7 org.apache.xml...
Rakesh N
1

votes
0

answer
441

Views

Running a Tomcat embedded Java app

I'm trying to build and run a minimal Java app with embedded Tomcat but I'm having some difficulties (as outlined at the bottom). I'm trying to keep the configuration to a minimum, so if a value doesn't need to be set because the default value is already the required value, or a dependency already i...
Christian
1

votes
2

answer
294

Views

Maven Could not find artifact after downloading from Nexus

we have got a problem. I set up job on jenkins and while building a project it fetches artifacts from nexus. But even though it downloaded them job failed with artifacts could not be found. It happened only to artifacts we manually imported to the nexus. Any hints? [INFO] Downloading: http://xxx/nex...
user2796482
1

votes
0

answer
629

Views

Exclude the specified packages/classes from the jacoco coverage report

I am working on spring based web application. But, we are using scalatest for unit testing. We are using jacoco maven plugin for code coverage report generation. Now i am trying to exclude some packages to increase the code coverage. For that i have done the configuration as below. But specified pac...
vijay bhaskar
1

votes
0

answer
360

Views

Maven duplicate class with generated sources when using -f option

I try to build a Maven project with classes generated from jaxb2-maven-plugin. Consider the following minimal pom.xml: 4.0.0 test test 0.0.1-SNAPSHOT org.codehaus.mojo jaxb2-maven-plugin 2.3.1 xjc test src/main/resources/schema.xsd And this minimal schema in src/main/resources/schema.xsd: When in...
SilverNak
1

votes
1

answer
425

Views

JFrog Artifactory: Difference between item, artifact, build and entry?

I have a question regarding the AQL (Artifactory Query Language) used by JFrog Artifactory to find 'things' in the artifactory. The AQL seems to be very powerful, but i'm wondering how to build (correct) search queries, using the correct terms. The AQL documentation (https://www.jfrog.com/confluence...
Matthias Lohr
1

votes
0

answer
448

Views

Upload big jar file to Google Cloud Appengine

so I am trying to deploy my spring-based application to Google Appengine via Maven plugin. I am getting error, that my jar is bigger then allowed size. [INFO] GCLOUD: ERROR: (gcloud.app.deploy) Cannot upload file [C:\path\core-web\target\appengine- staging\core-web-0.0.1-SNAPSHOT.jar], which has si...
J.T
1

votes
0

answer
60

Views

Maven: Packaging a jar with separated external resources and dependencies (including external dependencies)

Here is what I'm trying to achieve - a dist directory that looks like this: dist/ |-- application-1.0.jar |-- resources/ |-- application.properties |-- testing.config.xml |-- training.config.xml |-- ... |-- lib/ |-- *.jar That is, I want to produce a folder 'dist', that will contain my application-1...
Hussein Dahir
1

votes
0

answer
419

Views

Deploy war in Glassfish 5 Docker Image

I am trying to deploy a war in a docker container based on the oracle/glassfish:5.0 image. I am able to deploy the war through the Glassfish Administration Console and manually uploading the war file. Nevertheless, I would like to deploy the war with maven using the cargo plugin. The versions I am...
eduardo.leon
1

votes
1

answer
70

Views

How to run application found in sub-module from root module?

Given the following Maven project: root-project database server I am able to configure maven-exec-plugin inside the server sub-module to run the application found therein. However, if someone updates a peer sub-module (e.g. database) then I get runtime errors. What I would like to do instead is have...
Gili
1

votes
2

answer
100

Views

Error 404 on SpringMVC using Maven

I keep getting this Error 404 and I've done/looked at almost all the solutions on StackOverflow that are relevant and still haven't fixed my problem. Why am I having this error? When I do http://localhost:8080 it gives me my index.jsp page, but when I do http://localhost:8080/index.jsp of http://loc...
reagan yuan
1

votes
0

answer
218

Views

Android: Gradle 4.1 sync failed

My project was ok, then I reopened it, got informed that I should upgrade Gradle plugin, sdk (now v.27) appcompat (v. 27 too) etc and then it don't sync anymore. The message I get is: Gradle sync failed: path must be canonical but got: 'C:/Users/..(etc some folders)../libs/additionnal.jar! Tried to...
statosdotcom
1

votes
1

answer
260

Views

Maven will not find junit tests to execute, says it ran 0 tests and the build succeeded

Firstly, why does maven come with a test goal, but also I see people running mvn surefire:test as if it does something else. What is the difference between the two? Secondly, I cannot seem to get maven to run my unit tests. No matter what I try, I always get Results : Tests run: 0, Failures: 0, Erro...
Pablo Canseco
1

votes
1

answer
180

Views

Vaadin: Problems with Calendar addon - can't compile widgetset

I've wanted to add Calendar (https://vaadin.com/directory/component/calendar-add-on) to my project. So I've added dependency to my pom.xml. When I run project with calendar component I've got error in place, where component was: Widgetset 'com.vaadin.DefaultWidgetSet' does not contain an implement...
Michu4000
1

votes
0

answer
73

Views

How to use server with SAML authentication?

I have server that use saml access I want to write java application that get dependencies from this server. I created settings.xml repoID myuser mypaswrod snapshot.build repoID my-url snapshot.build when I tried to run mvn clean install I got error from mvn because the SAML. The error because it th...
user1365697
1

votes
1

answer
88

Views

Docker image cannot read / find a .jar file from another image?

I am new to both Java and Docker. I have two Git repositories: project-cms project-app Both repositories are Java projects. My instructions are to mvn clean install from project-cms and then mvn clean install && mvn build from project-app so that project-app can use the .war file generated by projec...
Nag
1

votes
1

answer
160

Views

Use create-from-project for maven archetype: Include empty directories

If I use create-from-project to create an archetype from a Maven project, how can I include empty directories? I want to include a directory like src/main/java even if it is empty.
JF Meier
1

votes
0

answer
509

Views

Cobertura does not work with Java 9

I have been using Java 8, now trying to upgrade to java 9. Most of the things works except generation of unit test cases report, I am using Cobertura. With Java 9 I get following error, seems like Cobertura still references tools.jar which is removed from Java 9. Failed to execute goal on *****: Co...
Atul Sureka
1

votes
2

answer
91

Views

When filtering, how can I use default filter file when specified file does not exist?

In my POM, I have: ${basedir}/src/main/props/${environment}-${flavor}.properties Where environment and flavor can be provided at command line: mvn clean install -Denvironment=test -Dflavor=guest And inside the maven-resources plugin definition, I have: ${basedir}/src/main/props/base.properties ${cus...
MegaMatt
1

votes
1

answer
254

Views

maven assembly plugin is not working with pluginManagement

Below is my configuration of maven-assembly-plugin and it's working fine.but when i am adding my all plugins inside the pluginManagement parent tag it's not working. I am not sure why it's not working maven-assembly-plugin 2.2 MyId package single assemblyFile.xml false
Niraj Sonawane
1

votes
0

answer
266

Views

Servicemix Spring 4 wiring issue

Edit: To better/shorter folmulate my main question; Is it possible to get an OSGI application running using spring-osgi (1.2.1) and Spring 4 at the same time? And if so, how? Original: I am trying to make servicemix 6.1.3 work with Spring 4. I know support has been officially dropped as of Spring v...
J Bre
1

votes
1

answer
28

Views

Track other versions change with Jenkins

I have a few components and some projects using them. All the dependency management is done using maven. I'd like jenkins to check if code changes for a component would impact a project even if the project isn't using the newest version of it. Let's say I have component foo, and projects bar and baz...
1

votes
0

answer
363

Views

IntelliJ is not recognizing some of the classes/methods… while the application is working just fine

I'm new to Java/Linux/Maven/IntelliJ, ... When I look at the script serving to build the the code, I see something like this: mvn clean install -Dmaven.test.skip=true Long story short, the code is compiling just fine. I can open the browser and use the application normally. However, when I open the...
Richard77
1

votes
0

answer
400

Views

Eclipse console is terminated on maven build

I intend to run a simple Spring MVC application using Maven. When I try to perform maven clean / build, nothing runs on console instead it shows message as ' Projectname [maven build] ..[JDK path]/javaw.exe' I have set valid JDK path in system env variables and in the eclipse.ini file. Please help a...
Hetal Gada
1

votes
1

answer
189

Views

Arquillian Cube Basic Example/Tutorial JMX Remote Access times out

I have tried to reproduce the Arquillian Cube Basic Example/Tutorial (on http://arquillian.org/arquillian-cube/#_basic_example), which starts a Tomcat 7 Docker Container and tries to deploy a war File in this Tomcat container. Even though I have specified environment variables as in the tutorial JAV...
DanielZ
1

votes
1

answer
50

Views

Maven Build stuck at Creating Spec file

I've been trying to build the kylo (ver 0.8.4) project using maven on my windows machine, using the new bash feature, and following the instructions on the dev docs site. I'm running into this situation where there's a spec file being created, and its been stuck at that message for the last hour. I'...
PapaJer
1

votes
1

answer
175

Views

Java POI occurs InvalidOperationException when using Maven resource filiter

I have a jar which reads a excel template. If I use Maven shade to package without using resources filter and execute my jar, it is ok; However, I got some exception after I use Maven resources filter! The exception which occurs when I execute jar is as follows: 2018-01-05 11:20:45,631 [main] INFO...
Frank Hsu
1

votes
1

answer
27

Views

NetBeans: Use environment from .bash_profile when running Maven commands

I have a .bash_profile with environment variables I want my IDE, NetBeans, to see during execution but doesn't seem to work. Any hints on how to get the IDE to see this?
javydreamercsw
1

votes
1

answer
379

Views

Maven Surefire not executing test phase

When running mvn test it appears that surefire is not executing it's test goal (or at the very least is not picking up the tests which I have included within the configuration. This is a multi-module maven project, currently all in groovy, with a structure similar to the below: root -commons -framew...
EJ-K
1

votes
0

answer
774

Views

Artifactory slow download artefact

Basic info: Artifactory ver. 4.12.2 OS - Ubuntu 16 On the server are only installed Artifactory. Connection are directly between my host and server. There are NO PROXY. When I make: mvn clean install I have info with a downloading speed and they are very slow e.g.: Downloaded: http://IP:PORT/XXXX (2...
zaq wsx
1

votes
1

answer
28

Views

How to use maven's repo as my class path when running java -cp

I am running a java application in dir /opt/myApp And I have all needed jars in /opt/myApp/lib The cmd I am using is java -cp /opt/myApp/lib/* org.my.App But every time I re-compiled my codes(a maven project), I need to copy all lib files from workspace to /opt/myApp/lib. I am wondering if it's po...
T.Tony
1

votes
0

answer
115

Views

Running a Spring + React Application - Node Issue

I'm attempting to run the bundled Spring + React Application provided by Spring here - I'm behind a corporate firewall so naturally I'm running into some dependency issues. Every in the pom installs fine, but the following execution(s) fails install node and npm install-node-and-npm v4.4.5 3.9.2 np...
Kurai Bankusu
1

votes
1

answer
1.2k

Views

Reading environment variable in jar from docker container

I'm using docker-maven-plugin and as per the documentation I need to pass environment variable file via . So the plugin in pom.xml looks like ... ${project.basedir}/local/local.properties I have local.properties with below values, TIME_COUNT=1000 REST=10 In my java project I read those values as S...
Mad-D
1

votes
1

answer
65

Views

Required to create Maven plugin or 'some kind of wrapper' or should I use a parent pom

We are using the frontend-maven-plugin in several (10+) projects. These projects are build in combination with our own CMS. These projects are using a specific 'parent' in the pom, such as: nl.companyname companyname-corporate-pom 2.0.13 In this 'corporate pom', we have some predefined configuration...
NickGreen
1

votes
0

answer
2.4k

Views

Spring : Cannot determine embedded database driver class for database type NONE

I want to run my project with active profile 'firza' But it gives me the following error. After searching on google I tried all the possible fixes but nothing worked :| Can anybody help me? application.properties spring.datasource.url=jdbc:mysql://localhost:3306/MySportsAcademy?createDatabaseIfNot...
SFAH

View additional questions