2010-10-20 10 views
7

यह सब समय नहीं होता है, लेकिन कभी कभी मैं इस तरह चीज़ों को ढूंढने करता है:क्यों Maven कॉपी तोड़फोड़ निर्देशिका को लक्षित करने के

>dir /SF target\.svn 
…\target\Zeiterfassung-web\WEB-INF\.svn\. 
…\target\Zeiterfassung-web\WEB-INF\.svn\.. 
…\target\Zeiterfassung-web\WEB-INF\.svn\lock 

यह कैसे Maven के रूप में भी हो सकता है के रूप में डिफ़ॉल्ट रूप से .svn निर्देशिका ध्यान माना जाता है ?

क्या मैं उन्हें स्पष्ट रूप से बहिष्कृत कर सकता हूं (वेब-आईएनएफ नोट करें - यह न तो स्रोत है और न ही संसाधन है)?

या क्या कोई खूनी एसएसएन डेटा कहीं और काम फ़ाइलों से अलग कर सकता है (जैसे साफ़केस करता है)?


पोम का अनुरोध किया (ऋण एससीएम और इस मुद्दे को प्रबंधन) के रूप में:

<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' 
> 
<!-- Projekt - - - - - - - - - - - - - - - - - - - - - - - - {{{1 - - - --> 
    <modelVersion>4.0.0</modelVersion> 
    <parent> 
    <artifactId>Zeiterfassung</artifactId> 
    <groupId>com.noser</groupId> 
    <version>1.0-SNAPSHOT</version> 
    <relativePath>../Zeiterfassung</relativePath> 
    </parent> 
    <groupId>com.noser</groupId> 
    <artifactId>Zeiterfassung-web</artifactId> 
    <packaging>war</packaging> 
    <version>1.0-SNAPSHOT</version> 
    <name>Zeiterfassung Webapp</name> 
    <description>Mobile Applikation Zeiterfassung — Web Archive/Application</description> 
    <url>http://maven.apache.org</url> 
    <repositories> 
    <repository> 
     <id>java.net2</id> 
     <name>Repository hosting the jee6 artifacts</name> 
     <url>http://download.java.net/maven/2</url> 
    </repository> 
    </repositories> 
    <dependencies> 
    <dependency> 
     <groupId>${project.groupId}</groupId> 
     <artifactId>Zeiterfassung-lib</artifactId> 
     <version>${project.version}</version> 
    </dependency> 
    <dependency> 
     <groupId>javax</groupId> 
     <artifactId>javaee-web-api</artifactId> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>junit</groupId> 
     <artifactId>junit</artifactId> 
     <scope>test</scope> 
    </dependency> 
    <dependency> 
     <groupId>org.scala-lang</groupId> 
     <artifactId>scala-library</artifactId> 
     <version>2.8.0</version> 
     <type>jar</type> 
     <scope>compile</scope> 
    </dependency> 
    </dependencies> 
    <organization> 
    <name>Noser Engineering AG</name> 
    <url>http://www.noser.com</url> 
    </organization> 
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - }}}1 - - - --> 
<!-- Build - - - - - - - - - - - - - - - - - - - - - - - - - {{{1 - - - --> 
    <build> 
    <defaultGoal>package</defaultGoal> 
    <resources> 
     <resource> 
     <directory>src/main/resources</directory> 
     <excludes> 
      <exclude>**/.backups/*</exclude> 
      <exclude>**/.backups</exclude> 
      <exclude>**/.svn/*</exclude> 
      <exclude>**/.svn</exclude> 
     </excludes> 
     </resource> 
    </resources> 
    <plugins> 
     <plugin> 
     <groupId>org.scala-tools</groupId> 
     <artifactId>maven-scala-plugin</artifactId> 
     <executions> 
      <execution> 
      <goals> 
       <goal>compile</goal> 
       <goal>testCompile</goal> 
      </goals> 
      </execution> 
     </executions> 
     <configuration> 
      <jvmArgs> 
      <jvmArg>-Xms64m</jvmArg> 
      <jvmArg>-Xmx1024m</jvmArg> 
      </jvmArgs> 
     </configuration> 
     </plugin> 
     <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-compiler-plugin</artifactId> 
     <configuration> 
      <source>1.6</source> 
      <target>1.6</target> 
      <encoding>${project.build.sourceEncoding}</encoding> 
      <showDeprecation>true</showDeprecation> 
     </configuration> 
     </plugin> 
     <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-war-plugin</artifactId> 
     <configuration> 
      <failOnMissingWebXml>false</failOnMissingWebXml> 
     </configuration> 
     </plugin> 
     <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-resources-plugin</artifactId> 
     <configuration> 
      <encoding>${project.build.sourceEncoding}</encoding> 
     </configuration> 
     </plugin> 
    </plugins> 
    <finalName>Zeiterfassung-web</finalName> 
    </build> 
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - }}}1 - - - --> 
<!-- Profiles - - - - - - - - - - - - - - - - - - - - - - - {{{1 - - - --> 
    <profiles> 
    <profile> 
     <id>endorsed</id> 
     <activation> 
     <property> 
      <name>sun.boot.class.path</name> 
     </property> 
     </activation> 
     <build> 
     <plugins> 
      <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-compiler-plugin</artifactId> 
      <configuration> 
       <source>1.6</source> 
       <target>1.6</target> 
       <encoding>${project.build.sourceEncoding}</encoding> 
       <showDeprecation>true</showDeprecation> 
       <compilerArguments> 
       <bootclasspath>${settings.localRepository}/javax/javaee-endorsed-api/6.0/javaee-endorsed-api-6.0.jar${path.separator}${sun.boot.class.path}</bootclasspath> 
       </compilerArguments> 
      </configuration> 
      <dependencies> 
       <dependency> 
       <groupId>javax</groupId> 
       <artifactId>javaee-endorsed-api</artifactId> 
       <version>6.0</version> 
       </dependency> 
      </dependencies> 
      </plugin> 
     </plugins> 
     </build> 
    </profile> 
    </profiles> 
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - }}}1 - - - --> 
<!-- Reporting - - - - - - - - - - - - - - - - - - - - - - - {{{1 - - - --> 
    <reporting> 
    <plugins> 
     <plugin> 
     <groupId>org.apache.maven.plugins</groupId> 
     <artifactId>maven-javadoc-plugin</artifactId> 
     <configuration> 
      <show>private</show> 
      <nohelp>true</nohelp> 
     </configuration> 
     </plugin> 
    </plugins> 
    </reporting> 
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - }}}1 - - - --> 
<!-- Properties - - - - - - - - - - - - - - - - - - - - - - {{{1 - - - --> 
    <properties> 
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 
    <maven.compile.encoding>UTF-8</maven.compile.encoding> 
    <netbeans.hint.deploy.server>gfv3ee6wc</netbeans.hint.deploy.server> 
    </properties> 
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - }}}1 - - - --> 
</project> 
<!-- vim: set nowrap tabstop=8 shiftwidth=2 softtabstop=2 expandtab :--> 
<!-- vim: set textwidth=0 filetype=xml foldmethod=marker spell spelllang=en_gb :--> 
+0

