mvn

http://maven.apache.org/plugins/

[b]输出依赖树[/b]
mvn dependency:tree > dep.txt


下载源代码jar
-DdownloadSources=true


下载javadoc包
-DdownloadJavadocs=true


跳过findbugs
-Dfindbugs.skip=true


[b]单元测试[/b]
跳过单元测试
-Dmaven.test.skip=true

跑单个单元测试(可加通配符)[url=http://maven.apache.org/plugins/maven-surefire-plugin/examples/single-test.html]详见[/url]
mvn -Dtest=TestSquare,TestCi*le test

或细到方法单元测试
mvn -Dtest=TestCircle#*test* test


-----------------------------------------
同时也release到antx
a2m:install-antx-module-intl


指定配置文件
-Dantx.properties.path=/path/your.properties


-DuserProp=/path/your.properties


跳过检查intl-base
-Dcheck.parent.skip


内存溢出
export MAVEN_OPTS="$MAVEN_OPTS -Xms256m -Xmx1024m"
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
您好!要在 Maven 项目中使用 AspectJ,您需要进行以下步骤: 1. 首先,在您的 Maven 项目的 `pom.xml` 文件中添加 AspectJ Maven 插件的配置。在 `<build>` 标签下的 `<plugins>` 中添加以下内容: ```xml <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>aspectj-maven-plugin</artifactId> <version>1.12.6</version> <executions> <execution> <goals> <goal>compile</goal> <goal>test-compile</goal> </goals> </execution> </executions> <configuration> <source>1.8</source> <!-- 设置您项目的 Java 版本 --> <target>1.8</target> <!-- 设置您项目的目标 Java 版本 --> <complianceLevel>1.8</complianceLevel> <!-- 设置 AspectJ 编译器的兼容性级别 --> </configuration> </plugin> ``` 2. 接下来,在您的项目中创建一个 `src/main/aspect` 目录,并在其中编写您的 AspectJ 切面类。例如,您可以创建一个名为 `LoggingAspect` 的类,并在其中定义一些切面逻辑。 3. 在您的项目中,使用 AspectJ 注解或 XML 文件来指定切点和通知。您可以在切面类中使用 `@Aspect` 注解,并通过 `@Pointcut` 注解定义切点,然后使用各种通知注解(如 `@Before`、`@After` 等)来指定切面逻辑。 4. 构建和运行您的项目。您可以使用 `mvn compile` 命令编译您的项目,并使用 `mvn test` 命令运行您的测试。AspectJ Maven 插件会在编译过程中织入切面逻辑。 这就是使用 Maven 和 AspectJ 的基本步骤。希望对您有所帮助!如果您有任何其他问题,请随时问我。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值