maven-2

How to access a XML file in a maven project so it stays available when packaged

雨燕双飞 提交于 2020-01-01 10:53:31
问题 I currently started working on a maven web-app project that needs to be launched with the jetty:run-exploded goal for development/debugging in eclipse. Now, I have an XML file which contents I need to access at runtime. My problem is: where to put the file so that the code that does the reading works both in "exploded" and packaged (i.e. in the WAR) mode? Putting the file in src/main/java (so as to be in the classpath) won't cut it since maven filters out all non-java files on packaging. When

How to access a XML file in a maven project so it stays available when packaged

别等时光非礼了梦想. 提交于 2020-01-01 10:53:05
问题 I currently started working on a maven web-app project that needs to be launched with the jetty:run-exploded goal for development/debugging in eclipse. Now, I have an XML file which contents I need to access at runtime. My problem is: where to put the file so that the code that does the reading works both in "exploded" and packaged (i.e. in the WAR) mode? Putting the file in src/main/java (so as to be in the classpath) won't cut it since maven filters out all non-java files on packaging. When

Creating documentation with maven

纵饮孤独 提交于 2020-01-01 09:32:31
问题 I'm just in the middle of revisiting maven. Our team had a bad experience when we last looked at this, as it was during the period when maven was rearchitecting from 1.x to 2.x, so a lot of the dependencies we needed hadn't been moved across to the new repositories. However, I have the time to reconsider now. I am interested in using maven and either LaTeX or DocBook for creating documentation, and I was wondering if anyone had any experiences to share, project/module structure, good plugins

Where do I put the .tld file so that the resulting JAR file built with maven2 is properly packaged?

匆匆过客 提交于 2020-01-01 09:26:26
问题 I currently have the following directory structure for my code: src |-- main | `-- java | `-- com | `-- upthescala | `-- tags | `-- ViewProtectTag.java |-- test |-- pom.xml |-- .project |-- .classpath `-- .hgignore I want to include a tld file for my JSP tag, and I'm not sure where to package it. My initial thought is to add a src/main/resources directory and put META-INF/viewprotect.tld in there. 回答1: My initial thought is to add a src/main/resources directory and put META-INF/viewprotect

com.fasterxml.jackson.databind.JsonMappingException: Jackson version is too old 2.5.3

六月ゝ 毕业季﹏ 提交于 2020-01-01 09:22:38
问题 My OS is OS X 10.11.6. I'm running Spark 2.0, Zeppelin 0.6, Scala 2.11 When I run this code in Zeppelin I get an exception from Jackson. When I run this code in spark-shell - no exception. val filestream = ssc.textFileStream("/Users/davidlaxer/first-edition/ch06") com.fasterxml.jackson.databind.JsonMappingException: Jackson version is too old 2.5.3 at com.fasterxml.jackson.module.scala.JacksonModule$class.setupModule(JacksonModule.scala:56) at com.fasterxml.jackson.module.scala

GroovyDoc as Maven Plugin

ぃ、小莉子 提交于 2020-01-01 09:08:09
问题 Is there a maven plugin available somewhere that utilizes GroovyDoc, preferably as a report? I guess GMaven would be the place to look but the docs are ancient (1.0, whereas the current version is 1.3) and the GMaven plugin doesn't have any mojo that fits as you can see: mvn help:describe -DgroupId=org.codehaus.gmaven -DartifactId=gmaven-plugin This plugin has 9 goals: groovy:compile Description: Compiles Groovy sources. groovy:console Description: Launches the Groovy GUI console. groovy

package com.sun.xml.internal.bind.v2.model.annotation does not exist

随声附和 提交于 2020-01-01 08:58:10
问题 I'm trying to use a solution for serializing exceptions using jaxb. (http://forums.java.net/jive/thread.jspa?messageID=256122) The class I need to implement for that solution requires referencing the following com.sun classes. import com.sun.xml.internal.bind.v2.model.annotation.AbstractInlineAnnotationReaderImpl; import com.sun.xml.internal.bind.v2.model.annotation.Locatable; import com.sun.xml.internal.bind.v2.model.annotation.RuntimeAnnotationReader; import com.sun.xml.internal.bind.v2

What frameworks to use to bootstrap my first production scala project?

若如初见. 提交于 2020-01-01 08:52:42
问题 I am making my first foray into scala for a production app. The app is currently packaged as a war file. My plan is to create a jar file of the scala compiled artifacts and add that into the lib folder for the war file. My enhancement is a mysql-backed app exposed via Jersey & will be integrated with a 3rd party site via HttpClient invocations. I know how to do this via plain java. But when doing it in scala, there are several decision points that I am pussyfooting on. scala 2.7.7 or 2.8 RC ?

What frameworks to use to bootstrap my first production scala project?

ぐ巨炮叔叔 提交于 2020-01-01 08:51:10
问题 I am making my first foray into scala for a production app. The app is currently packaged as a war file. My plan is to create a jar file of the scala compiled artifacts and add that into the lib folder for the war file. My enhancement is a mysql-backed app exposed via Jersey & will be integrated with a 3rd party site via HttpClient invocations. I know how to do this via plain java. But when doing it in scala, there are several decision points that I am pussyfooting on. scala 2.7.7 or 2.8 RC ?

Upgrading from Spring 3.0.3.RELEASE results in: java.lang.NoSuchFieldError: USER_DECLARED_METHODS

孤人 提交于 2020-01-01 08:47:19
问题 I have a Spring-MVC 3.0 web application built with Maven. All Spring dependency versions are defined with a maven property <spring.version>3.0.3.RELEASE</spring.version> . When I change the version to either 3.0.4.RELEASE or 3.0.5.RELEASE , then the web application fails with the following exception: ERROR: [DispatcherServlet] - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.annotation