无法在Netbeans / maven

时间:2018-02-12 10:20:46

标签: maven-3 netbeans-7 imagej

我通过阅读以下pom.xml文件在Netbeans 7.3.1中导入了一个maven项目(用于实现ImageJ插件):

<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>


        <groupId>eu.marbilab.imagej</groupId>
        <artifactId>Steerable3D_</artifactId>
        <version>0.7.0-SNAPSHOT</version>

        <name>Steerable3D</name>
        <description>
          A steerable filter based on 3D Gaussian derivatives.
        </description>
        <url>http://www.marbilab.eu/imagej/s3d</url>
        <inceptionYear>2018</inceptionYear>
        <organization>
                <name>MARBILab</name>
                <url>http://www.marbilab.eu</url>
        </organization>
        <licenses>
                <license>
                        <name>GNU General Public License v3+</name>
                       <url>http://www.gnu.org/licenses/gpl.html</url>
                       <distribution>repo</distribution>
                </license>
        </licenses>

        <developers>
                <developer>
                        <id>pam66</id>
                        <name>Paolo Miocchi</name>
                        <url>http://imagej.net/User:Pam66</url>
                        <roles>
                                <role>founder</role>
                                <role>lead</role>
                                <role>developer</role>
                                <role>debugger</role>
                                <role>reviewer</role>
                                <role>support</role>
                                <role>maintainer</role>
                        </roles>
                </developer>
        </developers>
        <contributors>
                <contributor>
                        <name>Paolo Miocchi</name>
                        <url>http://imagej.net/User:Pam66</url>
                        <roles>
                                <role>founder</role>
                                <role>lead</role>
                                <role>developer</role>
                                <role>debugger</role>
                                <role>reviewer</role>
                                <role>support</role>
                                <role>maintainer</role>
                        </roles>
                        <properties><id>pam66</id></properties>
                </contributor>
        </contributors>
        <mailingLists>
                <mailingList>
                        <name>ImageJ Forum</name>
                        <archive>http://forum.imagej.net/</archive>
                </mailingList>
        </mailingLists>

        <scm>       
             <connection>
               scm:git:git://github.com/pam66/steerable3D
             </connection>
             <developerConnection>
               scm:git:git@github.com:pam66/steerable3D
             </developerConnection>
                <tag>HEAD</tag>
                <url>https://github.com/pam66/steerable3D</url>
        </scm>
        <issueManagement>
                <system>GitHub Issues</system>
                <url>https://github.com/pam66/steerable3D/issues</url>
        </issueManagement>
        <ciManagement>
                <system>None</system>
        </ciManagement>

        <properties>
                <license.licenseName>gpl_v3</license.licenseName>
                <license.copyrightOwners>
                    Paolo Miocchi
                </license.copyrightOwners>
        </properties>

        <dependencies>
        <dependency>
          <groupId>gov.nih.imagej</groupId>
          <artifactId>imagej</artifactId>
          <version>1.47</version>
          <type>pom</type>
        </dependency>
        <dependency>
          <!-- NB: For ImageJ 1.x overlay visualization. -->
          <groupId>net.imagej</groupId>
          <artifactId>imagej-legacy</artifactId>
           <version>0.29.0</version>
        </dependency>

        </dependencies>
        <repositories>
           <repository>
              <id>imagej.public</id>
              <url>
                 http://maven.imagej.net/content/groups/public
              </url>
           </repository>
        </repositories>
</project>

我在以下路径中只放了一个java源代码文件 的src /主/爪哇/ EU / marbilab / ImageJ的/ Steerable3D_.java

执行“清理和构建”似乎工作正常,并且成功生成了jar文件target / Steerable3D_-0.7.0-SNAPSHOT.jar。 这是Netbeans的输出:

cd /home/miocchi/Sources/FIJI/Steerable3D; JAVA_HOME=/usr/lib/jvm/default-java /home/miocchi/netbeans-7.3.1/java/maven/bin/mvn clean install
Scanning for projects...

------------------------------------------------------------------------
Building Steerable3D 0.7.0-SNAPSHOT
------------------------------------------------------------------------

[clean:clean]
Deleting /home/miocchi/Sources/FIJI/Steerable3D/target

[resources:resources]
[debug] execute contextualize
Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
Copying 1 resource

[compiler:compile]
File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
Compiling 1 source file to /home/miocchi/Sources/FIJI/Steerable3D/target/classes

[resources:testResources]
[debug] execute contextualize
Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
skip non existing resourceDirectory /home/miocchi/Sources/FIJI/Steerable3D/src/test/resources

[compiler:testCompile]
No sources to compile

[surefire:test]
No tests to run.
Surefire report directory: /home/miocchi/Sources/FIJI/Steerable3D/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0


[jar:jar]
Building jar: /home/miocchi/Sources/FIJI/Steerable3D/target/Steerable3D_-0.7.0-SNAPSHOT.jar

[install:install]
Installing /home/miocchi/Sources/FIJI/Steerable3D/target/Steerable3D_-0.7.0-SNAPSHOT.jar to /home/miocchi/.m2/repository/eu/marbilab/imagej/Steerable3D_/0.7.0-SNAPSHOT/Steerable3D_-0.7.0-SNAPSHOT.jar
Installing /home/miocchi/Sources/FIJI/Steerable3D/pom.xml to /home/miocchi/.m2/repository/eu/marbilab/imagej/Steerable3D_/0.7.0-SNAPSHOT/Steerable3D_-0.7.0-SNAPSHOT.pom
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 16.553s
Finished at: Mon Feb 12 11:15:13 CET 2018
Final Memory: 19M/124M
------------------------------------------------------------------------

问题是java源文件被“忽略”,根本没有编译,也没有生成.class文件。

这是生成的jar文件的内容

     jar tvf target/Steerable3D_-0.7.0-SNAPSHOT.jar 
     0 Mon Feb 12 12:33:28 CET 2018 META-INF/
   127 Mon Feb 12 12:33:26 CET 2018 META-INF/MANIFEST.MF
   332 Mon Feb 12 12:33:22 CET 2018 plugins.config
     0 Mon Feb 12 12:33:28 CET 2018 META-INF/maven/
     0 Mon Feb 12 12:33:28 CET 2018 META-INF/maven/eu.marbilab.imagej/
     0 Mon Feb 12 12:33:28 CET 2018 META-INF/maven/eu.marbilab.imagej/Steerable3D_/
  4228 Mon Feb 12 11:45:28 CET 2018 META-INF/maven/eu.marbilab.imagej/Steerable3D_/pom.xml
   124 Mon Feb 12 12:33:28 CET 2018 META-INF/maven/eu.marbilab.imagej/Steerable3D_/pom.properties

有人可以帮助我吗? 提前谢谢!

0 个答案:

没有答案