maven-2

enabling UTF-8 encoding for clojure source files

萝らか妹 提交于 2019-12-18 02:41:29
问题 I'm working on a project which involves maven, java and clojure. The problem I'm facing is this, I have some UTF-8 chars in my clojure source files because of which my source code is not interpreted correctly by the java compiler, I kinda got it working by setting the environment variable JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 , but what I want is to pass this property through MAVEN. I have already tried setting MAVEN_OPTS=-Dfile.encoding but this doesn't seem to work. I have also tried

How can I in a jsp page get maven project version number?

前提是你 提交于 2019-12-18 01:59:12
问题 I am working on a java web application, managed by maven2. From time to time, we did some changes, and want to do new releases, of course with new version number. In the homepage (jsp), there is text like <b>version:</b> 2.3.3... Is it possible, every time I do a new release, I only change the <version/> in pom.xml, and version number in jsp can be automatically filled by this maven ${project.version}? I tried maven profile, however it doesn't seem to work. any ideas? Thank you. 回答1: It's

How to set Environment Variable in Netbeans?

末鹿安然 提交于 2019-12-18 01:42:41
问题 I am running maven based Spring project in netbeans . I am using an environment variable in my project configurations file to Open specific file based on that variable value . I am able to set it In Eclipse but do not know how to set in Netbeans . Can any one help me? 回答1: System.getEnv("FOO") == "FOOVALUE" netbeans 6.7+ - Right click Project ->Properties ->Actions ->Run project ->Set Properties: Add Env.FOO=FOOVALUE Note: You can apply the same technique on other configurations and other

In Maven, can I specify a relative path above my current project?

邮差的信 提交于 2019-12-18 01:29:28
问题 I'm learning maven on the fly while doing work on a project with a large set of projects to build. Currently a line in the main build uses an absolute path to specify a directory that is part of the subversion repository but "above" it's directory. as in: "C:/work/project/eclipse" where "project" is the checked-in directory, and the pom.xml is in "C:/work/project/src/subproject/pom.xml" I'd like to make that line a relative address instead. I tried specifying "../../Eclipse....", put that

Can access maven repository from behind proxy, need help

烈酒焚心 提交于 2019-12-17 23:23:14
问题 I am trying to access maven repository from behind proxy. I configured settings.xml correctly (i guess so...) <proxies> <proxy> <active>true</active> <protocol>http</protocol> <username>username</username> <password>password</password> <host>12.34.56.78</host> <port>8080</port> </proxy> </proxies> But still I am getting an error message like... if i don't configure userid/password gets correct error message which is HTTP response code 407 - saying authentication required. But If I configure

Maven not compiling class and there is no class files in war file

家住魔仙堡 提交于 2019-12-17 22:42:00
问题 iam converting my project to maven. I see in war file there is no class file available. Below is the pom.xml and project structure. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>RetailProducts</groupId> <artifactId>RetailProducts</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>war<

Run Junit Suite using Maven Command

杀马特。学长 韩版系。学妹 提交于 2019-12-17 22:31:38
问题 I have multiple Junit test suites (SlowTestSuite, FastTestSuite etc). I would like to run only specific suite using maven command. e.g. mvn clean install test -Dtest=FastTestSuite -DfailIfNoTests=false but its not working. Just not running any test at all. Any suggestions please. 回答1: I have achieved this by adding property into pom as: <properties> <runSuite>**/FastTestSuite.class</runSuite> </properties> and maven-surefire-plugin should be: <plugin> <groupId>org.apache.maven.plugins<

JavaFX with Maven [closed]

丶灬走出姿态 提交于 2019-12-17 22:24:29
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I recently started a JavaFX project, and I'd like to use Maven as my compiler/deployment tool. Is there a good tutorial or plugin to integrate JavaFX and Maven? 回答1: Starting with Java 7u9 I think JavaFX is shipped together with Java SE runtime and the rest, so it makes it pretty easy to create a Maven-based

problem with INIT=RUNSCRIPT and relative paths

混江龙づ霸主 提交于 2019-12-17 22:23:22
问题 I use maven conventions for source paths (src/main src/test) and i have my sql scripts in src/main/resources/scripts. I want to run my app with H2 memory and i'd like to use the jdbc url to initialize my db : database.url=jdbc:h2:mem:;INIT=RUNSCRIPT FROM 'src/main/resources/scripts/create.sql'; My problem is that this relative path (src/main/... ) does not work, and that H2 won't crash if the init=runscript command targets nothing. Does someone know what is the path i should use to make this

hot deploy in embedded jetty

只愿长相守 提交于 2019-12-17 22:20:28
问题 I have a Spring Roo project and I use mvn jetty:run to run my app. The only problem is changes to the *.java classes do not hot deploy, while changes to *.jspx hot deploy fine. So how can I configure mvn jetty to hotdeploy for java classes? 回答1: You need to set the scanIntervalSeconds to a value greater than 0 to enable it: scanIntervalSeconds - The interval in seconds to scan the webapp for changes and restart the context if necessary. Ignored if reload is enabled. Disabled by default.