天道酬勤,学无止境

maven

Packaging of a Standalone Java program built using Maven [duplicate]

This question already has answers here: Closed 10 years ago. Possible Duplicate: How can I create an executable jar with dependencies using Maven? I have a standalone java program which is built using Maven. All the dependencies are specified in Maven. When I want to run this standalone java program in a different environment , I will have to copy all the relevant jar files and set it in the classpath. Is this the approach that I must take or is there a better approach available?

2022-01-19 00:43:36    分类:问答    java   maven

MAVEN Archetype choosing

Hi i am just new to maven. My requirement is to build a ear with 2 wars and also create a jar. I tried using some archetypes but few folder structure are missing. My maven folder structure should contain src/main/ java resource webapp test/java test/resource. Which archetype will be a suitable?

2022-01-19 00:22:31    分类:问答    maven   maven-archetype

MiniDFSCluster UnsatisfiedLinkError org.apache.hadoop.io.nativeio.NativeIO$Windows.access0

When doing: new MiniDFSCluster.Builder(config).build() I get this exception: java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z at org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Native Method) at org.apache.hadoop.io.nativeio.NativeIO$Windows.access(NativeIO.java:557) at org.apache.hadoop.fs.FileUtil.canWrite(FileUtil.java:996) at org.apache.hadoop.hdfs.server.common.Storage$StorageDirectory.analyzeStorage(Storage.java:490) at org.apache.hadoop.hdfs.server.namenode.FSImage.recoverStorageDirs(FSImage.java:308) at org.apache

2022-01-19 00:12:44    分类:问答    java   maven   hadoop   hdfs   junit5

Hudson executing just one job non-parallel

We have a hudson setup with just one executor. we want to get to a point where we can have at least 2 executors. The problem that is stopping us from doing this is a job which cannot be run in parallel. Explanation: we have many svn branches configured on hudson. The flow for a particular branch will look like A->B->C In this flow, B writes and deletes data from oracle. we are good, if there is only one branch set up on hudson. But, we have many svn branches on Hudson. So there could be a another branch with the flow A1->B1-C1 Now B and B1 both write and delete data from the only oracle

2022-01-19 00:11:28    分类:问答    java   continuous-integration   maven   hudson   hudson-plugins

Maven failsafe plugin fails with "Unable to locate surefire-booter"

Our Maven build is suddenly failing in Jenkins as of August 2nd. We cannot explain why maven failsafe cannot access it's dependent "booter" plugin. Has anyone seen the same thing? [INFO] [failsafe:integration-test {execution: run-integration-tests}] [INFO] Failsafe report directory: /var/lib/jenkins/workspace/Foo/integration-tests/target/failsafe-reports [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Unable to locate surefire-booter in the list of plugin

2022-01-18 23:01:47    分类:问答    java   maven   integration-testing

How to run method with MAVEN?

I have wrote a console app (.java class with main function), and I d'like to call this main (or, for example some static method before execution of my BIG project) how to do this with MAVEN (script?) ?

2022-01-18 22:32:18    分类:问答    java   maven

what if my open source project is managaed by maven and depends on a library not in maven repository?

Imagine this case. I have an open source project which I manage with Maven, and it depends on a well-known library (jpathwatch, e.g.) not in maven repository. How can I make it work? The straightforward way is to install jpathwatch to local maven repository. However, that imposes a burden for people who check out my project's source code and want to build them by themselvz. They'll encounter an maven error and then look into the README file, or just give up trying. Is there a clean way for me to work it around? Do I have to go back to ANT ?

2022-01-18 22:08:53    分类:问答    maven

jacoco only shows coverage for classes in the same module

I have a somewhat large multi-module Maven project. I have the unit tests in each module being processed by Jacoco. I have a separate child module doing "merge" and "report-aggregate", and this appears to be generating data. I'm even using the generated data in SonarQube. Most of my tests are using PowerMock, and I'm using offline instrumentation. However, after looking closer at the coverage data, I see that it is leaving out coverage data for classes and methods that I know are being executed during tests. The pattern I see in every module is that it only reports coverage for a single class

2022-01-18 21:53:51    分类:问答    java   maven   powermock   jacoco   jacoco-maven-plugin

Jenkins not finding SureFire Reports

I have created a Maven Project Job/Item in my local jenkins server. And added jenkin's TestNG plugin to see the test reports But the job is not displaying my TestNg resuls. I see the following error: TestNG Reports Processing: START Looking for TestNG results report in workspace using pattern: **/testng-results.xml Did not find any matching files. Finished: SUCCESS The actual location of the testng-results.xml: E:\AllStuffProfessional\EclipseWorkSpaces\MavenWorkSpace\MyMavenPrj\target\surefire-reports\testng-results.xml I have Home directory: C:\Users\abhijeet\.jenkins under Manage Jenkins>

2022-01-18 20:29:43    分类:问答    maven   jenkins   automated-tests   testng

Execute external groovy script from Maven

I have a maven project with nothing related to groovy in pom.xml. And I just want to execute a groovy script test.groovy in the root of my project with access to all project's classes. so I try to run an command: mvn groovy:execute -Dsource=test.groovy but it tells me that: [ERROR] Failed to execute goal org.codehaus.mojo:groovy-maven-plugin:1.5:execute (default-cli) on project modules-journal: The parameters 'source' for goal org.codehaus.mojo:groovy-maven-plugin:1.5:execute are missing or invalid -> [Help 1] what is wrong? mvn groovy:shell works perfectly, but I want to run predefined script

2022-01-18 20:05:35    分类:问答    maven   groovy