maven-2

Run Netbeans maven project from command-line?

点点圈 提交于 2019-12-05 22:37:28
问题 I've got a Maven project that runs perfectly inside Netbeans. How can I execute the application from the command-line (without Netbeans)? 回答1: There's a plugin for that: http://www.mojohaus.org/exec-maven-plugin/ $ mvn exec:java -Dexec.mainClass="com.mycompany.App" Assuming com.mycompany.App is you main class. 回答2: Using the Maven Exec Plugin and its exec:java goal as suggested is a first option. And the command suggested is correct, you have to specify -Dexec.mainClass=VALUE on the command

Running IntelliJ inspections via Maven/TeamCity

假如想象 提交于 2019-12-05 22:36:34
I have a Maven project, and I'm trying to configure TeamCity to run IntelliJ's inspections on it. TeamCity's documentation refers me to IntelliJ's documentation , but I didn't find anything useful there. Can you refer me to how do you configure it? CrazyCoder The documentation was incorrect, you can't reference inspections profile directly from the pom.xml . Thanks for noticing, we've fixed it. In case of the Maven project you need to open it in IDEA, define the inspections profile, export the profile into XML file and commit it into the version control with the project. In the TeamCity

Generated target files after build doesn't contain all the compiled classes that must have been there

你。 提交于 2019-12-05 21:19:31
While building the project, the console shows that the source packages were compiled(the one inside px10 package) However if I see the target files generated, none of the classes are there from source package. tried clean & build several times but doesnt help cleared the netbeans cache from .../var/cache/ Here is the log generated while building the web app ------------------------------------------------------------------------ Building ABCApp Java EE 6 Webapp 1.0 ------------------------------------------------------------------------ [antrun:run] Executing tasks Executed tasks [resources

Is there a way to make the Maven build independent of the network connection?

流过昼夜 提交于 2019-12-05 21:04:28
I'm working in a Continuous Integration environment and part of the automated build process includes the compilation of Maven managed projects. What I want to know is if there is a way to make the Maven build independent of the network connection. Currently we have the all the jar's that we need installed in the repository but the problem is that Maven tries to check for plugins updates and that makes the build fail if, eventually, the connection is down. You can either run offline with the -o switch or by adding <offline>true<offline> to your settings.xml. It's worth pointing out though that

How to check and access javadoc/source for Maven Artifacts

。_饼干妹妹 提交于 2019-12-05 20:54:56
I am writing a Maven plugin which needs to check if a certain project dependency has javadocs and sources available... and if so, would like to download them and archive them on a server. I cannot find out how to check if the javadocs and source are available or how to access them if they are. Any help would be appreciated. Rich Seller You can reference additional artifacts by adding the classifier tag to a dependency. The classifier is the additional part of the artifact's name in the repository, e.g junit-4.5- sources .jar So to directly declare a dependency on the junit sources jar you can

Missing maven dependency using nexus setup

跟風遠走 提交于 2019-12-05 20:54:40
I am trying to build a maven project to test out some testing software - Arquillian. I setup nexus and added the jboss repositories to the bottom of the public group. When i run mvn test i get this error: Missing: ---------- 1) com.sun.istack:istack-commons-runtime:jar:1.1-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=com.sun.istack -DartifactId=istack-commons-runtime -Dversion=1.1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file

persistence.xml not found during maven testing

人走茶凉 提交于 2019-12-05 20:22:54
问题 I'm trying to load test data into a test DB during a maven build for integration testing. persistence.xml is being copied to target/test-classes/META-INF/ correctly, but I get this exception when the test is run. javax.persistence.PersistenceException: No Persistence provider for EntityManager named aimDatabase It looks like it's not finding or loading persistence.xml. 回答1: Just solved the same problem with a Maven/Eclipse based JPA project. I had my META-INF directory under src/main/java

How can I execute the opposite of mvn install from a script that does not know the name of the artifact or group ID of the artifact being uninstalled? [duplicate]

♀尐吖头ヾ 提交于 2019-12-05 20:22:42
问题 This question already has answers here : How to remove jar file from local maven repository which was added with install:install-file? (6 answers) How to do remove a projects artifacts from the local maven repo? (3 answers) Closed 5 years ago . This sounds like it should be easy, but I've yet to find an answer. If I install an artifact with mvn install, how do I remove said artifact? I tried using dependency:purge-local-repository, but it only removes the dependencies - not the actual

how to generate download-site using maven

我只是一个虾纸丫 提交于 2019-12-05 20:20:57
I am new to Maven and trying to accomplish a simple task: build jar package and web site [DONE] deploy them to remote server via scp [DONE] the site should contain download page with links to the deployed jar files [MISSING] I do not want to use archiva or similar tools. I just want to have a (static, generated) page on the web site with the links to all the built jars (or only to the latest build). I tried: put <item name="Downloads" href="download.html"/> into the site.xml mvn commons:download-page mvn deploy site:deploy What I get: these commands copies the jar file to remote server:

Maven, Hudson and Dynamic Clearcase Views

别说谁变了你拦得住时间么 提交于 2019-12-05 20:14:53
This led on from the question about asking if Apache Maven and IBM Rational ClearCase integrated well. Thought I should write up what I found out - will require various edits, but I shall eventually get round to adding it all I hope. Environment ClearCase - Version 7.0.1.2 of ClearCase. Maven - All of them, from the Maven website . Hudson - Version 1.307 downloaded straight from the Hudson website Questions Does Maven run from a VOB? I installed all the versions of Maven2 into a VOB 'stacked', i.e. I added Version 2.0 - labelled it, locked the label - then added 2.0.1 on top. To prevent there