Tag Archives: maven

Enable Weld Logging on Glassfish with Maven

Just figured out how to use a Weld-injected Logger on Glassfish. Unfortunately, i couldn’t get Log4J12 as SL4J Implementation running, like the author of this post did (i hope i’ll find out later), but with the sl4j-jdk14 binding, the logging just works. Steps: Add the following dependencies to the pom.xml: <!-- SL4J API --> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.6.0</version> </dependency> [...]
Posted in General | Also tagged | 2 Comments

Use Ant-Contrib Tasks in Maven

I just messed around a while to get a simple Ant-contrib task running inside a Maven build – a simple <if>. The examples on the net weren’t very helpful or too bloated, so i’ll post a very simple one. The problem with Ant-contrib is that this library doesn’t come with the regular Ant-distribution. So it has to [...]
Posted in General | Also tagged | 3 Comments

Maven & Scala: Add source folder to Eclipse Project

EDIT: You don’t need to do the things described here if you’re also using Scala. In this case, you can switch to the m2eclipse-scala integration which automatically adds the Scala source folder (beside some other useful things). Just solved one another annoying problem: Everytime i had to clean my maven-eclipse-project with “mvn eclipse:clean” and re-created the project, i [...]
Posted in General | Also tagged , | 2 Comments

Maven Scala Build Error “error while loading Function1, class file needed by Function1 is missing”

Scala and Maven… a kinda’ fragile combination Today i got the following error when trying to compile my scala-project with “mvn compile”: [ERROR] error: error while loading Function1, class file needed by Function1 is missing. [INFO] reference value Unit of package scala refers to nonexisting symbol. [ERROR] one error found [INFO] ———————————————————————— [ERROR] BUILD ERROR [INFO] ———————————————————————— [INFO] wrap: org.apache.commons.exec.ExecuteException: Process exited [...]
Posted in General | Also tagged | Leave a comment

Build a mixed Scala 2.8/Java application from scratch with Maven [Eclipse Settings]

[EDIT 15.01.2011] There have been changes since i wrote this article. Although i don’t have experiences with it until know, I would suggest using the m2eclipse-scala Plugin which solves some bugs that occur when using the regular M2Eclipse plugin. Now i’m going to show you how to open the Maven project from Part 1 with Eclipse and [...]
Posted in General | Also tagged , , | 2 Comments

Build a mixed Scala 2.8/Java application from scratch with Maven

In this tutorial I will show you how to build an application by Maven that consists of Java and Scala source files. The project automatically uses the latest Scala 2.8-Snapshot until it’s released (Maven will look for the latest version of the Scala language each time you build it). We will setup the project to use [...]
Posted in General | Also tagged , | 14 Comments