maven-2

Unable to deploy using SVN as Maven repo

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 15:39:16
问题 I'm trying to use Subversion as Maven repo utilizing Maven wagon. If I declare snapshot location using http as protocol I get 409 error back from server when trying to deploy (mvn clean deploy) <snapshotRepository> <uniqueVersion>false</uniqueVersion> <id>engtools_snapshots</id> <name>EngTools Maven Repository</name> <url>http://continuum.td.com/svn_repos/maven/snapshots</url> </snapshotRepository> When I change protocol to scm:svn:http things are getting even more weird - I get several

How can I read a resource file in an unexploded war file deployed in Tomcat?

你说的曾经没有我的故事 提交于 2019-12-10 15:29:31
问题 I am trying to load a binary image file to do some processing inside my server-side Java code. I am currently placing my image in the package where my executing class exists and calling: Image img = Image.getInstance(this.getClass().getResource("logo.png")); This works fine when I'm running Tomcat on my development box in an exploded war setup, but when I deploy to a server running Tomcat where it doesn't explode war files, the call to getResource returns null. I've also tried moving the

How to suppress/control logging of Wagon-FTP Maven extension?

孤人 提交于 2019-12-10 15:29:21
问题 I'm deploying Maven site by FTP, using Wagon-FTP. Works fine, but output is full of FTP connection/authentication details, which effectively expose logins and passwords to everybody (especially if the project is open source and its CI protocols are publicly accessible): [...] [INFO] [INFO] --- maven-site-plugin:3.0-beta-3:deploy (default-deploy) @ rempl --- Reply received: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ---------- 220-You are user number 1 of 50 allowed. 220-Local time is

Mercurial Maven Release plugin problems

﹥>﹥吖頭↗ 提交于 2019-12-10 15:11:16
问题 I love using Maven and distributed SCMs like Mercurial (BitBucket). However as I bring my project to scale and my Hg repository grows, I am finding the Maven Release plugin more and more cumbersome to work with. The primary problem is that when a mvn release:prepare is called Maven doesn't take advantage of the distributed nature of Hg and performs a full clone of the entire repository to put into a temporary directory. The issue is very well documented by Fabrizio Giudici back in 2009 http:/

maven test report format

谁都会走 提交于 2019-12-10 15:06:21
问题 When I run the tests In my Java/Groovy Maven project, the test reports are stored in target/surefire-reports . For each test class that is run a .txt and .xml file is created showing the output of that class. All in all, this is a remarkably unhelpful format, as it doesn't provide any easy way to quickly see which tests failed and the output they produced. I'd like something similar to Grails' test reports. Is there are any easy way to change the report format to something more user friendly?

Maven custom archive extension - how do I use unpack-dependencies?

随声附和 提交于 2019-12-10 14:26:12
问题 I have a custom artfiact type web-module ; just a ZIP but with a custom extension. I then have a project depending on it, I want its dependencies of this custom type to be unpacked. The maven-dependency-plugin unpack-dependencies goal seemed to fit the bill, however I keep getting the error: [INFO] Unknown archiver type Embedded error: No such archiver: 'web-module'. [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.lifecycle

Maven debugging output: What does (f) mean?

烂漫一生 提交于 2019-12-10 14:22:04
问题 When you run Maven 2 with the -X flag, and you watch as it configures plugins, you might see output like this: [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-clean-plugin:2.3:clean' --> [DEBUG] (f) directory = e:\projects\foobar\target [DEBUG] (f) excludeDefaultDirectories = false [DEBUG] (f) failOnError = true [DEBUG] (s) directory = . [DEBUG] (s) includes = [**/*~] [DEBUG] (f) filesets = [file set: . (included: [**/*~], excluded: [])] [DEBUG] (f) followSymLinks = false [DEBUG] (f)

Combined site/deploy goal for Maven

烂漫一生 提交于 2019-12-10 14:09:43
问题 When running a Maven build on the CI server, I generate the site to publish the documentation and reports, and also deploy the artifact to the snapshot repository for use by other projects. To do this I run the following goals: mvn clean site deploy This means the unit tests are run twice , once for the site lifecycle and once for the deploy lifecycle. If I configure the site goal to be bound to the standard lifecycle the tests are still run twice, running the site goal always causes the

How to package test classes into the jar without running them?

一个人想着一个人 提交于 2019-12-10 14:00:01
问题 I'm struggling with including my test classes into the jar package, but not running them. After some googling, I've tried mvn package -DskipTests , but my test classes are simply not added to the jar. Any ideas? 回答1: if youre following maven conventions then your test classes are under src/test/java . maven never packages the contents of the test sources subdirectory into the artifact. you have (at least ...) 3 alternativs: put the tests with the "normal" sources if you REALLY want them

How to Add a File from my source tree to Maven Site

点点圈 提交于 2019-12-10 13:59:22
问题 I have a Maven 2 RESTful application using Jersey/JAXB. I generate the JAXB beans from a schema file, where the schema file is in my resources directory, e.g., src/main/resources/foo.xsd. I want to include foo.xsd file in the generated Maven site for my project, so that clients can see the XML schema when writing RESTful calls. How can I include foo.xsd in the site? I could have a copy of the file in src/main/site/..., and then update my site.xml to point to it (or have a .apt whose contents