मुझे लक्ष्य \ कक्षाओं और लक्ष्य \ परीक्षण-वर्गों को छोड़कर, वही चीज़ मिलती है, लेकिन बहु-मॉड्यूल प्रोजेक्ट के कई टुकड़ों के लिए, कुछ युद्ध, कुछ जार। विंडोज पर ग्रहण का उपयोग करना। –

+0

मैंने समय-समय पर एक्लिप्स का भी उपयोग किया। लेकिन ज्यादातर इन दिनों नेटबीन। और इसके बारे में सोचना: समस्या भी कम हो गई है। मुझे आश्चर्य है कि क्या सहसंबंध है। शायद एक ग्रहण समस्या। – Martin

उत्तर

1

मुझे आश्चर्य है कि आपको अपने युद्ध में .svn निर्देशिकाएं मिलती हैं (मेरे ज्ञान के लिए, एसएमएम निर्देशिका डिफ़ॉल्ट रूप से बाहर रखी जाती है, बहिष्कार स्रोतों में हार्ड कोडित होते हैं)। मैं वास्तव में नहीं जानता कि आप उन्हें क्यों प्राप्त करते हैं।

जिसके अनुसार, निम्न समस्या को हल करने के लिए मदद कर सकता है: लेकिन

... 
<plugins> 
    <plugin> 
    <groupId>org.apache.maven.plugins</groupId> 
    <artifactId>maven-war-plugin</artifactId> 
    <configuration> 
     <warSourceExcludes> 
     **/.svn/** 
     </warSourceExcludes> 
    </configuration> 
    </plugin> 
    ... 
</plugins> 

जैसा कि मैंने कहा, मैं एक समाधान की तुलना में एक समाधान के रूप में ऊपर और अधिक पर विचार करें।

+0

जैसा कि मैंने कहा था कि यह छद्म है, इसलिए मुझे लगता है कि यह किसी प्रकार की बग है। लेकिन बाहर के साथ हिंद के लिए धन्यवाद। – Martin

0

यह सबसे अधिक संभावना होता है अगर आप maven-release-plugin का उपयोग करें। अगर यह आपको परेशान करता है तो आप mvn clean चलाएं और इसके साथ किया जाए।

+0

'एमवीएन क्लीन 'वास्तव में मेरा वर्तमान समाधान है। मैं एक बेहतर समाधान की तलाश में हूं। या ऐसा क्यों होता है इसलिए मैं स्थिति से बच सकता हूं या जान सकता हूं कि जब मैं एक्स करता हूं तो मुझे बाद में साफ-सफाई की आवश्यकता होती है। – Martin

+0

क्या आप 'maven-release-plugin' का उपयोग करते हैं? –

+0

असल में नहीं: -> एफएफआईंड/एसवीटी "मेवेन-रिलीज-प्लगइन" * .pom - 0 ज़ीलेन 0 डेटियन – Martin

संबंधित मुद्दे