mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-15 18:33:41 +00:00
8192821: Make LogCompilation into a maven project
Add a maven project setup while preserving make build. Reviewed-by: kvn
This commit is contained in:
parent
6dc1d8c06d
commit
d470bc0546
@ -25,7 +25,7 @@ PKGLIST = \
|
||||
com.sun.hotspot.tools.compiler
|
||||
#END PKGLIST
|
||||
|
||||
FILELIST = com/sun/hotspot/tools/compiler/*.java
|
||||
FILELIST = main/java/com/sun/hotspot/tools/compiler/*.java
|
||||
|
||||
ifneq "x$(ALT_BOOTDIR)" "x"
|
||||
BOOTDIR := $(ALT_BOOTDIR)
|
||||
|
||||
@ -16,3 +16,10 @@ More information about the LogCompilation output can be found at
|
||||
https://wiki.openjdk.java.net/display/HotSpot/LogCompilation+overview
|
||||
https://wiki.openjdk.java.net/display/HotSpot/PrintCompilation
|
||||
https://wiki.openjdk.java.net/display/HotSpot/LogCompilation+tool
|
||||
|
||||
The project layout is now for Maven. To build the project with Maven do:
|
||||
|
||||
mvn clean install
|
||||
|
||||
The build also copies the resulting target jar to ./logc.jar for easy
|
||||
interop with the Makefile build.
|
||||
110
src/utils/LogCompilation/pom.xml
Normal file
110
src/utils/LogCompilation/pom.xml
Normal file
@ -0,0 +1,110 @@
|
||||
<!--
|
||||
Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
- Neither the name of Oracle nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
-->
|
||||
|
||||
<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/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.sun.hotspot.tools.compiler</groupId>
|
||||
<artifactId>LogCompilation</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<name>LogCompilation</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.8.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<transformers>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||||
<mainClass>com.sun.hotspot.tools.compiler.LogCompilation</mainClass>
|
||||
</transformer>
|
||||
</transformers>
|
||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<version>2.5.3</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>3.0.0-M1</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>1.8</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>copy</id>
|
||||
<phase>package</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
<copy file="${basedir}/target/${artifactId}-${version}.jar" tofile="${basedir}/logc.jar"/>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@ -632,7 +632,7 @@ public class LogParser extends DefaultHandler implements ErrorHandler {
|
||||
|
||||
/**
|
||||
* Entry point for log file parsing with a file reader.
|
||||
* {@see #parse(String,boolean)}
|
||||
* {@link #parse(String,boolean)}
|
||||
*/
|
||||
public static ArrayList<LogEvent> parse(Reader reader, boolean cleanup) throws Exception {
|
||||
// Create the XML input factory
|
||||
@ -825,7 +825,7 @@ public class LogParser extends DefaultHandler implements ErrorHandler {
|
||||
* an {@linkplain #site initial scope} with a bogus bytecode index and the
|
||||
* right inline ID, and push the scope with the inline ID attached. Note
|
||||
* that most of late inlining processing happens in
|
||||
* {@link #endElement()}.</li>
|
||||
* {@link #endElement(String,String,String)}.</li>
|
||||
* <li><b>jvms:</b> record a {@linkplain Jvms JVMState}. Depending on the
|
||||
* context in which this event is encountered, this can mean adding
|
||||
* information to the currently being processed trap, lock elimination, or
|
||||
@ -1182,11 +1182,11 @@ public class LogParser extends DefaultHandler implements ErrorHandler {
|
||||
* {@code true} here. (It will be reset when parsing the inlined methods is
|
||||
* done; this happens for the successful case in this method as well, when
|
||||
* {@code parse} elements are processed; and for inlining failures, in
|
||||
* {@link #startElement()}, when {@code inline_fail} elements are
|
||||
* {@link #startElement(String,String,String,Attributes)}, when {@code inline_fail} elements are
|
||||
* processed.)</li>
|
||||
* <li><b>task:</b> perform cleanup at the end of a compilation. Note that
|
||||
* the explicit {@code task_done} event is handled in
|
||||
* {@link #startElement()}.</li>
|
||||
* {@link #startElement(String,String,String,Attributes)}.</li>
|
||||
* </ul>
|
||||
*/
|
||||
@Override
|
||||
Loading…
x
Reference in New Issue
Block a user