Skip to content

Commit d846599

Browse files
mimnoclaude
andcommitted
Update bin/mallet script to work with Maven build
- Update classpath in bin/mallet to use target/classes and target/dependency - Add maven-dependency-plugin to copy runtime dependencies during package phase - Move logging.properties from src/main/java to src/main/resources (Maven standard) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 2d9095d commit d846599

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

bin/mallet

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
malletdir=`dirname $0`
55
malletdir=`dirname $malletdir`
66

7-
cp=$malletdir/class:$malletdir/lib/mallet-deps.jar:$CLASSPATH
7+
cp=$malletdir/target/classes:$malletdir/target/dependency/*:$CLASSPATH
88
#echo $cp
99

1010
MEMORY="${MALLET_MEMORY:-1g}"

pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,26 @@
152152
</plugin>
153153
-->
154154

155+
<!-- Copy dependencies for bin/mallet script -->
156+
<plugin>
157+
<groupId>org.apache.maven.plugins</groupId>
158+
<artifactId>maven-dependency-plugin</artifactId>
159+
<version>3.6.1</version>
160+
<executions>
161+
<execution>
162+
<id>copy-dependencies</id>
163+
<phase>package</phase>
164+
<goals>
165+
<goal>copy-dependencies</goal>
166+
</goals>
167+
<configuration>
168+
<outputDirectory>${project.build.directory}/dependency</outputDirectory>
169+
<includeScope>runtime</includeScope>
170+
</configuration>
171+
</execution>
172+
</executions>
173+
</plugin>
174+
155175
<!-- Unit tests -->
156176
<plugin>
157177
<groupId>org.apache.maven.plugins</groupId>

src/main/java/cc/mallet/util/resources/logging.properties renamed to src/main/resources/cc/mallet/util/resources/logging.properties

File renamed without changes.

0 commit comments

Comments
 (0)