我在文件夹层次结构中有100个javascript文件,我想要两组输出.一个是连接版本用于调试目的,另一个是concat + minfy版本.我目前正在使用下面的插件,但在此我需要提供我需要缩小的每个文件.我正在寻找一个只需要父文件夹并满足上述条件的插件.
<groupId>com.samaxes.maven</groupId>
<artifactId>minify-maven-plugin</artifactId>
<version>1.7</version>
Run Code Online (Sandbox Code Playgroud) 这是我的干净安装-x结果:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building test Maven Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ test ---
[INFO] Deleting C:\Users\utopcu\workspace\test\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ test ---
[WARNING] Using platform encoding (Cp1254 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ test ---
[WARNING] Using platform encoding (Cp1254 …Run Code Online (Sandbox Code Playgroud) 我想在POM中排除单个PMD规则,但它不起作用.我尝试创建一个pmd-exclude.xml(与pom.xml在同一个目录中):
<?xml version="1.0"?>
<ruleset name="remove_rules">
<description>Remove rules</description>
<rule ref="rulesets/unnecessary.xml">
<exclude name="UselessParentheses"/>
</rule>
</ruleset>
Run Code Online (Sandbox Code Playgroud)
来自http://www.ing.iac.es/~docs/external/java/pmd/howtomakearuleset.html并在pom.xml中引用它:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<sourceEncoding>utf-8</sourceEncoding>
<rulesets>
<ruleset>${pom.basedir}/pmd-exclude.xml</ruleset>
</rulesets>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
但它一直在报告这些规则.
另外:我不想指定它必须检查哪些规则,因为较新版本可以(并且将)包含新规则,我不想检查每个新版本中将运行哪些新规则.
在我的项目中,我正在使用Maven 3.0.4并使用JasperReports 5.1.0.要 使用jasperreports-maven-plugins编译JRXML文件.我有版本1.0-beta-2 的jasperreports-maven-plugin.因为它是测试版(1.0-beta-2)我可以知道,什么是稳定版的jasperreports-maven-plugin可以使用?
在我的pom.xml文件中使用的插件下面
<properties>
<jasperreports.version>5.1.0</jasperreports.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jasperreports-maven-plugin</artifactId>
<version>1.0-beta-2</version>
<configuration>
<sourceDirectory>src/main/resources/reports</sourceDirectory>
<outputDirectory>${project.build.directory}/classes/reports</outputDirectory>
</configuration>
<executions>
<execution>
<!-- Need to bind to the compile phase cuz the reports uses classes under target/classes. The default is the generate-resources phase. -->
<phase>compile</phase>
<goals>
<goal>compile-reports</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>${jasperreports.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.0.1</version>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
Run Code Online (Sandbox Code Playgroud) (在Java 7上使用Mac上的Maven 3.0.3)
当我运行mvn dependency:analyze-duplicatemaven使用版本2.1(无论是否在我的本地仓库中有2.8)插件和抱怨:
[ERROR] Could not find goal 'analyze-duplicate' in plugin org.apache.maven.plugins:maven-dependency-plugin:2.1 among available goals unpack-dependencies,....
Run Code Online (Sandbox Code Playgroud)
当我运行它,因为mvn org.apache.maven.plugins:maven-dependency-plugin:2.8:analyze它工作正常.
我原以为,如果没有明确指定版本,maven总会回到最新版本(即使还没有在本地回购中)?
我错过了什么?谢谢大家的回复时间.
从文档:
exec:exec 在单独的进程中执行程序和Java程序.exec:java 在同一个VM中执行Java程序.我想分叉一个java程序.我已经有了它的工作exec:java但是没有分叉.所以明显的举措是将目标改为exec.问题是,语法与语法exec完全不同java.它没有像includeProjectDependencies,includePluginDependencies等等的标签.是否有一个我可以使用的插件,就像它的叉子一样,它有一个方便的语法,比如#2?IMO,#2应该只有一个<fork>true</fork>配置.
我在pom.xml中设置了maven属性.
<properties>
<build.start.date>someValue</build.start.date>
</properties>
Run Code Online (Sandbox Code Playgroud)
现在我有一个ant任务执行以下操作:
<loadresource property="build.start">
<url url="http://someUrl?xpath=/*/id/text()"/>
</loadresource>
<property name="build.start.date" value="${build.start}"/>
<echo>Printing Ant Value ${build.start} </echo>
<echo>Printing Maven Value ${build.start.date}</echo>
Run Code Online (Sandbox Code Playgroud)
这导致:
[echo] Printing Ant Value 2013-03-15_17-53-08
[echo] Printing Maven Value 2013-03-16
Run Code Online (Sandbox Code Playgroud)
但我希望两者都打印:
[echo] Printing Ant Value 2013-03-15_17-53-08
[echo] Printing Maven Value 2013-03-15_17-53-08
I tried <loadresource property="build.start.date">
and
I tried <loadresource property="${build.start.date}">
Run Code Online (Sandbox Code Playgroud)
那么问题是如何在ant任务中设置全局maven属性?
无论如何要在cmd中更新maven版本?
我已经安装了 maven2.x 并且我想要最新版本,我一直在寻找并且我找到了这样的东西:
one:convert convert a Maven 1 project.xml (v3 pom) to a Maven 2 pom.xml (v4 pom).
one:deploy-maven-one-repository deploy an artifact into a Maven 1 remote repository.
one:install-maven-one-repository install an artifact into the Maven 1 local repository.
one:maven-one-plugin package a Maven 1 plugin.
Run Code Online (Sandbox Code Playgroud)
这句话的一些更新我的maven版本?
ty 提前。
无法使用更新站点在RAD 8.5.1中安装Maven.
无法完成安装,因为找不到一个或多个必需的项目.正在安装的软件:m2e - Eclipse的Maven Integration 1.0.0.20110607-2117(org.eclipse.m2e.feature.feature.group 1.0.0.20110607-2117)缺少要求:m2e Marketplace 1.0.0.20110607-2117(org.eclipse.m2e.发现1.0.0.20110607-2117)需要'bundle org.eclipse.equinox.p2.operations 0.0.0'但无法找到它无法满足依赖性:来自:m2e - Maven Integration for Eclipse 1.0.0.20110607-2117(org.eclipse) .m2e.feature.feature.group 1.0.0.20110607-2117)收件人:org.eclipse.m2e.discovery [1.0.0.20110607-2117]
在我的一个项目中,我使用了 Lift 2.5 M4 和 Scala 2.10.0。在这个项目中,我使用的是Jetty 8.1.10.v20130312。但是在通过 mvn jetty 运行项目时,我遇到了意外的异常。
我已经通过以下方式在 pom.xml 中配置了 jetty 插件:
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.10.v20130312</version>
<configuration>
<systemProperties>
<systemProperty>
<name>org.apache.cocoon.log4j.loglevel</name>
<value>WARN</value>
</systemProperty>
</systemProperties>
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>9090</port>
<maxIdleTime>30000</maxIdleTime>
</connector>
</connectors>
<webApp>
<contextPath>/</contextPath>
</webApp>
<scanIntervalSeconds>0</scanIntervalSeconds>
<stopKey>stop</stopKey>
<stopPort>9999</stopPort>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
我在运行命令时遇到以下异常:- mvn org.mortbay.jetty:jetty-maven-plugin:run
2013-04-24 06:49:39.216:警告:oeja.AnnotationParser:异常java.io.FileNotFoundException:/home/ayush/scala-lift/knolgame/target/classes/com/knolgame/lib/TransactionStatus$$anonfun$在 java.io.FileInputStream.open(本机方法) 处找到 $1.class (打开的文件太多) 在 java.io.FileInputStream.(FileInputStream.java:106) 处 org.eclipse.jetty.util.resource.FileResource.getInputStream (FileResource.java:286)在org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:754)在org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:747)在org.eclipse。 jetty.annotations.AnnotationParser.parse(AnnotationParser.java:747) 在 org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:747) 在 org.eclipse.jetty.annotations.AnnotationParser.parse(AnnotationParser.java:第747章)
但是当我使用jetty 6.1.25时,它工作正常。
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.25</version>
<configuration>
<systemProperties>
<systemProperty>
<name>org.apache.cocoon.log4j.loglevel</name>
<value>WARN</value>
</systemProperty>
</systemProperties>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>9090</port>
<maxIdleTime>30000</maxIdleTime>
</connector> …Run Code Online (Sandbox Code Playgroud)